Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Circular insights for rhythmic health: A Bayesian approach with stochastic diffusion for characterizing human physiological rhythms with applications to arrhythmia detection

  • Debashis Chatterjee,

    Roles Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Project administration, Resources, Software, Supervision, Validation, Visualization, Writing – original draft, Writing – review & editing

    Affiliation Department of Statistics, Siksha Bhavana (Institution of Science), Visva Bharati, Bolpur, Santiniketan, India

  • Subhrajit Saha,

    Roles Conceptualization, Formal analysis, Methodology, Software, Writing – original draft, Writing – review & editing

    Affiliation Department of Statistics, Siksha Bhavana (Institution of Science), Visva Bharati, Bolpur, Santiniketan, India

  • Prithwish Ghosh

    Roles Conceptualization, Formal analysis, Investigation, Project administration, Writing – original draft, Writing – review & editing

    * Email: pghosh4@ncsu.edu

    Affiliation Department of Statistics, North Carolina State University, Raleigh, North Carolina, United States of America

Abstract

Accurate detection of arrhythmic patterns in physiological signals—particularly electrocardiogram (ECG)—is vital for early diagnosis and intervention. Traditional amplitude-based models often fail to capture disruptions in the underlying phase dynamics. In this study, we propose a novel Bayesian framework based on circular stochastic differential equations (SDEs) to model the temporal evolution of cardiac phase as a diffusion process on the circle. Using the MIT-BIH arrhythmia dataset, and also based on extensive simulation of ECG signals with phase anomalies, we validate the proposed methodology and compare our method against two standard approaches: a linear autoregressive (AR) model and a Fourier-based spectral method. Quantitative evaluation demonstrates that depending on the assumption, our method capable of achieving superior accuracy while better balancing sensitivity and specificity in detecting subtle phase anomalies, particularly those undetectable by conventional amplitude-based tools. Unlike existing techniques, our framework is naturally suited for circular data and offers short-term probabilistic prediction. The proposed approach provides a statistically coherent and interpretable framework for modeling rhythmic biomedical signals, laying a foundation for future extensions to multimodal or hierarchical physiological models.

1 Introduction

Human physiological rhythms, including circadian and cardiovascular cycles, play a fundamental role in sustaining homeostasis. These rhythms are inherently cyclic, defined by periodic oscillations representing angles on the unit circle [8, 52]. A deeper understanding of these rhythms needs a statistical approach that preserves their circular nature while accounting for interactions and temporal variations. Existing linear statistical methods may be insufficient to capture these dynamics effectively, as they overlook circular data’s wrapping and directional characteristics.

This paper presents a comprehensive framework that leverages circular and directional statistical methodologies and stochastic diffusion processes to analyze physiological rhythms. By modeling rhythms using multivariate wrapped distributions, we accommodate the natural interdependencies among physiological systems, allowing us to examine synchronization and desynchronization patterns. Our methodology includes Bayesian estimation and nonparametric hypothesis testing, offering a robust approach for analyzing circular data from real-world physiological datasets.

2 Related work and gaps in the literature

Studying human physiological rhythms has garnered significant attention across various disciplines, particularly in understanding the underlying mechanisms and statistical approaches that characterize these rhythms [30]. A systematic review by [7] highlights the importance of capturing physiological synchrony’s dynamic and temporal nature, emphasizing that the choice of physiological indices and statistical methods is contingent upon the specific research questions and the resources available. [1, 57] demonstrated that human pulmonary physiology exhibits clear circadian patterns, which can be effectively analyzed using the CYCLOPS framework for transcriptional rhythms. Furthermore, [9] introduced a Group Lasso-based method for automatic physiological rhythm analysis, which addresses the complexity of physiological rhythms arising from nonlinear interactions between biological mechanisms and environmental factors. The aging process presents unique challenges in studying physiological rhythms, as evidenced by [6], who employed novel statistical approaches to reveal evidence of multi-system physiological dysregulation during aging. Moreover, [14]’s exploration of the influence of human evolution on circadian rhythms and obesity susceptibility highlights the intricate interplay between evolutionary biology and physiological regulation. This relationship is further supported by [2, 8], who discusses the ubiquitous nature of complex bodily rhythms and their stochastic origins. Integrating interpersonal physiological dynamics, [11] conducted a systematic review in interpersonal autonomic physiology, revealing how physiological synchrony can influence behavioral outcomes in social contexts. Additionally, [10] provided insights into the environmental and physiological variables affecting circadian rhythms, underscoring the importance of considering these factors when designing clinical studies. Recent advancements in statistical methodologies like, [12] reviewed the circadian regulation of glucose and lipid metabolism, highlighting the significance of circadian rhythms in metabolic health. This aligns with the findings of [13], who discussed the implications of circadian rhythms on cardiovascular health, emphasizing the need for a deeper understanding of the molecular mechanisms involved [5]. [16] propose a stochastic distributed delay model with a Markov random field prior to analyze spatio-temporal gene expression [15].

A Bayesian inference-based method is introduced to analyze time-varying interactions between coupled oscillators, distinguishing unsynchronized dynamics from noise-induced phase slips, [17, 18, 59] present a data-driven approach to estimate electrical diffusivity in cardiac electrophysiology models from 12-lead ECGs [58], enabling efficient and personalized prediction of myocardial diffusion in dilated cardiomyopathy patients, with clinically acceptable accuracy for QRS duration and electrical axis. [19] introduces a Granger causality-based framework to analyze intracardiac interactions during atrial fibrillation. [20] reviews state-of-the-art dynamic modeling techniques for analyzing cognitive, emotional, and electrophysiological data, offering methods for real-time modeling [21]. [22] propose a nonlinear dimensionality reduction framework using diffusion maps on a learned statistical manifold, enabling efficient analysis of high-dimensional, nonstationary time series by approximating pairwise geodesic distances, and apply it to music analysis and epileptic-seizure prediction [23]. [24] introduce an adaptive method for determining the optimal time window for analyzing interacting dynamical systems, demonstrated through coupled oscillators and cardiorespiratory interaction, showing that coupling strength and function similarity increase with slower breathing, with potential applications to other time-varying systems. [25] propose a connection between auditory entrainment as variational Bayesian inference of rhythmic phase and tempo, showing it aligns with forced oscillator models, providing a unified framework through Bayesian Predictive Processing for rhythm perception. [26] present a Bayesian dynamical inference method to characterize human cardiorespiratory dynamics from blood pressure time series, yielding a simple nonlinear model that aligns with beat-to-beat baroreflex models. [27] propose a biologically plausible population density model to estimate physiologically meaningful parameters from electrophysiological data, focusing on the dynamics of neuronal populations and using Bayesian inference to model evoked response potentials (ERPs). [28] investigates the dynamics of human sleep by modeling one-channel EEG signals as heterogeneous random walks, revealing that sleep stages exhibit continuous, time-dependent hyper-parameters rather than discrete boundaries, which can enhance Bayesian sleep stage detection and highlight underlying processes in sleep regulation. The wave-shape oscillatory model, using diffusion maps to estimate the wave-shape manifold, captures time-dependent cycle morphology in physiological time series, providing insights into dynamics and applications such as nociception detection in arterial blood pressure and respiratory signal extraction from ECG [42]. [43] presents sequential Bayesian methods for adaptive ECG signal modeling and classification, eliminating the need for prior information, and achieves high arrhythmia classification accuracy using the interacting multiple model (IMM) and sequential Markov chain Monte Carlo (SMCMC) methods. [44] proposes a nonlinear Bayesian filtering framework, using modified ECG dynamic models and automatic parameter selection, to effectively denoise ECG recordings, outperforming conventional methods across various SNRs and successfully addressing nonstationary artifacts. [45] presents a Bayesian approach for improving inverse ECG problem solutions by incorporating body surface potentials, statistical priors, and sparse epicardial measurements, showing that catheter data significantly enhance reconstruction accuracy and offer confidence estimation through Bayesian error analysis. [46] proposes a multivariate ECG classification approach using discriminant and wavelet analyses, leveraging wavelet variances and correlations to differentiate signal patterns, and demonstrates superior performance compared to other classification methods on real and synthetic ECG data. [47] investigates the effectiveness of the MARS-based approach for solving the inverse ECG problem, showing comparable accuracy for heart activity reconstruction under various noise levels, but diminished performance at elevated pacing rates and low flow rates, highlighting its potential and limitations in clinical applications. [48] demonstrates that the Bayesian filtering paradigm, previously used for ECG denoising and compression, can effectively segment ECG beats and extract fiducial points, enhancing clinical ECG beat segmentation performance. [49] introduces a Gaussian wave-based state space model for ECG signal dynamics, effectively generating synthetic ECGs and characteristic waves, while also providing a Bayesian framework with Kalman filters for ECG denoising, achieving superior SNR improvements and clinical stability across various rhythms. [50] presents a dynamic algorithm using an extended Kalman filter and polar representation for detecting and classifying ventricular complexes, achieving 99.10% accuracy in detecting premature ventricular contractions (PVCs) across multiple databases, enhancing clinical PVC detection performance. [51] introduces a novel hybrid BANFIS method combining Bayesian and adaptive neuro-fuzzy filters to extract high-quality non-invasive foetal ECG signals by removing maternal ECG and nonlinear artifacts, supporting STAN system predictions for intrapartum foetal hypoxia detection.

existing analysis of physiological signals (circadian, cardiac, or neural) often relies on standard linear techniques (e.g., autoregressive models) or power-spectrum-based (Fourier or wavelet) approaches, which do not inherently account for circular geometry. Some key gaps in current research are:

  1. Neglect of Circularity. Many methods treat phases as linear data, risking boundary issues and misinterpretation when values wrap around .
  2. Lack of Stochastic Diffusion Modeling. While random variability is commonplace in physiological signals, simpler approaches rarely embed a formal SDE or diffusion term to capture time-evolving uncertainty.
  3. Limited Bayesian Inference. Comprehensive uncertainty quantification is vital for clinical contexts, yet few approaches incorporate a fully Bayesian treatment of circular parameters.
  4. Comparative Benchmarking. Existing circular or Bayesian solutions rarely compare performance metrics on standard ECG data sets to more basic or alternative classifiers.

We aim to fill these gaps by providing a Bayesian circular SDE framework, tested on the well-known MIT-BIH Arrhythmia dataset under different noise/sampling conditions.

It is important to mention that some recent studies have advanced statistical methods for phase data in neuroscientific applications. [56] proposed the Fcirc statistic for multi-group comparisons of discrete Fourier estimates in steady-state evoked potentials. [57] evaluated four existing circular tests (e.g. Phase Opposition Sum, Watson’s , Circular Logistic Regression) on binary outcome data. [58] introduced a Bayesian model for phase coherence in EEG/MEG, capturing uncertainty in phase-locking estimates. [29, 59] developed autoregressive models on the manifold of covariance matrices to distinguish seizure dynamics.

Distinctive features of our proposed framework:

  1. Multivariate Circular SDEs on the Torus: We model p interacting rhythms via coupled SDEs preserving full circular geometry in continuous time.
  2. Wrapped Distributions in a Bayesian Hierarchy: We embed von Mises and wrapped-normal priors in a hierarchical model, estimated by Hamiltonian Monte Carlo to yield posterior distributions for mean directions, concentrations, and diffusion parameters.
  3. Novel Multi-Sample Circular Tests: We extend Watson’s to multi-group settings and introduce permutation-based inference on the torus, enabling rigorous hypothesis tests beyond pairwise comparisons.
  4. Robust Data-Irregularity Handling: We propose circular-kernel weighting for outliers and spline/phase-bridging imputation for missing segments prior to Hilbert-transform phase extraction.

These innovations collectively go beyond the predominantly pairwise or univariate frameworks in the cited literature, providing a unified, statistically coherent toolkit for multivariate circular time-series analysis in physiological and other domains.

3 Preliminaries

Let denote the phase of the i-th physiological rhythm at time t. For example, a circadian phase might correspond to midnight, while indicates midday. The statistical analysis of such phase data demands probability distributions and stochastic models defined on or higher-dimensional tori , which accommodate interactions between multiple rhythms.

  • Circular distributions: We adopt the von Mises distribution density [38], mentioned below.
  • Wrapped multivariate models: To capture dependencies between multiple rhythms , we use the wrapped multivariate normal distribution obtained by wrapping onto . The corresponding density involves an infinite sum over , capturing the periodic nature of the domain.
  • Multivariate structure on the torus: The joint phase vector encodes the interaction between physiological systems. Correlation structures in the wrapped normal model are interpreted via the covariance matrix , where large off-diagonal terms indicate phase coupling.
  • Stochastic temporal evolution: The time evolution of phase is modeled via a stochastic differential equation (SDE) on the circle (1):
  • Numerical simulation: The stochastic SDEs are solved using the Euler–Maruyama method with appropriate modulo- wrapping to maintain circularity.

4 Motivation and outline of proposed methodology

This research aims to develop a multivariate directional statistical model to analyze the interactions between multiple physiological rhythms, mainly focusing on circadian and cardiovascular systems. Account for stochastic temporal variability in these rhythms using diffusion processes on the circle, enhancing model robustness to random fluctuations. Introduce novel methods for quantifying phase synchronization and desynchronization among multiple physiological systems. Implement rigorous hypothesis testing techniques for circular data, providing insights into phase coherence and temporal variability.

Our research offers a distinctive contribution to the field of physiological rhythm analysis through the following innovations:

  1. Multivariate Circular Statistical Modeling: We extend traditional univariate circular models to a multivariate context, simultaneously facilitating studying multiple interacting rhythms.
  2. Stochastic Diffusion Processes: By incorporating stochastic processes on the circle, our model accounts for deterministic and random variability in physiological rhythms, providing a more realistic representation of temporal dynamics.
  3. Bayesian Hierarchical Estimation: We utilize Bayesian inference to estimate model parameters, such as mean phase direction and concentration, which enables the incorporation of prior knowledge and yields a comprehensive posterior distribution.
  4. Hypothesis Testing: We implement Watson’s test and nonparametric permutation tests for circular data, enhancing the rigor of statistical inference on physiological rhythm differences.

Incorporating a stochastic diffusion term in modeling human physiological rhythms reflects the inherent variability in these biological systems. Physiological rhythms, such as circadian cycles, cardiovascular rhythms, and neural oscillations, exhibit regular periodicity and random fluctuations due to internal biological noise and external environmental factors. Stochastic processes, particularly through stochastic differential equations (SDEs), provide a framework to model such variability.

The general form of the stochastic differential equation for the phase of a rhythm is expressed as (1). Both deterministic and stochastic forces influence human physiological systems. In particular, Cardiovascular rhythms exhibit fluctuations due to factors such as stress and activity levels [31]. The stochastic diffusion models these unpredictable influences, providing a more accurate and realistic description of physiological rhythm evolution.

In multivariate settings, such as modeling multiple interacting physiological rhythms, the stochastic diffusion term is crucial for capturing the complex dependencies between systems. For instance, perturbations in one system, such as heart rate variability, can influence other systems, such as circadian regulation.

The Bayesian framework further enhances the estimation of both deterministic and stochastic components, incorporating prior information and uncertainty. This is especially important when dealing with noisy data, where precise parameter estimation is challenging.

The use of Brownian motion and stochastic processes in this context has a strong theoretical foundation, stemming from the works of Einstein [37] and Wiener [60]. These processes provide a natural way to model random fluctuations in systems otherwise governed by deterministic dynamics.

explaining the theoretical and empirical reasons for using von Mises, as follows:

  1. ECG phase data typically exhibit a unimodal distribution with moderate dispersion, which suits von Mises better than heavy-tailed or elliptical alternatives like Kent [35, 36, 41].
  2. The von Mises distribution is computationally simpler and has well-established Bayesian estimation techniques.
  3. Empirical testing on the MIT-BIH data showed that the von Mises distribution yields a better fit (lower circular Kullback–Leibler divergence) than wrapped Cauchy in our preliminary tests.

Main Contributions.

  1. We present a Bayesian framework that integrates circular statistical distributions (primarily the von Mises family) with stochastic diffusion to capture time-varying phase behaviors in physiological signals.
  2. We propose a multivariate extension for analyzing interdependencies among multiple rhythms, providing parameter estimates for both phase coherence and variability.
  3. We illustrate how our model can detect arrhythmias in real ECG data (MIT-BIH Arrhythmia dataset) and compare these performance metrics (accuracy, F1-score) with simpler baseline methods (e.g., linear time-series or Fourier-based approaches).
  4. We demonstrate that our methodology can be extended for short-term prediction of arrhythmic events, offering clinical relevance and new insights into predictive modeling of human physiological rhythms.

Novelty of our approach. Although the von Mises distribution and stochastic differential equations (SDEs) are well-established, the core novelty lies in unifying these techniques—circular Bayesian inference plus SDE-driven diffusion—into a single pipeline tailored for physiological data. Our framework:

  1. Preserves the circular geometry of phase angles while allowing for time-dependent stochastic variations in the rhythms.
  2. Exploits Bayesian hierarchical modeling to jointly estimate concentration parameters, mean directions, and diffusion coefficients, yielding comprehensive posterior distributions for all unknowns.
  3. Demonstrates strong empirical performance on arrhythmia detection, outperforming or matching prior techniques in sensitivity and specificity.

5 Proposed methodology for rhythmic behaviors of human physiological systems

In this section, we enhance the statistical modeling of human physiological rhythms by incorporating more sophisticated mathematical tools and providing detailed explanations. We delve deeper into multivariate circular distributions, stochastic differential equations on manifolds, advanced synchronization measures, and Bayesian estimation methods for circular data [39].

5.1 Enhanced multivariate circular modeling

We consider the modeling of p interacting physiological rhythms using advanced multivariate circular distributions on the torus . Let denote the vector of phases at time t, where each .

5.1.1 Multivariate von Mises distribution.

The multivariate von Mises distribution [33, 34, 39], also known as the von Mises-Fisher distribution on the torus, extends the univariate von Mises distribution to model dependencies between circular variables. The probability density function (pdf) is given by [3, 40, 41]:

where: is the mean direction vector, is the concentration parameter, is a positive-definite concentration matrix capturing dependencies, is the normalization constant [4, 53].

This distribution accounts for the interaction between multiple rhythms by modeling the dependencies through the concentration matrix . Off-diagonal elements of represent the strength and direction of the coupling between rhythms.

5.1.2 Estimation of parameters.

Given observations , we estimate the parameters , , and using maximum likelihood estimation (MLE). The log-likelihood function is:

We maximize numerically due to the complexity introduced by the normalization constant and the dependency structure.

5.2 Stochastic differential equations on manifolds

We model the temporal evolution of the phase vector using stochastic differential equations on the torus , which is a compact Riemannian manifold.

5.2.1 Manifold-valued stochastic processes.

Let evolve according to the following SDE on :

where: is the natural frequency vector of the rhythms, is a positive-definite diffusion matrix, is a p-dimensional Wiener process.

The SDE accounts for both the deterministic progression of the phases (through ) and the stochastic fluctuations (through ).

5.2.2 Numerical integration on the torus.

We use the Euler- Maruyama method adapted for manifolds to simulate trajectories of . At each time step , we update:

where .

5.3 Proposed synchronization measures.

Beyond the basic synchronization index, we employ more sophisticated measures to quantify the synchronization between rhythms.

5.3.1 Phase Locking Value (PLV).

The PLV between two rhythms and is defined as:

where N is the number of time points. PLV ranges from 0 (no synchronization) to 1 (perfect synchronization).

5.3.2 Mutual information on the circle.

We calculate the mutual information between two circular random variables to assess nonlinear dependencies:

where is the joint probability density function, and , are the marginal densities.

5.3.3 Directional phase synchronization index.

We define the directional phase synchronization index (DPSI) to account for the direction of synchronization:

DPSI provides information about the consistent phase difference between rhythms.

5.4 Bayesian estimation for circular data

We adopt a Bayesian framework to estimate model parameters, incorporating prior knowledge and yielding full posterior distributions.

5.4.1 Bayesian model specification.

Assuming a von Mises likelihood for each phase observation:

We assign prior distributions:

where a and b are hyperparameters reflecting prior beliefs about concentration.

5.4.2 Posterior inference.

Using Bayes’ theorem, the posterior distribution is proportional to:

We employ Markov Chain Monte Carlo (MCMC) methods to sample from the posterior.

5.5 Hypothesis testing with circular data

5.5.1 Nonparametric tests.

The Watson’s Two-Sample Test compares two samples of circular data without assuming specific underlying distributions.

Test statistic.

where:

  1. is the total sample size, with n1 and n2 representing the sizes of the two groups being compared.
  2. K is the number of distinct circular observations.
  3. and represent the empirical distribution functions of the two samples at observation .
  4. D is a correction factor to account for sampling variability, often defined as:ensuring that the test statistic accounts for the differences between the two groups’ empirical distributions relative to their pooled distribution.

The Watson’s test is a nonparametric test for detecting differences in the distribution of circular data. This test is particularly useful when comparing two independent samples of angular data without assuming underlying parametric distributions. The test statistic is distributed asymptotically under the null hypothesis and critical values can be derived from the Watson distribution.

Permutation tests. Permutation tests are employed as a nonparametric alternative to assess the significance of the observed test statistic . The group labels for each sample are shuffled multiple times, and the test statistic is recomputed for each permutation. The empirical p-value is calculated as the proportion of permuted test statistics that exceed the observed value.

The steps for a permutation test are as follows:

  1. Combine the two samples and into one pooled dataset.
  2. Randomly permute the group labels of the combined data.
  3. Compute the statistic for each permutation.
  4. Repeat the process N times to build an empirical distribution of under the null hypothesis.
  5. Calculate the p-value as the fraction of permutations where the permuted exceeds the observed .

This approach allows for the assessment of the null hypothesis, where no significant difference exists between the two circular data samples.

6 Simulation study

6.1 Simulation study for Bayesian estimation for circular data

In this subsection, we adopt a Bayesian framework to estimate the parameters of a von Mises distribution for circular data. We simulate a dataset from a von Mises distribution and use a custom Metropolis-Hastings algorithm for parameter estimation. Specifically, we estimate the mean direction and concentration parameter of the von Mises distribution.

6.1.1 Simulation of circular data.

We simulate N = 100 observations from a von Mises distribution with known parameters. The von Mises distribution is characterized by its mean direction and concentration parameter , which controls how concentrated the data is around . The probability density function for the von Mises distribution is given by [54]:

where is the modified Bessel function of the first kind and order 0.

For our simulation, we set the true values of the parameters as:

We simulate a sample of size N = 100 from this distribution, representing angular measurements, such as the direction of a biological rhythm.

6.1.2 Bayesian model specification.

We model the observations using a von Mises likelihood:

where and are the unknown parameters to be estimated.

For the prior distributions, we assume the following:

where the hyperparameters a = 2 and b = 1 for the gamma distribution reflect our prior beliefs about the concentration parameter .

6.1.3 Posterior inference via metropolis-hastings algorithm.

The posterior distribution of and is proportional to the product of the likelihood and the prior:

Since the posterior does not have a closed form, we use the Metropolis-Hastings algorithm, a Markov Chain Monte Carlo (MCMC) method, to sample from the posterior distribution. The proposal distributions for and are Gaussian, and we iteratively accept or reject proposed samples based on the Metropolis acceptance criterion.

We run the algorithm for 5000 iterations, initializing at and at 1.0. The algorithm generates samples from the posterior distribution of and , allowing us to estimate these parameters.

6.1.4 Results and discussion.

The MCMC trace plots for the parameters and are shown in Fig 1. This combined plot displays the sampled values of and across iterations, with the true values of and marked as red dashed lines. The convergence of the chains indicates that the algorithm is exploring the posterior distribution effectively.

thumbnail
Fig 1. Combined trace plots for and over 5000 iterations.

The red dashed lines indicate the true values of and .

https://doi.org/10.1371/journal.pone.0324741.g001

Fig 1 shows that the sampled values of and fluctuate around the true values, indicating good convergence. The traces suggest that the posterior distribution has been adequately explored.

Posterior summaries. We compute the posterior mean estimates for and by averaging the MCMC samples. The results are as follows:

These estimates are close to the true parameter values, demonstrating the accuracy of the Bayesian inference procedure.

6.1.5 Significance of Bayesian estimation.

The Bayesian approach provides a robust framework for estimating circular data parameters. It allows us to incorporate prior parameter knowledge and compute full posterior distributions. This is particularly useful when the data is sparse or noisy, and when uncertainty quantification is essential.

Our simulation study shows that the posterior mean estimates of and are close to the true values, and the MCMC chains demonstrate good convergence. By examining the trace plots, we can assess the quality of the posterior samples and ensure that the inference is reliable.

Table 1 summarizes the posterior mean estimates of and alongside the true values used in the data simulation. The estimates closely match the true values, confirming the effectiveness of the Bayesian estimation method.

thumbnail
Table 1. Posterior estimates for and compared with the true values used in the simulation.

https://doi.org/10.1371/journal.pone.0324741.t001

6.2 Simulation study for hypothesis testing with circular data

We design a simulation study to evaluate the performance of Watson’s test and permutation tests on circular data. For this study, we generate N = 500 observations from two von Mises distributions with distinct mean directions and concentration parameters. We then compare the two samples using Watson’s test and the permutation test.

6.2.1 Simulation setup.

We simulate two samples of circular data from von Mises distributions as follows:

  1. Sample 1: N1 = 250 observations with mean direction and concentration parameter .
  2. Sample 2: N2 = 250 observations with mean direction and concentration parameter .

We compute the test statistic and apply the permutation test to assess whether the mean directions of the two samples are significantly different.

6.2.2 Results and interpretation.

The hypothesis test results show a significant difference between the mean directions of the two samples. The observed value is greater than the critical value for the test at the significance level, leading us to reject the null hypothesis that the two samples come from the same distribution.

Additionally, the permutation test yields a p-value of p<0.01, confirming the result from Watson’s test. The simulation demonstrates the efficacy of these nonparametric methods for detecting differences in circular data.

6.2.3 Visualization of results.

Fig 2 shows the circular histograms for the two samples. The differences in the mean directions are visually apparent, with the first sample concentrated around and the second sample around .

thumbnail
Fig 2. Circular histograms of the two von Mises samples.

Sample 1 is centered around (blue), and Sample 2 is centered around (red). The histograms clearly show the distinct mean directions of the two samples.

https://doi.org/10.1371/journal.pone.0324741.g002

The permutation distribution of is displayed in Fig 3, with the observed value of highlighted. The observed statistic falls in the tail of the permutation distribution, further supporting the rejection of the null hypothesis.

thumbnail
Fig 3. Permutation distribution of Watson’s statistic.

The observed test statistic (dashed line) lies in the extreme tail of the permutation distribution, indicating a significant difference between the two samples.

https://doi.org/10.1371/journal.pone.0324741.g003

Together, these plots demonstrate the power of the nonparametric methods in detecting differences between samples of circular data.

7 Simulation and analysis of rhythmic behavior of human physiological systems

This section details the simulation of three human physiological rhythms using circular statistics, particularly focusing on the von Mises distribution. We simulate dependent rhythmic data and estimate key parameters, including the mean direction () and concentration parameter (). We also analyze synchronization between the rhythms using Phase Locking Value (PLV) and Mutual Information (MI).

7.1 Simulating rhythms using von Mises distributions

We simulate three physiological rhythms, modeled as angular data on the unit circle using the von Mises distribution. The probability density function of the von Mises distribution is given by:

where: is the mean direction, is the concentration parameter, and is the modified Bessel function of the first kind.

In the simulation, the true values of and for each rhythm are:

We introduce controlled correlations between the rhythms by adding a latent variable, which modifies the phases of Rhythms 2 and 3.

Interpretation: In Fig 4, we observe the phase distributions of the three rhythms. The rhythm with the largest concentration parameter () shows a tighter clustering of phase values, while the rhythm with is more dispersed around its mean direction.

thumbnail
Fig 4. Circular Histogram of Simulated Rhythms.

The distribution of phases for each rhythm is shown, highlighting the different concentration parameters.

https://doi.org/10.1371/journal.pone.0324741.g004

7.2 Parameter estimation

We estimate the mean direction () and concentration parameter () for each rhythm using sample statistics. The estimated mean direction is calculated using the mean resultant vector:

with:

The concentration parameter is estimated using an approximation based on R.

Interpretation: Fig 5 compares each rhythm’s true and estimated values of . Although Rhythms 2 and 3 have accurate estimates, the estimation for Rhythm 1 shows a significant deviation due to the circular nature of the data, as the estimate wraps around .

thumbnail
Fig 5. Comparison of Estimated and True Mean Directions () for Each Rhythm.

Dashed lines represent the estimated values, and solid lines represent the true values.

https://doi.org/10.1371/journal.pone.0324741.g005

7.3 Comparison of true and estimated parameters

Table 2 compares each rhythm’s true and estimated parameters.

thumbnail
Table 2. Comparison of True and Estimated Parameters for Rhythms.

https://doi.org/10.1371/journal.pone.0324741.t002

Interpretation: From Table 2, we see that the estimated mean direction for Rhythms 2 and 3 closely matches the true values, while Rhythm 1 shows a large deviation due to the wrap-around effect at . The estimates for , however, show noticeable deviations for Rhythms 2 and 3, where the concentration parameters are underestimated, indicating higher variability in the data than expected.

7.4 Synchronization measures: Phase locking value and mutual information

We compute the Phase Locking Value (PLV) and Mutual Information (MI) to analyze the synchronization between the rhythms. The PLV between two rhythms is calculated as:

and the MI is computed using the joint and marginal distributions of the phase values.

Interpretation: In Fig 6, we observe that the PLV between Rhythms 1 and 2 and Rhythms 1 and 3 are relatively low, indicating weak phase synchronization between these rhythms. As expected, the diagonal entries represent the self-synchronization (i.e., PLV = 1).

thumbnail
Fig 6. Heatmap of Phase Locking Value (PLV) Between Rhythms.

Higher values indicate stronger phase synchronization between the rhythms.

https://doi.org/10.1371/journal.pone.0324741.g006

Interpretation: Fig 7 shows the mutual information between the rhythms. As expected, the mutual information between Rhythms 1 and 2, and Rhythms 1 and 3, is relatively low, confirming weak dependencies between these rhythms. The diagonal entries show the self-information of each rhythm, which is much higher, reflecting their intrinsic variability.

thumbnail
Fig 7. Heatmap of Mutual Information (MI) Between Rhythms.

Higher values indicate stronger dependencies between rhythms.

https://doi.org/10.1371/journal.pone.0324741.g007

The simulation results highlight the complexity of rhythmic behavior in physiological systems. While the mean directions are well-estimated for most rhythms, the concentration parameters show larger deviations. The synchronization analysis via PLV and MI confirms weak phase locking and dependencies between the rhythms. These findings suggest that further model refinement could improve parameter estimation and synchronization analysis.

7.5 Stochastic temporal evolution of rhythms (wrapped phases)

In this section, we simulate the stochastic temporal evolution of three distinct physiological rhythms using a stochastic differential equation (SDE) defined as:

(1)

where is the angular drift and captures diffusion due to biological noise. The coupled case incorporates synchrony terms, e.g.,

inspired by Kuramoto-type coupling dynamics.

Where represents the phase of the i-th rhythm, is the angular frequency, is the diffusion coefficient, and dBi(t) is a Brownian motion (Wiener process). The true parameters for the system are:

The simulation was carried out over N = 1000 time steps with a step size of dt = 0.01, resulting in a total duration of T = 10 time units. The phases were wrapped to the interval , and the results of the simulation are visualized in Fig 8.

thumbnail
Fig 8. Stochastic Temporal Evolution of Phases on a Circular Axis.

The plot displays the wrapped phase evolution of three rhythms over time, comparing true and estimated parameters shown in the Table 3.

https://doi.org/10.1371/journal.pone.0324741.g008

thumbnail
Table 3.

Comparison of True and Estimated Parameters for Stochastic Temporal Evolution (Wrapped Phases).

https://doi.org/10.1371/journal.pone.0324741.t003

In Fig 8, the phase trajectories of each rhythm are plotted on a circular axis, and time progresses outward along the radial axis. This allows us to visualize the periodic nature of the rhythms as they evolve stochastically.

Parameter estimation: By unwrapping the phases and analyzing the temporal increments, we estimated the angular frequency and the diffusion coefficient for each rhythm. Table 3 summarizes the comparison between true and estimated parameters.

Interpretation: The plot in Fig 8 shows the evolution of wrapped phases over time. The parameter estimates and align closely with the true values, confirming that the stochastic model effectively captures the temporal dynamics of the rhythms. The wrapped representation allows us to visualize the periodic behavior, while the unwrapped estimates accurately measure the underlying angular frequencies and diffusion coefficients.

7.6 Handling outliers and missing data

Data irregularities like outliers and missing segments are inevitable in real-world physiological signals such as ECG. We describe below our treatment strategies integrated into the modeling pipeline:

Outlier handling. Outliers in circular data typically manifest as phase angles with sudden, large deviations from the dominant rhythm. Given the angular nature, we compute circular deviations from the estimated mean phase using:

Observations with (i.e., more than 90° away from ) are considered extreme. Such values are either:

  • truncated to the boundary value (e.g., ), or
  • assigned lower weights via a circular kernel weighting scheme during estimation of model parameters:

Missing data imputation. Short-duration signal losses are common due to sensor noise or transmission failure. Since phase extraction via Hilbert transform requires continuous signal input, we pre-process missing segments using:

  • Spline Interpolation: Cubic splines are used to interpolate small gaps in amplitude before phase computation.
  • Phase Bridging: If phase values and are available but intermediate values are missing, we linearly interpolate on the unit circle:

7.7 Robustness analysis under varying sample sizes and noise levels

To address the generalizability of our method, we conducted a comprehensive robustness analysis by simulating physiological phase trajectories under varying conditions. Specifically, we studied the accuracy of estimating the drift parameter and diffusion coefficient under different:

  • Sample sizes:
  • Noise levels: modeled via scaling of the diffusion term

For each configuration, we generated stochastic phase trajectories via circular stochastic differential equations (SDEs) and then estimated the drift and diffusion from the unwrapped phase increments. Estimation errors were computed as absolute differences from the known ground truth. This process was repeated across all rhythms and configurations.

Table 4 presents the mean absolute errors in estimating and across all rhythms for each combination of sample size and noise level.

thumbnail
Table 4. Mean absolute estimation errors in and under different noise levels and sample sizes. Results are averaged across all simulated rhythms.

https://doi.org/10.1371/journal.pone.0324741.t004

We observe that:

  • Estimation errors for both and decrease consistently with larger sample sizes.
  • Noise has a greater effect on the estimation of than , particularly for small N.
  • The method remains robust, with mean estimation errors below 0.03 (for ) and 0.005 (for ) in typical scenarios like N = 1000, noise scale  = 0.5.

To visualize the variability across all rhythms, boxplots for estimation errors in and are presented in Fig 9 and Fig 10, respectively.

thumbnail
Fig 9. Boxplot of absolute estimation error in across rhythms.

Estimation improves with increasing N, and errors are more sensitive to noise at lower N.

https://doi.org/10.1371/journal.pone.0324741.g009

thumbnail
Fig 10. Boxplot of absolute estimation error in across rhythms.

Errors remain relatively low and consistent even under high noise.

https://doi.org/10.1371/journal.pone.0324741.g010

7.8 Implications

This robustness analysis strengthens the validity of our proposed circular SDE-based approach for physiological phase modeling. Even under reduced sample sizes and elevated stochasticity, the estimation of key model parameters remains accurate and stable. These results also demonstrate that the method is viable for low-resolution or noisy real-world physiological data, such as wearable ECG signals in mobile health applications.

8 Application on real data (the MIT-BIH arrhythmia dataset)

8.1 Dataset overview

For this analysis, we utilized the MIT-BIH Arrhythmia Database, a publicly available dataset of electrocardiogram (ECG) recordings collected from patients for arrhythmia detection. Specifically, we analyzed record number 100, which contains a single-channel ECG signal sampled at 360 Hz. The primary objective of this analysis was to model the stochastic behavior of the physiological rhythms inherent in the ECG signal using advanced circular statistical methods, including the von Mises distribution and Bayesian inference.

The analysis is centered around the extraction of phase information from the ECG signal, testing the fit of the von Mises distribution to the data, and estimating parameters such as the mean phase direction () and the concentration parameter () using Bayesian Markov Chain Monte Carlo (MCMC) methods.

8.2 Data retrieval method

The ECG data was accessed through the wfdb package in Python, which interfaces with the PhysioNet database.

Following the acquisition of the first 1000 data points from record 100, the ECG signal was isolated through analysis implemented in Python.

The signal was normalized and processed to extract phase information using the Hilbert Transform. Let x(t) represent the ECG signal, then the analytic signal is defined as:

where is the Hilbert transform of x(t). The instantaneous phase of the signal is given by:

These phases form the circular data on which the subsequent analysis is based.

8.3 Analysis and methodology

8.3.1 Stochastic temporal evolution.

To account for the random variability in the ECG rhythm, we modeled the temporal evolution of the phase using a Stochastic Differential Equation (SDE). The phase evolution was simulated using the Euler-Maruyama method, following the SDE:

where represents the drift term (a deterministic component of the rhythm), is the diffusion coefficient (representing random fluctuations), and Bt is standard Brownian motion. This model captures the stochastic nature of physiological rhythms.

Interpretation: Fig 11 illustrates the evolution of the ECG rhythm phase over time. The red curve represents the stochastic phase trajectory. The ECG rhythm exhibits regular progression (due to the drift ), but the added stochastic noise introduces variability, reflecting the physiological irregularities seen in real-life ECG signals.

thumbnail
Fig 11. Stochastic Temporal Evolution of the ECG Phase.

The simulated evolution accounts for both deterministic drift and random fluctuations over time.

https://doi.org/10.1371/journal.pone.0324741.g011

8.3.2 Bayesian estimation of von Mises parameters.

We assume the phase data follows a von Mises distribution, characterized by its mean direction and concentration parameter . The probability density function (pdf) of the von Mises distribution is given by:

where is the modified Bessel function of the first kind. The parameters and are estimated using Bayesian inference, with the following prior distributions:

where a = 2 and b = 0.5 are hyperparameters of the Gamma distribution, reflecting prior beliefs about the concentration.

8.3.3 MCMC sampling.

We employ the Metropolis-Hastings algorithm, a Markov Chain Monte Carlo (MCMC) method, to sample from the posterior distribution of and . The posterior distribution is proportional to the product of the likelihood and prior:

The log-posterior is computed, and samples are drawn iteratively by proposing new values for and using normal random walks. Acceptance is determined based on the Metropolis-Hastings criterion. After running the MCMC sampler for 5000 iterations, we extract the posterior distributions of and .

Interpretation: In Fig 12, the left panel shows a rose plot of the ECG phase data () with the posterior distribution of overlaid in purple. The circular mean of is indicated by the red arrow. The right panel displays the posterior distribution of , showing the uncertainty in the concentration parameter. The posterior suggests a moderate concentration around the mean direction .

thumbnail
Fig 12. (Left) Rose Plot of the ECG Phase Data () with the Posterior Distribution of .

The red arrow represents the circular mean of the posterior for . (Right) Posterior distribution of the concentration parameter .

https://doi.org/10.1371/journal.pone.0324741.g012

The estimated parameters are: Estimated = 3.308,   Estimated =0.487.

8.3.4 Goodness-of-fit testing.

To evaluate the suitability of the von Mises distribution for modeling the ECG phase data, we applied two goodness-of-fit assessments:

  1. Watson’s Test: This nonparametric test examines whether the circular data follows a uniform distribution. A higher value suggests deviation from uniformity, potentially indicating that the data fits well with a von Mises distribution, as it is not uniformly distributed.
  2. Q-Q Plot: We compared the empirical quantiles of the real ECG phase data to those from a von Mises distribution generated using the estimated parameters and .

The Watson’s statistic, calculated for the ECG phase data, yielded: .

This relatively large value implies a substantial deviation from uniformity, reinforcing the hypothesis that the data aligns well with a von Mises distribution rather than being uniformly distributed.

Interpretation: In Fig 13, the Q-Q plot illustrates the relationship between the empirical quantiles of the real ECG phase data and those of the fitted von Mises distribution. The alignment of points near the 45-degree reference line suggests a good fit of the von Mises model to the ECG phase data. The significant deviation from uniformity, as indicated by the test, and the alignment observed in the Q-Q plot, collectively support the appropriateness of the von Mises distribution for this dataset.

thumbnail
Fig 13. Q-Q Plot of Real ECG Phases vs. Fitted von Mises Distribution.

The red dashed line represents the 45-degree line for reference.

https://doi.org/10.1371/journal.pone.0324741.g013

8.3.5 Phase extraction and polar histograms.

For comparison, a simulated rhythm was generated using a von Mises distribution, a common model for periodic data with and estimated kappa from the circular dataset . The probability density function of the von Mises distribution is given by:

where is the mean direction, and controls the concentration around the mean direction.

The extracted phases of the ECG signal () and the simulated rhythm () were plotted using polar histograms to visualize the phase distribution.

Interpretation: The polar histograms in Fig 14 reveal that the ECG phase () is distributed over a range of values, but it shows a slight preference around certain phase angles. The simulated von Mises rhythm () exhibits a more concentrated distribution centered around its mean. The overlap between the two histograms suggests that both rhythms have similarities in their periodic behavior, but the ECG rhythm contains more variability, likely due to physiological noise.

thumbnail
Fig 14. Polar Histogram of the ECG Phase () and Simulated Rhythm ().

The ECG phase is shown in blue, and the simulated rhythm is shown in green. Overlapping areas indicate similar phase distributions.

https://doi.org/10.1371/journal.pone.0324741.g014

This real data analysis demonstrates how advanced statistical techniques can be applied to real-world physiological signals, including circular statistics and stochastic modeling. By extracting phase information from ECG signals and applying stochastic models, we can better understand the temporal variability in physiological rhythms. Such insights are essential in medical research, particularly for diagnosing and understanding arrhythmias and other heart-related conditions. Furthermore, combining empirical data and simulation allows us to validate models and quantify uncertainty in parameter estimates.

Overall, this analysis highlights the potential of circular statistical methods in analyzing time-series data from physiological systems, providing tools to handle the inherent periodicity and variability in such signals.

9 Analysis of rhythmic behaviors (the MIT-BIH arrhythmia dataset)

This section analyzes the rhythmic behavior of two physiological signals obtained from the MIT-BIH Arrhythmia Database. Specifically, we focus on two channels of ECG data from Record 100, which represent two different physiological rhythms. The stochastic temporal evolution of two physiological rhythms extracted from the MIT-BIH Arrhythmia Database. Using the Hilbert transform, we obtain the instantaneous phase information from the ECG signals, allowing us to model the phase dynamics as a stochastic diffusion process. We employ techniques from directional statistics to extract and analyze the phases of these rhythms, compute synchronization measures, and interpret the results. We include the following metrics for quantifying the interaction between the two rhythms: Phase Locking Value (PLV), Mutual Information (MI), and Directional Phase Synchronization Index (DPSI). Furthermore, we estimate the parameters of the stochastic diffusion process, such as angular frequency () and diffusion coefficient (). Graphical representations of the phase distributions, phase differences, and interaction measures support the analysis.

9.1 Instantaneous phase extraction using Hilbert transform and Stochastic temporal evolution

The two ECG signals, x1(t) and x2(t), are normalized and then processed using the Hilbert transform to extract their instantaneous phases, and , respectively. For each signal xi(t), the analytic signal zi(t) is obtained by:

where represents the Hilbert transform of xi(t), and j is the imaginary unit. The instantaneous phase is then computed as:

These phases are wrapped to the interval to account for their circular nature, which is crucial for the subsequent analysis.

Here, zi(t) represents the analytic signal of the normalized ECG signals, and is wrapped to the interval . This phase information allows us to model the time evolution of each rhythm using a stochastic differential equation (SDE) of the form:

(2)

where is the angular frequency (drift term), is the diffusion coefficient, and dBi(t) is a standard Brownian motion.

The simulation of this process is performed using the Euler-Maruyama method, which updates the phases over time as:

where is a normally distributed random variable representing stochastic fluctuations in the system.

As shown in Fig 15, the phase trajectories of the two rhythms fluctuate over time due to the stochastic nature of the process. The wrapping of the phases within is consistent with the circular nature of angular data.

thumbnail
Fig 15. Stochastic temporal evolution of Rhythm 1 and Rhythm 2 phases.

The phases evolve over time under the influence of deterministic drift and stochastic fluctuations.

https://doi.org/10.1371/journal.pone.0324741.g015

The evolution is simulated using the Euler-Maruyama method for 1000 time steps, with the phases wrapped onto the interval after each update. The polar plot below shows the phase on the angular axis, while the radial axis represents time.

The plot in Fig 16 shows the stochastic temporal evolution of the two physiological rhythms. The evolution of the phases is influenced by both deterministic drift (represented by the angular frequency ) and stochastic diffusion (controlled by ).

thumbnail
Fig 16. Stochastic Temporal Evolution of the Phases of Rhythm 1 and Rhythm 2 on a Circular Plot.

The radial axis represents time, and the angular axis represents the phase of each rhythm.

https://doi.org/10.1371/journal.pone.0324741.g016

In Fig 16, the radial axis denotes time, while the angular position represents the phase of the rhythm at each time step. The stochastic diffusion coefficients and introduce random fluctuations in the phase, leading to non-uniform trajectories over time.

9.2 Stochastic temporal evolution of the phases on a circular plot

To visualize the temporal evolution of the phases for both rhythms, we employ a circular plot where the radial axis represents time and the angular axis represents the phase of each rhythm. The stochastic differential equation governs the time evolution of the phases 1.

The stochastic temporal evolution of Rhythm 1 and Rhythm 2 is shown in Fig 16. The circular nature of the plot reflects the periodic nature of the rhythms, while the radial axis indicates the progression of time.

As can be observed from the plot, the phases of both rhythms evolve over time, with fluctuations arising due to the stochastic nature of the process. The trajectories are wrapped within the interval to reflect the periodicity of the phases.

This visualization provides insights into how the phases of the rhythms vary over time, with the angular position on the circular plot representing the current phase and the radial distance representing the time elapsed. This type of plot is particularly useful in understanding the temporal synchronization and phase shifts between multiple oscillatory processes.

9.2.1 Parameter estimation.

To estimate the parameters of the fitted stochastic diffusion process, we calculate the drift () and diffusion () for each rhythm. Using the unwrapped phases, we estimate as the mean change in phase per unit time and as the standard deviation of phase increments:

The estimated parameters are presented in Table 5.

thumbnail
Table 5. Estimated Parameters of the Stochastic Diffusion Process for Rhythm 1 and Rhythm 2.

https://doi.org/10.1371/journal.pone.0324741.t005

The estimated parameters demonstrate the underlying dynamics of the stochastic diffusion process, with representing the angular frequency of the rhythm and accounting for the stochastic fluctuations in phase.

9.3 Synchronization metrics

Phase Locking Value (PLV).

The Phase Locking Value (PLV) measures phase synchronization between two rhythmic signals. It quantifies the consistency of the phase difference between the two signals across time. The PLV between two signals with phases and is defined as [32]:

where N is the total number of time points. A PLV close to 1 indicates strong phase synchronization, while a PLV near 0 indicates weak or no synchronization.

Mutual Information (MI).

Mutual Information (MI) measures the amount of shared information between the phases of two signals, capturing both linear and nonlinear dependencies. The MI between two circular random variables and is given by:

where is the joint probability density function of and , and and are the marginal densities.

Directional Phase Synchronization Index (DPSI).

The Directional Phase Synchronization Index (DPSI) measures the directional phase difference between two signals. It is defined as the argument of the average phase difference:

A DPSI value near zero indicates that the two signals are synchronized with a constant phase difference, while larger values indicate varying phase differences.

9.4 Results and discussion

We processed Record 100 from the MIT-BIH Arrhythmia Database and extracted two channels of ECG signals representing different physiological rhythms. The results of the synchronization metrics are as follows:

  1. Phase Locking Value (PLV): 0.7497, indicating a moderate degree of phase synchronization between the two rhythms.
  2. Mutual Information (MI): 1.1711, suggesting significant shared information between the two rhythms, capturing both linear and nonlinear dependencies.
  3. Directional Phase Synchronization Index (DPSI): -0.1384, which suggests that the phase difference between the two rhythms is relatively consistent with a slight directional offset.

In addition to the computed metrics, we present several graphical representations of the phase distributions and phase differences to further support our analysis.

Rose plot of Rhythm 1 and Rhythm 2. The rose plot in Fig 17 represents the phase distribution of Rhythm 1. The rose plot in Fig 18 represents the phase distribution of Rhythm 2, analogous to Rhythm 1. The angular positions correspond to the phase values, and the radial positions represent the frequency of the phases.

Rose plot of phase difference. The rose plot in Fig 19 represents the phase difference between the two rhythms. This plot provides insight into how often the two rhythms are in-phase or out-of-phase and the extent of phase locking between them.

thumbnail
Fig 19. Rose Plot of Phase Difference between Rhythm 1 and Rhythm 2.

https://doi.org/10.1371/journal.pone.0324741.g019

Mutual information heatmap. The heatmap in Fig 20 shows the joint distribution of the phases of the two rhythms. This plot is used to visualize the mutual information, highlighting areas where the phase values of the two rhythms are more dependent on each other.

thumbnail
Fig 20. Heatmap representing the joint distribution of the phases of Rhythm 1 and Rhythm 2, used for calculating Mutual Information.

https://doi.org/10.1371/journal.pone.0324741.g020

10 Comparisons, accuracy metrics, and predictive capability

To evaluate our proposed Bayesian circular stochastic differential equation (SDE) model—which is specifically designed to detect phase anomalies in ECG signals—we conducted a simulation study in which an ECG-like signal was generated with deliberate phase anomalies. In our simulation, abnormal beats are introduced by applying a (i.e., ) phase shift while keeping the amplitude nearly constant. This ensures that conventional amplitude-based methods (such as linear autoregressive (AR) and Fourier-based approaches) are unable to effectively detect these events. Our approach, by contrast, leverages circular statistics for parameter estimation and anomaly detection.

10.1 Simulation setup and methodology

Let the simulated ECG signal be given by:

where: f = 1 Hz is the heart rate frequency, is the phase function, with for normal beats and for abnormal beats, is additive Gaussian noise with .

The signal is sampled at fs = 360 Hz over a duration of T = 10 s. Abnormal beats are randomly introduced in 5% of the samples. The ground-truth binary label is defined as:

We compare three methods:

  1. Linear AR Model: An AR model (order 5) is fitted to the raw ECG signal, and abnormal beats are detected by thresholding the absolute prediction error. In our simulation, the threshold is set at the percentile of the error.
  2. Fourier-Based Approach: The signal is segmented into 1-second windows (with 50% overlap), and the power spectral density (PSD) is computed via FFT. A window is classified as abnormal if its PSD exceeds the percentile.
  3. Bayesian Circular SDE Model:
    • The instantaneous phase is extracted using the Hilbert transform:and wrapped to the interval .
    • To estimate the parameters of the SDE 1 we first unwrap to obtain and compute the increments mentioned with the equation (1) where . The drift and diffusion are then estimated as:In our simulation, we obtained
    • To reduce noise, a moving circular mean filter (with a window length of 5 samples) is applied to the phase.
    • Abnormal beats are then detected by computing the circular deviation from the overall circular mean:where

A sample is classified as abnormal if D(t)>t radians, where t is some pre-defined threshold.

10.2 Generated results and visualizations

The simulation produces several key outputs:

10.2.1 Quality metrics.

Tables 6 and 7 reports the quality metrics computed from the simulation:

thumbnail
Table 6. Comparison of Methods (Quality Metrics), for a threshold (3 radians) for the circular SDE model.

https://doi.org/10.1371/journal.pone.0324741.t006

thumbnail
Table 7. Comparison of Methods (Quality Metrics), a threshold (2 radians) for the circular SDE model.

https://doi.org/10.1371/journal.pone.0324741.t007

Note that precision, recall, and F1-score, accuracy all depends on the threshold. For threshold t = 3 radian, although the Bayesian SDE model exhibits a lower precision, recall, and F1-score than the AR model, our proposed model achieves the highest overall accuracy (91.25%). This high accuracy is attributable to the imbalanced nature of the data (with only 5% abnormal beats). Importantly, our Bayesian method is uniquely tailored to capture phase anomalies—an aspect that amplitude-based methods are not designed to detect. In this simulation, while the AR model achieves a high recall (92.78%), its low precision (18.58%) indicates a high false-positive rate. The Fourier-based approach performs poorly across all metrics.

10.2.2 ECG segment with abnormal beat detections.

Fig 21 shows a segment of the simulated ECG signal with the detected abnormal beats overlaid for each method.

thumbnail
Fig 21. ECG Segment with Abnormal Beat Detections.

Red circles denote detections by the AR model, blue crosses by the Fourier-based approach, and green triangles by the Bayesian circular SDE model. Note that our circular model is specifically designed to capture subtle phase anomalies.

https://doi.org/10.1371/journal.pone.0324741.g021

10.2.3 Rose plot of extracted phases.

Fig 22 illustrates the rose plot (circular histogram) of the extracted instantaneous phases, confirming the inherent circular geometry of the data [55].

thumbnail
Fig 22. Rose Plot of Extracted Phases.

The plot demonstrates that the phase data are intrinsically circular, which underpins the need for circular statistical methods.

https://doi.org/10.1371/journal.pone.0324741.g022

10.2.4 Short-term phase prediction.

Fig 23 displays a short-term phase prediction via our Bayesian SDE model’s Euler–Maruyama simulation. The simulated phase trajectory (blue markers) over a 0.5-second horizon is shown alongside the overall circular mean (gray dashed line).

thumbnail
Fig 23. Short-Term Phase Prediction via Bayesian SDE.

The Fig illustrates the forward simulation of the phase over a 0.5-second prediction horizon. This capability is crucial for anticipatory diagnostics in arrhythmia detection.

https://doi.org/10.1371/journal.pone.0324741.g023

10.3 Discussion

The simulation study highlights several important points:

  1. Intrinsic Circular Nature: The rose plot confirms that the instantaneous phase extracted from the ECG signal is circular. Traditional amplitude-based methods (AR and Fourier-based) do not leverage this structure, which is crucial for detecting phase anomalies.
  2. Parameter Estimation via Circular Statistics: By unwrapping the phase and computing the increments, we estimated the drift and diffusion parameters as
    These estimates are used for forward simulation and demonstrate that our approach derives meaningful model parameters from circular data.
  3. Detection Performance: Although the AR model shows higher recall (and thus a higher F1-score) in this simulation, its precision is relatively low due to numerous false positives. The Bayesian circular SDE model achieves the highest overall accuracy (91.25%), indicating that it correctly identifies a larger fraction of the normal beats. Moreover, our method is uniquely sensitive to phase deviations, which are not captured by conventional methods.
  4. Predictive Capability: The short-term prediction plot illustrates that our model can simulate future phase evolution based on the estimated dynamics. This capability is especially promising for clinical applications, where early warnings of arrhythmic events are essential.

It is important to emphasize that our proposed Bayesian circular stochastic differential equation (SDE) methodology represents a fundamentally novel framework tailored explicitly for circular statistical modeling of ECG waveforms, particularly emphasizing phase-based anomalies. Conventional approaches, such as linear autoregressive (AR) models and Fourier-based frequency-domain methods, are indeed well-established within ECG signal analysis. However, these traditional models inherently operate within an amplitude-based framework and do not explicitly capture or represent circular geometry or phase anomalies intrinsic to our approach.

Due to this essential conceptual difference, direct comparisons between our Bayesian circular SDE approach and standard methods (e.g., AR or Fourier methods) become potentially misleading. For instance, abnormalities characterized by sudden phase shifts—such as those explicitly modeled by our circular SDE framework—cannot meaningfully be detected or quantified by amplitude-based methods, leading either to inflated performance metrics or complete failure to recognize the anomalies. In other words, the metrics derived from standard methods do not adequately reflect their capability to detect the circular nature of arrhythmic events addressed by our methodology.

While the current quality metrics (especially precision, recall, and F1-score) for the Bayesian SDE model are modest—primarily due to the imbalanced nature of the simulation—the overall accuracy and the ability to capture circular phenomena underscore the potential of our approach. In practice, further refinement of the decision threshold and incorporation of full Bayesian posterior information into a decision framework are expected to enhance these metrics substantially. Our study demonstrates that comparing our method with traditional amplitude-based techniques is inherently challenging because the latter do not address the circular structure of the data. This reinforces the necessity of developing dedicated circular statistical methodologies for physiological rhythm analysis.

11 Discussion, limitations and future directions

Applying circular statistical methods to physiological rhythms provides a unique perspective on understanding the temporal dynamics of human biological systems. Our framework successfully captures the interdependencies and inherent randomness in physiological cycles, which is crucial for developing insights into synchronization and variability among systems. By modeling the data as circular variables, we preserve the cyclic properties of the rhythms, enabling us to explore new avenues for analyzing periodic data. Our analysis of the MIT-BIH Arrhythmia Dataset highlights the potential of our proposed methodologies in capturing the variability of ECG phases. Furthermore, Bayesian inference allowed us to estimate key parameters accurately, providing a deeper understanding of the rhythm’s phase coherence and concentration. Watson’s test further affirmed the suitability of our model for circular data, as the empirical results aligned well with the von Mises fit. While the proposed methodology demonstrates significant promise, it also reveals areas for future investigation. In particular, the multivariate extension of the wrapped normal distribution provides a powerful tool for studying interactions between rhythms. Nonetheless, further work is needed to refine the estimation techniques for the covariance matrix in high-dimensional settings.

The results indicate a moderate degree of phase synchronization between the two rhythms, as evidenced by the PLV score of 0.7497. The Mutual Information value of 1.1711 further corroborates significant shared information between the two rhythms, reflecting both linear and nonlinear dependencies. The DPSI value of -0.1384 indicates a slight phase offset between the rhythms, but their overall phase difference remains relatively consistent.

The rose plots provide further visual confirmation of these findings. Both rhythms exhibit similar phase distributions, and the phase difference plot shows that the rhythms are largely synchronized.

The circular plot illustrates how the phases of both rhythms evolve over time. Rhythm 1 (blue) has a slightly slower angular frequency , leading to a slower accumulation of phase compared to Rhythm 2 (green, with ). The stochastic component introduces random deviations in the phase trajectory, creating variability in the temporal evolution, which can be observed as irregularities in the plot. Analyzing the stochastic temporal evolution of physiological rhythms and the computation of phase synchronization metrics provides valuable insights into the underlying interactions between different physiological processes. The estimated angular frequencies and diffusion coefficients demonstrate the variability in phase dynamics, while the PLV, MI, and DPSI metrics highlight the presence of synchronization and dependencies between the rhythms.

In future work, we plan to refine the estimation methods for the diffusion process and extend the analysis to additional physiological signals.

in principle, we can allow: where and are low-order stochastic processes. This would capture more complicated time-varying frequency or diffusion, though it introduces additional complexities in parameter estimation. As a future work, we highlight this possibility as a promising future direction, especially for highly non-stationary ECG segments.

While our proposed Bayesian circular SDE framework effectively models phase dynamics in ECG signals, the current study is intentionally focused on cardiac rhythm analysis. This narrow scope limits generalizability to other physiological domains such as respiratory or neural rhythms, which often exhibit more complex or multiscale oscillatory behavior.

  • Respiratory signals: Phase modeling of breathing cycles, particularly under irregular respiration or sleep apnea conditions, where amplitude and frequency both fluctuate.
  • Neural oscillations: Application to brain signals (e.g., EEG), capturing transient phase synchrony, entrainment, and disruptions during cognitive tasks or epileptic episodes.
  • Multimodal fusion: Combining phase information across multiple physiological signals using a hierarchical circular Bayesian model for joint rhythm monitoring.

12 Conclusion

In this work, we introduced a Bayesian circular SDE framework for modeling the stochastic evolution of cardiac phase derived from ECG signals. By focusing on the phase domain rather than amplitude, our approach detects arrhythmic anomalies that are subtle and often missed by traditional linear or frequency-based methods.

Simulation experiments using phase-shifted synthetic ECG data demonstrate the utility of our approach. Compared to the AR model (F1-score: 0.309) and Fourier-based methods (F1-score: 0.070), our Bayesian circular SDE model achieved higher accuracy (91.25%) and showed competitive or superior performance in scenarios involving phase-only anomalies. Additionally, we highlighted the model’s short-term predictive capability and visualized results through rose plots and circular histograms.

The study primarily addresses ECG signals and assumes high-quality phase extraction via the Hilbert transform. It does not explicitly model signal noise or handle multiscale phase variability seen in neural or respiratory data.

We aim to extend the framework to respiratory and neural signals, where circular phase dynamics also play a key role. Hierarchical modeling of joint circular rhythms, robust inference in noisy conditions, and real-time detection using sequential Bayesian updating (e.g., particle filters) are promising directions for clinical application.

Overall, our work lays the theoretical and computational foundation for the application of circular statistics in biomedical signal processing—filling an important gap in the existing literature.

Supporting information

This paper’s supplementary material, contained Mathematical Preliminaries, modeling framework, etc.

These materials offer essential context and details supporting the main manuscript.

https://doi.org/10.1371/journal.pone.0324741.s001

(PDF)

References

  1. 1. Anafi RC, Francey LJ, Hogenesch JB, Kim J. CYCLOPS reveals human transcriptional rhythms in health and disease. Proc Natl Acad Sci U S A. 2017;114(20):5312–7. pmid:28439010
  2. 2. Norouzpour A, Roberts TL. Fcirc statistic for steady-state evoked potentials; a generalized version of Tcirc2 statistic. Biomed Signal Process Control. 2024;87:105549.
  3. 3. Ghosh P, Chatterjee D, Banerjee A, Das SS. Do Magnetic murmurs guide birds? A directional statistical investigation for influence of Earth’s Magnetic field on bird navigation. PLoS One. 2024;19(6):e0304279. pmid:38837968
  4. 4. SenGupta A, Jammalamadaka SR. Topics in circular statistics. World Scientific Publishing Co. Pte. Ltd.; 2001.
  5. 5. Arendt J. Melatonin: characteristics, concerns, and prospects. J Biol Rhythms. 2005;20(4):291–303. pmid:16077149
  6. 6. Cohen AA, Milot E, Yong J, Seplaki CL, Fülöp T, Bandeen-Roche K, et al. A novel statistical approach shows evidence for multi-system physiological dysregulation during aging. Mech Ageing Dev. 2013;134(3–4):110–7. pmid:23376244
  7. 7. Davis M, West K, Bilms J, Morelen D, Suveg C. A systematic review of parent-child synchrony: It is more than skin deep. Dev Psychobiol. 2018;60(6):674–91. pmid:29900545
  8. 8. Glass L. Synchronization and rhythmic processes in physiology. Nature. 2001;410(6825):277–84. pmid:11258383
  9. 9. Goya-Esteban R, Barquero-Perez O, Figuera C, García-Alberola A, Rojo-Alvarez J. A group lasso based method for automatic physiological rhythm analysis. Comput Cardiol. 2017.
  10. 10. Klerman EB, Brager A, Carskadon MA, Depner CM, Foster R, Goel N, et al. Keeping an eye on circadian time in clinical research and medicine. Clin Transl Med. 2022;12(12):e1131. pmid:36567263
  11. 11. Palumbo R, Marraccini M, Weyandt L, Wilder-Smith O, McGee H, Liu S, et al. Interpersonal autonomic physiology: a systematic review of the literature. Personal Soc Psychol Rev. 2016;21(2):99–141.
  12. 12. Poggiogalle E, Jamshed H, Peterson CM. Circadian regulation of glucose, lipid, and energy metabolism in humans. Metabolism. 2018;84:11–27. pmid:29195759
  13. 13. Sato M, Matsuo T, Atmore H, Akashi M. Possible contribution of chronobiology to cardiovascular health. Front Physiol. 2014;4.
  14. 14. Wyse CA. Does human evolution in different latitudes influence susceptibility to obesity via the circadian pacemaker?: migration and survival of the fittest in the modern age of lifestyle-induced circadian desynchrony. Bioessays. 2012;34(11):921–4. pmid:22933057
  15. 15. Kaplan T, Cannon J, Jamone L, Pearce M. Modeling enculturated bias in entrainment to rhythmic patterns. PLoS Comput Biol. 2022;18(9):e1010579. pmid:36174063
  16. 16. Unosson M, Brancaccio M, Hastings M, Johansen AM, Finkenstädt B. A spatio-temporal model to reveal oscillator phenotypes in molecular clocks: Parameter estimation elucidates circadian gene transcription dynamics in single-cells. PLoS Comput Biol. 2021;17(12):e1009698. pmid:34919546
  17. 17. Stankovski T. Bayesian inference of time-evolving coupled systems in the presence of noise, tackling the inverse problem for non-autonomous systems: application to the life sciences. 2014. p. 37–74.
  18. 18. Zettinig O, Mansi T, Neumann D, Georgescu B, Rapaka S, Seegerer P, et al. Data-driven estimation of cardiac electrical diffusivity from 12-lead ECG signals. Med Image Anal. 2014;18(8):1361–76. pmid:24857832
  19. 19. Alcaine A, Mase M, Cristoforetti A, Ravelli F, Nollo G, Laguna P, et al. A multi-variate predictability framework to assess invasive cardiac activity and interactions during atrial fibrillation. IEEE Trans Biomed Eng. 2017;64(5):1157–68. pmid:27448337
  20. 20. Chow SM, Ferrer E, Hsieh F. Statistical methods for modeling human dynamics: an interdisciplinary dialogue. Routledge. 2011.
  21. 21. Asgari-Targhi A, Klerman EB. Mathematical modeling of circadian rhythms. Wiley Interdiscip Rev: Syst Biol Med. 2019;11(2):e1439.
  22. 22. Lian W, Talmon R, Zaveri H, Carin L, Coifman R. Multivariate time-series analysis and diffusion maps. Signal Process. 2015;116:13–28.
  23. 23. Roberts JA, Friston KJ, Breakspear M. Clinical applications of stochastic dynamic models of the brain, Part I: a primer. Biol Psychiatry Cogn Neurosci Neuroimaging. 2017;2(3):216–24. pmid:29528293
  24. 24. Lukarski D, Ginovska M, Spasevska H, Stankovski T. Time window determination for inference of time-varying dynamics: application to cardiorespiratory interaction. Front Physiol. 2020;11:341. pmid:32411009
  25. 25. Cannon J, Kaplan T. Inferred representations behave like oscillators in dynamic Bayesian models of beat perception. J Math Psychol. 2024;122:102869.
  26. 26. Luchinsky DG, Millonas MM, Smelyanskiy VN, Pershakova A, Stefanovska A, McClintock PVE. Nonlinear statistical modeling and model discovery for cardiorespiratory data. Phys Rev E Stat Nonlin Soft Matter Phys. 2005;72(2 Pt 1):021905. pmid:16196602
  27. 27. Harrison LM, David O, Friston KJ. Stochastic models of neuronal dynamics. Philos Trans R Soc Lond B Biol Sci. 2005;360(1457):1075–91. pmid:16087449
  28. 28. Metzner C, Schilling A, Traxdorf M, Schulze H, Krauss P. Sleep as a random walk: a super-statistical analysis of EEG data across sleep stages. Commun Biol. 2021;4(1):1385. pmid:34893700
  29. 29. Reppert SM, Weaver DR. Coordination of circadian timing in mammals. Nature. 2002;418(6901):935–41. pmid:12198538
  30. 30. Deco G, Jirsa VK. Ongoing cortical activity at rest: criticality, multistability, and ghost attractors. J Neurosci. 2012;32(10):3366–75. pmid:22399758
  31. 31. Goldberger AL, and others. Fractal dynamics in physiology: alterations with disease and aging. Proc Natl Acad Sci U S A. 2002;99(suppl 1):2466–72.
  32. 32. Einstein A. On the motion of small particles suspended in liquids at rest required by the molecular-kinetic theory of heat. Annalen der Physik. 1905;17:549–60.
  33. 33. Chatterjee D, Ghosh P. Navigating Martian terrain: a directional probabilistic model for crater formation and landing site detection. https://ssrn.com/abstract=4826419
  34. 34. Chatterjee D, Ghosh P, Banerjee A, Das SS. Optimizing machine learning for water safety: a comparative analysis with dimensionality reduction and classifier performance in potability prediction. PLoS Water. 2024;3(8):e0000259.
  35. 35. Chatterjee D, Ghosh P. On spatio-temporal directional association of blue and humpback whale’s migratory path navigation with sun, moon, ocean current & earth’s magnetic field. ESS Open Archive eprints. 2024;88:08896939.
  36. 36. Chatterjee D, Banerjee A, Das SS, Ghosh P. Novel empirical models & comparative probabilistic analysis of interconnectedness of volcano eruption & nearby earthquakes. PLoS One. 2025;20(4):e0320210. pmid:40238900
  37. 37. Ghosh P, Chakraborty S. Spectral classification of quasar subject to redshift: a statistical study. Comput Sci Math Forum. 2023;7(1):43.
  38. 38. Ghosh P, Chatterjee D, Banerjee A. On the directional nature of celestial object’s fall on the earth (Part 1: Distribution of fireball shower, meteor fall & crater on earth’s surface). Monthly Notices Roy Astronom Soc. 2024. https://doi.org/stae1066
  39. 39. Ghosh P, Chatterjee D. A novel spherical statistics-based spatio-temporal analysis to unveil distributional properties of meteor strike on earth. Visva Bharati. 2023.
  40. 40. Chatterjee D, Ghosh P. Mercury’s meteorite mysteries: a directional statistical guide to Mercury’s north pole, hidden hazards and roadmap to safe landing havens based on solar elevation, ice stability, temperature. Publ Astron Soc Pacific. 2024;136(11):114509.
  41. 41. Ghosh P, Ghosh S, Chatterjee D. A flexible spherical mixture model for gamma-ray burst patterns obtained from BATSE and FERMI mission. Publ Astron Soc Pacific. 2025;137(2):024503.
  42. 42. Lin YT, Malik J, Wu HT. Wave-shape oscillatory model for biomedical time series with applications. arXiv preprint (2019). https://arxiv.org/abs/1907.00502
  43. 43. Edla S, Kovvali N, Papandreou-Suppappola A. Electrocardiogram signal modeling with adaptive parameter estimation using sequential Bayesian methods. IEEE Trans Signal Process. 2014;62(10):2667–80.
  44. 44. Sameni R, Shamsollahi MB, Jutten C, Clifford GD. A nonlinear Bayesian filtering framework for ECG denoising. IEEE Trans Biomed Eng. 2007;54(12):2172–85. pmid:18075033
  45. 45. Serinagaoglu Y, Brooks DH, MacLeod RS. Improved performance of bayesian solutions for inverse electrocardiography using multiple information sources. IEEE Trans Biomed Eng. 2006;53(10):2024–34. pmid:17019867
  46. 46. Maharaj EA, Alonso AM. Discriminant analysis of multivariate time series: Application to diagnosis based on ECG signals. Comput Statist Data Anal. 2014;70:67–87.
  47. 47. Koçak MS. Comprehensive evaluation of multivariate adaptive regression spline-based approaches for solving the inverse electrocardiography problem with experimental datasets. Middle East Technical University. 2023.
  48. 48. Sayadi O, Shamsollahi MB. A model-based Bayesian framework for ECG beat segmentation. Physiol Meas. 2009;30(3):335–52. pmid:19242046
  49. 49. Sayadi O, Shamsollahi MB, Clifford GD. Synthetic ECG generation and Bayesian filtering using a Gaussian wave-based dynamical model. Physiol Meas. 2010;31(10):1309–29. pmid:20720288
  50. 50. Sayadi O, Shamsollahi MB, Clifford GD. Robust detection of premature ventricular contractions using a wave-based Bayesian framework. IEEE Trans Biomed Eng. 2010;57(2):353–62. pmid:19758851
  51. 51. Jagannath DJ, Immanuel Selvakumar A. Superior foetal electrocardiogram signal elicitation using a novel artificial intelligent Bayesian methodology. Appl Soft Comput. 2015;37:1002–17.
  52. 52. Glass L, Mackey MC. From clocks to chaos: the rhythms of life. Princeton University Press. 1988.
  53. 53. Jammalamadaka SR, Sengupta A. Topics in circular statistics. World Scientific. 2001.
  54. 54. Rao AVD, Girija SVS. Angular statistics. Chapman and Hall/CRC. 2019.
  55. 55. Mardia KV. Statistics of directional data. J Roy Statist Soc Ser B: Statist Methodol. 1975;37(3):349–71.
  56. 56. Norouzpour A, Roberts TL. Fcirc statistic for steady-state evoked potentials; a generalized version of Tcirc2 statistic. Biomed Signal Process Control. 2023;87:105549.
  57. 57. Wolpert N, Tallon-Baudry C. Coupling between the phase of a neural oscillation or bodily rhythm with behavior: Evaluation of different statistical procedures. Neuroimage. 2021;236:118050. pmid:33848619
  58. 58. Dimmock S, O’Donnell C, Houghton C. Bayesian analysis of phase data in EEG and MEG. Elife. 2023;12:e84602. pmid:37698464
  59. 59. Ding T, Nye TM, Wang Y. Manifold-valued models for analysis of EEG time series data. Comput Statist Data Anal. 2025;209:108168.
  60. 60. Wiener N. Differential space. J Math Phys. 1923;2(1):131–74.