Abstract
Magnetoencephalography (MEG) measures magnetic fluctuations in the brain generated by neural processes, some of which, such as cardiac signals, are generally removed as artifacts and discarded. However, heart rate variability (HRV) has long been regarded as a biomarker related to autonomic function, suggesting the cardiac signal in MEG contains valuable information that can provide supplemental health information about a patient. To enable access to these ancillary HRV data, we created an automated extraction tool capable of capturing HRV directly from raw MEG data with artificial intelligence. Five scans were conducted with simultaneous MEG and electrocardiogram (ECG) acquisition, which provides a ground truth metric for assessing our algorithms and data processing pipeline. In addition to directly comparing R-peaks between the MEG and ECG signals, this work explores the variation of the corresponding HRV output in time, frequency, and non-linear domains. After removing outlier intervals and aligning the ECG and derived cardiac MEG signals, the RMSE between the RR-intervals of each was RMSE1 = 2 ms, RMSE2 = 2 ms, RMSE3 = 8 ms, RMSE4 = 4 ms, RMSE5 = 13 ms. The findings indicate that cardiac artifacts from MEG data carry sufficient signal to approximate an individual's HRV metrics.
Keywords: Magnetoencephalography, Electrocardiogram, Heart rate variability, Machine learning, Artificial intelligence, Autonomic nervous system
Graphical abstract
Highlights
-
•
MEG measures the magnetic fields generated by the electrical activity of neurons.
-
•
HRV is a measure of sympathetic and parasympathetic influences the sinoatrial node.
-
•
Simultaneous acquisition of MEG and ECG provides basis of HRV comparison.
-
•
HRV metrics between ECG and AI extracted cardiac signal from MEG were comparable.
-
•
The software and algorithms developed to extract HRV from MEG are freely available.
1. Introduction
The autonomic nervous system (ANS), a component of the peripheral nervous system, regulates numerous physiologic processes, including heart rate, blood pressure, respiration, digestion, and sexual arousal. The ANS is classically divided into three anatomically distinct divisions: sympathetic, parasympathetic, and enteric [1]. Researchers have explored the connection between heart rate variability (HRV) and its relationship to sympathetic and parasympathetic function [2]. While there is still debate about the specifics of the complex systems behind these cardiac/brain relationships, evidence suggests that HRV is a valuable probe into the heart-brain connection [3].
Heart rate variability is the fluctuation in time intervals between successive heartbeats [4]. HRV probes how interdependent autonomic systems operate on different temporal scales and reflect our capacity to handle environmental and psychological stressors (H. G. Kim et al., 2018). In other words, HRV has been identified as a biomarker capable of indexing neurological input to cardiac tissues, representing essential functional dynamics of the ANS. In this feasibility study, we explore using the cardiac artifact in magnetoencephalography (MEG) scans to approximate HRV.
1.1. HRV highlights ANS health
When analyzing heart rate variability, a higher degree of variability and complexity has been shown to correlate with a more flexible ANS that can quickly cope with an uncertain and changing environment [5]. That is, HRV provides physiological insights into the ANS.
There are two distinct processes influencing short-term HRV. First, the dynamic interaction between the sympathetic and parasympathetic branches of the ANS. Secondly, the summation of regulatory mechanisms that control heart rate, including the respiratory sinus arrhythmia, the baroreceptor reflex, and rhythmic changes in vascular tone [6,7]. While there is a documented physiologic decrease in HRV as humans age, see for example (Delaney & Brodie, 2000), previous findings have shown pathologies are differentiable by HRV, including those present in Alzheimer's Disease (AD) (M. S. Kim et al., 2018), Parkinson's Disease (Yoon et al., 2016), and cardiovascular disease (Accardo et al., 2022). Additionally, Manfrini et al. shown a relationship between HRV and coronary instability [8]. Observed an inverse relationship between the progression of arteriosclerosis and frequency measures related to parasympathetic activity. Furthermore, they observed a positive correlation with the presence of plaque formation in the low-frequency (LF)/high-frequency (HF) ratio, often ascribed as an index of sympathovagal balance. However, the HRV power ratio relationship to sympathovagal balance is likely an oversimplification of the complex, non-linear dynamics of the heart-brain system and is a highly debated concept (Billman, 2013).
Several studies have shown low variability of inter-beat intervals is a statistically significant predictor of all-cause mortality (Jarczok et al., 2022; Shaffer et al., 2014). With a sample of over 400 individuals, The United Kingdom Heart Failure Evaluation Assessment of Risk Trial showed that reduced standard deviation of normal (e.g., removal of ectopic beats) RR intervals (SDNN) was able to predict death from progressive heart failure [9]. Other studies have demonstrated that autonomic dysfunction has been linked to the progression of diabetes. Differences in the time and frequency domain measures of HRV have noted differences between healthy and diabetic populations. Specifically, diabetic populations have shown parasympathetic impairment reflected by a decline in time-domain measures and a shift toward low-frequency power in frequency-domain analyses [10]. However, HRV has also been shown as a viable metric to index recovery during treatments. Previous investigations indicate beta-blocker treatments help restore HRV in type I diabetic patients after just six weeks of treatment [11]. Angiotensin-converting enzyme inhibitors have also been shown to improve HRV after three months of treatment ([12]; Malik et al., 1996).
The utility of HRV, while still being explored and understood, is apparent. This cost-effective biomarker reflecting autonomic activity is readily accessible as heart rate monitors (e.g., ECG) are commonplace. Furthermore, access to HRV as an auxiliary biomarker obtainable alongside direct functional neurological data in MEG scans may well provide additional insights to unravel the complex connection between HRV and the ANS of an individual.
1.2. MEG utility emerging
MEG non-invasively measures small-scale magnetic field fluctuations generated by bundles of neurons in the brain as they send electrical impulses via neurotransmitters. These signals, typically on the order of 10–100 fT (10−15T), provide direct insight into functional neurological activity by sensing changes in magnetic field with limited depth penetration [13] but high temporal resolution [14] – although it capable of detecting subcortical signals (Stapleton-Kotloski et al., 2018). Clinically, MEG is used mainly for the diagnosis and treatment of epilepsy [15] but is emerging as useful in other pathologies as well, including Traumatic Brain Injury (TBI) [16], early-stage AD (López-Sanz et al., 2018), and healthy aging [17].
While a relatively small number of MEG scanners are available (approximately 150 globally) and they can be cost-prohibitive, the combination of new applications with improving hardware indicates MEG is a promising, non-invasive clinical imaging tool. More MEG and corresponding HRV measurements could help scientists and clinicians better explore complex heart-brain interactions.
1.3. Cardiac insight from MEG
The cardiac artifact of a MEG signal, arising from cardiac currents (Jousmäki & Hari, 1996), can potentially be used as an independent biomarker through derived HRV. This application is beneficial in cases where ECG cannot be simultaneously obtained during a MEG scan or for retrospective studies on MEG scans that do not have relevant cardiac signals. Additionally, having a reliable cardiac signal obtainable from the MEG scan may obviate the need to acquire ECG, which may complicate the data acquisition setup and contribute additional electromagnetic interference to the highly-sensitive magnetometers. Therefore, we implemented the workflow described here to automatically extract this cardiac signal and corresponding RR intervals (i.e., HRV) from MEG scans to facilitate the fast and reliable acquisition of this signal.
Here we highlight the implementation and validation of an algorithm capable of quickly and reliably extracting HRV from resting-state MEG scans. To facilitate access to this algorithm for research purposes, we have made our program freely available and open-source under a public license in a version-controlled repository.
2. Materials and methods
Validation of the algorithm and analysis procedures requires a ground truth reference. Five volunteers were scanned while simultaneously acquiring MEG data with ECG data gathered from an externally connected measuring and recording system.
2.1. Ethics statement
This study was carried out in accordance with the code of ethics of the Declaration of Helsinki. All study participants provided informed consent and the study was carried out under IRB approval (#IRB 00002960).
2.2. Technical development scans
The MEG data were acquired using a 304-channel, whole helmet system, specifically a CTF MEG International Services LP (Coquitlam, BC, Canada) scanner at Atrium Health Wake Forest Baptist under IRB approval. The scanner is kept in a magnetically shielded room to reduce noise imposed by external magnetic fields. An initial 5-min scan with an empty MEG scanner ensured that the electrical interference from the ECG sensing hardware would not destabilize the Helium-cooled Superconducting Quantum Interference Devices (SQUIDs). All MEG signals were sampled at 1200 Hz.
Each volunteer underwent an 8-min resting state MEG scan with eyes open, using an identical protocol from previous work [18]. Three ECG leads were affixed to the patient in such a way as to maximize the distance from the magnetometers while maintaining a reliable signal; one on each wrist, placed over the radial artery, and one over the patient's left posterior tibial artery. All ECG signals were sampled at 1000 Hz.
2.3. Data processing
Each of the ten total signals (5 subjects, each with MEG and ECG time series recordings) was preprocessed with steps detailed in the workflow diagram, Fig. 1.
Fig. 1.
Workflow diagrams for HRV extraction and validation algorithms. A) indicates the workflow for calculating the RMSE between the raw MEG and ECG signals. B) shows the workflow for determining the RR intervals of the cardiac signal from raw MEG data.
Raw MEG data were obtained in CTF file format (as output from CTF scanners, although our processing pipeline is capable of accommodating other scanner types) and preprocessed using MNE ([19]; Jas et al., 2018), a Python package for analyzing neurophysiological data. Preprocessing steps improved signal-to-noise ratios by removing power-line noise with a notch filter at 60 Hz and band-pass filtering [0.5Hz–100Hz] to remove very high and low frequencies outside our region of interest. The signal was down-sampled to 500 Hz for consistency with the ECG data (which is also down-sampled) while maintaining sufficient resolution for reliable time and frequency domain HRV analysis [20]. Independent Component Analysis (ICA) was used to ‘un-mix’ the signals to differentiate the primary sources of signal contributing to each sensor [21]. The ICA approach is based on the infomax algorithm in MNE, a technique that serves to maximize the mutual information between the set of mixtures and the source signals. The algorithm output twenty independent components that are then sent to an AI classification tool, MEGNet [22], to identify the cardiac signal automatically and select it for processing. A workflow diagram shown in Fig. 1 indicates the processing steps of each algorithm. After the MEG signals are filtered to improve the signal quality, they are run through MEGNet for automatic detection of the cardiac signal. Fig. 2 shows a sample of the MEG pipeline, including the AI-based identification of the independent component representing the most prominent cardiac signal.
Fig. 2.
Shows the pipeline processes used to isolate the cardiac signal contained within the MEG data. The raw data is preprocessed with noise filtering to remove power-line noise and frequencies well above or below the bandwidth of interest. ICA then un-mixes the signal into 20 primary components, which includes cardiac and ocular signals. The 20 1D time series are fed to MEGNet for identification of the cardiac signal (the right-most portion of figure was adapted and modified from original paper [22].
2.3.1. AI-based cardiac detection
An automated HRV extraction algorithm requires a selection step to determine which of the twenty independent components contains the strongest cardiac signal. MEGNet, a deep-learning model that identifies artifacts in MEG data, including cardiac and ocular artifacts (blinks and saccades), requires twenty independent components for model input and is used to classify the strongest cardiac signal from the 1D-time series of all components [22]. While MEGNet also incorporates 2D spatial maps generated with ICA, those proved unnecessary for reliable detection of just the primary cardiac component and are omitted here. Due to the discrepancies caused by spatial map projections between MNE and Brainstorm (the software used to preprocess data for MEGNet training), cardiac labeling performance decreased when using MNE spatial maps. To remove that input and still match the input layers, we passed zeroed-out 2D spatial inputs of the model, effectively providing no discriminating information to the 2D discriminator. The highlights of isolating the cardiac signal from the neuronal signal are captured in Fig. 2.
2.3.1.1. Peak finding
The difference in time between two consecutive R-peaks is called an R–R interval (RRI). Statistical analysis of the set of heart rate intervals provides information about each patient's HRV. All MEG and ECG signals were preprocessed and analyzed using the same NeuroKit2 [23] Python signal processing functions. The peak finding algorithm for NeuroKit2 is particularly useful, as it is non-parametric and outperforms traditional algorithms when bench-marked [23].
2.3.1.2. HRV analysis
HRV analysis is then performed on the RRIs. Evaluation of HRV consists of three primary types of investigation: time domain, frequency domain, and non-linear domain. Time domain analysis involves binning the RRIs in a histogram and evaluating the properties of the corresponding distributions [23]. Frequency domain analysis demonstrates the power distribution of the signal in frequency space, which was done here using Welch's method [24]. Non-linear domain analysis includes complexity features like entropy and additional features derived from the Poincare Plot. All procedures described here used the default NeuroKit2 methods for peak finding and HRV analysis.
2.4. Quality assessment
With both the ECG and MEG cardiac signals, a direct comparison of the two is possible. Once RRIs were obtained from each source, corresponding MEG and ECG signals were aligned using the maximum of the cross-correlation and cropped. Expert evaluation and adjustment ensured alignment accuracy, removed outliers, and trimmed the data set to directly compare correctly identified peaks (by eliminating false positives and partial intervals). For each case, we calculated the root-mean-square-error (RMSE) of the time interval between consecutive peaks, using the following equation
| (1) |
A perfectly fit trial would have an exact agreement between each RR interval and would have an RMSE of zero. Additionally, Bland-Altman plots show the intervals of agreement between the two measurement methodologies (Altman & Bland, 1983). However, as Bland-Altman plots are insufficient to determine acceptable agreement (Giavarina, 2015), emphasis is placed on the RMSE evaluation.
2.5. Data and code availability
Due to privacy considerations of the five volunteers, the raw data will not be released with the paper. However, software to reproduce the workflows shown in Fig. 1 is available at our publicly hosted git repository.
3. Results
The detection algorithm reliably detected the R-peaks of the cardiac signal for each trace. For demonstration purposes, we will show comparisons for the best and worst-performing volunteers. Results of the HRV metrics analytical comparisons for each subject are available in the Supplemental Figs. 2–6. Unsurprisingly, as it is the ‘gold-standard’ reference, the raw ECG signal is generally higher quality than the cardiac MEG component. By comparing Fig. 3a with 3b and of 3c with 3d, we can see that the time-aligned traces tend to find peaks in the same location. Fig. 3 indicatesss the effectiveness of the algorithm in capturing comparable interval data by identifying the same R-peak locations between the ECG signal the MEG-based IC cardiac signal.
Fig. 3.
Comparison of a subset of the RR peak finding for the two signals. a) Raw and cleaned ECG signal and corresponding R-peak detection for subject 1. b) Raw and cleaned cardiac MEG signal with corresponding R-peaks detection for subject 1. c) Raw and cleaned ECG signal and corresponding R-peak detection for subject 5. d) Raw and cleaned cardiac MEG signal with corresponding R-peaks detection for subject 5. For each, the red line represents the cleaned signal, the blue line the raw signal and the yellow circles indicate the algorithmically determined R-peak for each pulse. The green shading represents a relative signal quality index based on the average QRS. (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.)
The time interval between subsequent R-peaks, or RRI, is required to measure HRV. The statistical distribution of the RRI intervals in the time domain shows strong agreement between the ECG-derived RRIs and the MEG-derived RRIs (e.g., Table 2.) Subject 5 showed the most considerable discrepancies, which are attributable to a few outlier RRIs in the MEG-derived results. A pictorial summary of the time domain results is highlighted in Fig. 4 for subjects 1 and 5, with the remaining subject comparisons available in Supplemental Figs. 3–5.
Table 2.
Direct comparison of time-based statistics of the R–R intervals (RRI) before expert curation. The table details the mean, standard deviation , median, root-mean-square between differences between RRI (RMSSD), standard deviation of successive differences between RRI (SDSD), the proportion of times a normal sinus rhythm exceeds 50 ms or 20 ms in an hour (pNN50/pNN20), and overall minimum and maximum. All quantities are in milliseconds except pNN50/pNN20 (%).
| Time Domain HRV Comparison | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| (ms) | ECG1 | MEG1 | ECG2 | MEG2 | ECG3 | MEG3 | ECG4 | MEG4 | ECG5 | MEG5 |
| Mean | 773 | 773 | 739 | 738 | 987 | 985 | 858 | 858 | 855 | 852 |
| STD σ | 34.8 | 35.0 | 28.4 | 28.2 | 80.7 | 84.2 | 96.5 | 96.4 | 50.8 | 60.4 |
| Median | 774 | 774 | 736 | 734 | 998 | 1000 | 872 | 872 | 860 | 856 |
| RMSSD | 25.5 | 25.5 | 13.0 | 13.3 | 68.7 | 71.4 | 69.5 | 69.2 | 55.0 | 59.2 |
| SDSD | 25.6 | 25.5 | 13.1 | 13.3 | 68.8 | 71.5 | 69.5 | 69.2 | 55.0 | 59.3 |
| pNN50 | 3.29 | 3.39 | 0 | 0 | 50.7 | 50.2 | 49.0 | 48.0 | 41.8 | 40.1 |
| pNN20 | 45.61 | 47.1 | 11.6 | 10.9 | 78.6 | 78.6 | 76.9 | 76.7 | 72.4 | 67.8 |
| Min | 642 | 642 | 674 | 672 | 734 | 584 | 630 | 628 | 722 | 452 |
| Max | 860 | 862 | 856 | 856 | 1180 | 1178 | 1142 | 1142 | 970 | 972 |
Fig. 4.
Comparison of the Distribution of RRIs for ECG and MEG data for subjects 1 and 5. a) and b) show the ECG and cardiac MEG signal in the time-domain distribution for subject 1, where c) and d) show the ECG and cardiac MEG signals in the time-domain distribution for subject 5, respectively.
3.1. Quality assurance
Manual quality control performed by domain experts facilitated a direct comparison between ECG and cardiac MEG signals. As the recording hardware for the ECG and MEG signals were independent, the sensors ran for different lengths of time and were not synchronized. A proper RMSE measurement requires aligned RRI vectors of the same size. Misaligned signals were corrected by maximizing the cross-correlation between ECG and MEG derived RRI waveforms.
Subjects 3 and 5 had outliers removed to align and measure the RMSE between the RRIs correctly. Subject 3 had three consecutive cardiac MEG points removed, with two corresponding ECG points removed. All removed cardiac MEG values were outside 2.5σ. Similarly, subject 5 had five consecutive cardiac MEG points removed, with three corresponding ECG points removed. All removed cardiac MEG values for subject 5 were outside 4σ. The removed points for subject 5 are all apparent outliers shown on the histogram in Fig. 4d and the Bland Altman plot in Fig. 6d.
Fig. 6.
Bland Altman plots for Subjects 1 (best agreement) and 5 (worst agreement). The y-axis represents the difference of measured RRIs between the MEG (measured) and ECG (expected) signal. The x-axis represents the mean of corresponding MEG and ECG RRI pairs. The red horizontal line is the mean of the difference distribution and the green lines represent from the mean. (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.)
The alignment and quality control steps provide the necessary data to calculate RMSE. The results of the RMSE calculation for each of the five subjects are in Table 1, with the top-performing data approaching the resolution limit of the signal. The algorithm correctly identified 85% of the RRIs with the resting-state accuracy threshold of , and 95% for a larger error threshold as described in (Cassirame et al., 2017).
Table 1.
Root mean square error (RMSE) between the ECG signal and the cardiac MEG signal in milliseconds. In the cases where peak determination was near perfect, we find RMSE errors approaching the 2 ms resolution limit of the sensors.
| Subject 1 | Subject 2 | Subject 3 | Subject 4 | Subject 5 | |
|---|---|---|---|---|---|
| RMSE (ms) | 2 | 2 | 8 | 4 | 13 |
3.2. Time domain analysis
Time-domain comparison of HRV for subject 1 is shown in Fig. 4, showing the distribution of RRIs with a best-fit approximation overlay in red. The MEG cardiac HRV distribution is nearly identical to the ECG distribution, with the quantitative results highlighted in Table 2. The quantitative measures described include the following analysis of the extracted RRIs: mean, standard deviation , median, root mean square standard deviation (RMSSD), the standard deviation of successive RR interval differences (SDSD), the proportion of RRIs larger than 50 ms or 20 ms (pNN50/pNN20), overall minimum and maximum. The distributions for all pairs of ECG are comparable (2). However, cases three and five show several outliers, all of which skew the distribution lower and increase the standard deviation. This discrepancy indicates that the peak finding algorithm found extra peaks meriting further investigation. A complete comparison of the time domain results are available in Supplemental Table 1.
3.3. Frequency domain analysis
The frequency domain analysis in Fig. 5 compares the power spectral density (PSD) for the RRI intervals of the ECG and cardiac MEG per subject. Fig. 5 shows the close resemblance between the two signals indicating similar power distribution profiles. Quantitatively, the frequency domain data for all five subjects were comparable for the ECG and MEG measurements, as shown in the Supplemental Table 2. Namely, for Case 1, the spectral power was 0.0087, 0.0135, 0.0001 for the ECG signal in the low frequency (LF – [0.04–0.15] Hz) domain, high-frequency domain (HF – [0.15–0.4] Hz), and the very high-frequency domain (VHF – [0.4–0.5] Hz), respectively. Similarly, the respective LF, HF, and VHF spectral power of the cardiac MEG signal was 0.0085, 0.0134, and 0.0002.
Fig. 5.
Comparison of the Power Spectral Densities (PSD) of RRI signals for ECG and MEG data for subjects 1 and 5. a) and b) show the PSD for the ECG and cardiac MEG signals in the frequency-domain for subject 1, where c) and d) show the PSD for the ECG and cardiac MEG signals in the frequency domain for subject 5, respectively.
3.4. Bland-Altman results
Bland-Altman plots compare the difference between the measured (MEG) and expected (ECG) RRIs to the mean of the two measurements, and Fig. 6 highlights the best (6a.) and worst (6b.) performing Bland-Altman results. In each plot, the red line indicates the mean of the distribution of differences and the green line indicates lines above and below the mean. In the best performing case, the resolution limit of the sampling frequency is clearly seen the gaps along the y-axis. In the worst case, the plots show significantly more outliers, requiring additional filtering as discussed in Section 3.1. The strong agreement between the RRIs derived from the MEG signal with those obtained from the ECG signal indicate that this technique for extracting HRV signal from MEG is reliable, but may require additional outlier removal to correct for misidentified peaks in the cardiac artifact component of the MEG signal.
3.5. Non-linear analysis
Lastly, a non-linear comparison of the HRV metrics is shown via a Poincaré plot in Supplemental Figs. 2–6. Poincaré plots are a 2D representation of consecutive RRIs, plotting RRN vs. RRN+1 in a scatter plot. These 2D distributions are used to understand the non-linear dynamics of a patient's HRV in a scatter plot representation of consecutive intervals. Three primary indicators are derived from fitting an ellipse and measuring the corresponding semi-major and semi-minor axes: the semi-minor axis corresponds to the standard deviation of the instantaneous RRI, the semi-major axis corresponds to the standard deviation of the long-term RRI variability, and the third indicator is the ratio of the two [25]. The corresponding quantitative measures for the non-linear plots are available in Supplemental Table 3. Overall, the 89 metrics output from NeuroKit2's HRV analysis show high Pearson correlation coefficients between the ECG and cardiac MEG signals, with .
4. Discussion
On the order of milliseconds, oscillations of a healthy heart show non-linear, mathematically chaotic properties [26]. It is believed that this non-linear variability reflects the flexible, readily adapting nature of a system prepared to engage with an uncertain and constantly changing environment. The results of the technical development scans indicate this method reliably captures RR intervals and their corresponding fluctuations from the extracted cardiac signal from ICA, including the complex, non-linear features. While two subjects (3 and 5) had several outlying RR intervals, the overall HRV metrics were still highly correlated. While careful outlier removal can improve these results further (for example, extra peaks found in poor-quality cardiac MEG signal for subject 5), the calculated HRV metrics are comparable even without this extra step. While the unprocessed results are not in perfect agreement, there are a number of factors that may cause differences in the acquired ECG and cardiac MEG signals.
Here, we do not consider pulse rate variability here as the predominant source of cardiac artifact in MEG is from propagated electro-magnetic fields created during heart contraction, and not from the pulsatile flow of blood in the brain. While there maybe secondary effects associated with pulsatile blood flow in the brain, these are assumed to be of lower magnitude than those caused directly from the heart's electromagnetic field (Braeutigam, 2013).
4.1. Design limitations
The volunteers in this study were all healthy males between 18 and 28. This feasibility study showed strong agreement in this category of individuals, yet there may be gender or other socio-demographic factors that could disrupt the conclusions reached in this work. Additionally, these were only 8-min scans. Research has shown that HRV metrics can individually vary on short (minutes) versus long (hours/days) timescales. Further investigation is needed on a larger cohort and over a broader range of times scales for validation.
Heart conditions that cause arrhythmia or other irregular heartbeats are also likely to produce cardiac traces that may not work well with the methods proposed here. Additional studies, again on a larger cohort, are required to determine the robustness and applicability of this approach. The software is contained in an open-source version control repository located at UAB's GitLab for interested parties to explore this research further.
5. Conclusion
This demonstrates feasibility of using cardiac artifact signals from MEG data to approximate heart rate variability and provides a corresponding open-source software package. Using simultaneous MEG and ECG measures, and the ECG reference as the ground truth, these data demonstrate strong agreement between the HRV metrics of each. While additional study is needed to explore this concept on a larger patient population, under prolonged scanning conditions, and on other MEG scanners, the data here suggest it may well be possible to reliably attain insights regarding cardiac function from MEG signals via extracted HRV. This tool for automatic HRV extraction in MEG can potentially help physicians readily probe cardiovascular dynamics from MEG scans without the need for additional sensors that could interfere with SQUIDs. Simultaneous insights from cardiac and neurological function can open new ways to investigate sympathovagal balance and explore complex heart-brain relationships.
CRediT authorship contribution statement
Ryan C. Godwin: Writing – review & editing, Writing – original draft, Visualization, Validation, Supervision, Software, Project administration, Methodology, Investigation, Formal analysis, Data curation, Conceptualization. William C. Flood: Writing – review & editing, Writing – original draft, Investigation, Conceptualization. Jeremy P. Hudson: Software, Formal analysis, Data curation. Marc D. Benayoun: Writing – review & editing, Validation, Supervision, Methodology. Michael E. Zapadka: Writing – review & editing. Ryan L. Melvin: Writing – review & editing, Validation, Methodology, Formal analysis. Christopher T. Whitlow: Writing – review & editing, Resources, Funding acquisition.
Declaration of competing interest
The authors declare that this work was carried out without any conflicts of interest, financial or otherwise.
Acknowledgments
This work was supported by the National Institutes of Health [NINDS R01 NS091602, 2020].
The authors would also like to thank Cassandra Cornell for providing support and insights in the acquisition of MEG data.
Footnotes
Supplementary data to this article can be found online at https://doi.org/10.1016/j.heliyon.2024.e26664.
Appendix A. Supplementary data
The following is the Supplementary data to this article:
References
- 1.Waxenbaum J.A., Reddy V., Varacallo M. StatsPearls Publishing LLC.; Treasure Island, FL: 2021. Anatomy, Autonomic Nervous System. [PubMed] [Google Scholar]
- 2.Kristal-boneh A.E., Raifel M., Froom P., Ribak J., Scandinavian S., April N. Heart rate variability in health and disease. Scand. J. Work. Environ. Health. 1995;32 doi: 10.5271/sjweh.15. [DOI] [PubMed] [Google Scholar]
- 3.Forte G., Favieri F., Casagrande M. Heart rate variability and cognitive function: a systematic review. Front. Neurosci. 2019;13 doi: 10.3389/fnins.2019.00710. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.McCraty R., Shaffer F. Heart rate variability: new perspectives on physiological mechanisms, assessment of self-regulatory capacity, and health risk. Glob. Adv. Health Med. 2015;4:46–61. doi: 10.7453/gahmj.2014.073. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Beckers F., Verheyden B., Aubert A.E. Aging and non-linear heart rate control in a healthy population. Am. J. Physiol. Heart Circ. Physiol. 2006;290:2560–2570. doi: 10.1152/ajpheart.00903.2005. [DOI] [PubMed] [Google Scholar]
- 6.Karemaker J.M. Counterpoint: respiratory sinus arrhythmia is due to the baroreflex mechanism. J. Appl. Physiol. 2009;106:1742–1743. doi: 10.1152/japplphysiol.91107.2008a. [DOI] [PubMed] [Google Scholar]
- 7.Schwartz M.S., Andrasik F. fourth ed. The Guilford Press; 2016. Biofeedback: A Practitioner's Guide; pp. 196–213. [Google Scholar]
- 8.Manfrini O., Pizzi C., Viecca M., Bugiardini R. Abnormalities of cardiac autonomic nervous activity correlate with expansive coronary artery remodeling. Atherosclerosis. 2008;197:183–189. doi: 10.1016/j.atherosclerosis.2007.03.013. [DOI] [PubMed] [Google Scholar]
- 9.Nolan J., Batin P.D., Andrews R., Lindsay S.J., Brooksby P., Mullen M., et al. Prospective study of heart rate variability and mortality in chronic heart failure: results of the United Kingdom heart failure evaluation and assessment of risk trial (UK-Heart) Circulation. 1998;98:1510–1516. doi: 10.1161/01.CIR.98.15.1510. [DOI] [PubMed] [Google Scholar]
- 10.Xhyheri B., Manfrini O., Mazzolini M., Pizzi C., Bugiardini R. Heart rate variability today. Prog. Cardiovasc. Dis. 2012;55:321–331. doi: 10.1016/j.pcad.2012.09.001. [DOI] [PubMed] [Google Scholar]
- 11.Ebbehøj E., Poulsen P., Hansen K., Knudsen S., Mølgaard H., Mogensen C. Effects on heart rate variability of metoprolol supplementary to ongoing ACE-inhibitor treatment in type I diabetic patients with abnormal albuminuria. Diabetologia. 2002;45:965–975. doi: 10.1007/s00125-002-0869-7. [DOI] [PubMed] [Google Scholar]
- 12.Kontopoulos A.G., Athyros V.G., Papageorgiou A.A., Skeberis V.M., Basayiannis E.C., Boudoulas H. Effect of angiotensin-converting enzyme inhibitors on the power spectrum of heart rate variability in postmyocardial infarction patients. 1997;8:517–524. [PubMed] [Google Scholar]
- 13.Ding L., Yuan H. Simultaneous EEG and MEG source reconstruction in sparse electromagnetic source imaging. Hum. Brain Mapp. 2013;34:775–795. doi: 10.1002/hbm.21473. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Darvas F., Pantazis D., Kucukaltun-Yildirim E., Leahy R. Mapping human brain function with meg and eeg: methods and validation. Neuroimage. 2004;23:S289–S299. doi: 10.1016/j.neuroimage.2004.07.014.MathematicsinBrainImaging. [DOI] [PubMed] [Google Scholar]
- 15.Ray A., Bowyer S.M. Clinical applications of magnetoencephalography in epilepsy. Ann. Indian Acad. Neurol. 2010;13:14–22. doi: 10.4103/0972-2327.61271. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Peitz G.W., Wilde E.A., Grandhi R. Magnetoencephalography in the detection and characterization of brain abnormalities associated with traumatic brain Injury: a comprehensive review. Med. Sci. 2021;9:7. doi: 10.3390/medsci9010007. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Mandal P.K., Banerjee A., Tripathi M., Sharma A. A comprehensive review of magnetoencephalography (MEG) studies for brain functionality in healthy aging and Alzheimer's disease (AD) Front. Comput. Neurosci. 2018;12 doi: 10.3389/fncom.2018.00060. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Maldjian J.A., Davenport E.M., Whitlow C.T. Graph theoretical analysis of resting-state MEG data: identifying interhemispheric connectivity and the default mode. Neuroimage. 2014;96:88–94. doi: 10.1016/j.neuroimage.2014.03.065. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Gramfort A., Luessi M., Larson E., Engemann D.A., Strohmeier D., Brodbeck C., et al. MEG and EEG data analysis with MNE-Python. Front. Neurosci. 2013;7:1–13. doi: 10.3389/fnins.2013.00267. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Kwon Ohhwan, Jeong Jinwoo. Electrocardiogram sampling frequency range acceptable for heart rate variability analysis. Healthc Inform Res. 2018;24:198–206. doi: 10.4258/hir.2018.24.3.198. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Stone J.V. Independent component analysis: an introduction. Trends Cognit. Sci. 2002;6:59–64. doi: 10.1016/S1364-6613(00)01813-1. [DOI] [PubMed] [Google Scholar]
- 22.Treacher A.H., Garg P., Davenport E., Godwin R., Proskovec A., Bezerra L.G., et al. MEGnet: automatic ICA-based artifact removal for MEG using spatiotemporal convolutional neural networks. Neuroimage. 2021;241 doi: 10.1016/j.neuroimage.2021.118402. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Makowski D., Pham T., Lau Z.J., Brammer J.C., Lespinasse F., Pham H., et al. NeuroKit2: a Python toolbox for neurophysiological signal processing. Behav. Res. Methods. 2021;53:1689–1696. doi: 10.3758/s13428-020-01516-y. [DOI] [PubMed] [Google Scholar]
- 24.Welch P. The use of fast Fourier transforms for the estimation of power spectra: a method based on time averaging over short, modified periodograms. IEEE Trans. Audio Electroacoust. 1967;15:70–73. [Google Scholar]
- 25.Hoshi R.A., Pastre C.M., Vanderlei L.C.M., Godoy M.F. Poincare plot indexes of heart rate variability:' Relationships with other non-linear variables. Auton. Neurosci. 2013;177:271–274. doi: 10.1016/j.autneu.2013.05.004. [DOI] [PubMed] [Google Scholar]
- 26.Goldberger A.L. Is the normal heartbeat chaotic or homeostatic? News Physiol. Sci. 1991;6:87–91. doi: 10.1152/physiologyonline.1991.6.2.87. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
Due to privacy considerations of the five volunteers, the raw data will not be released with the paper. However, software to reproduce the workflows shown in Fig. 1 is available at our publicly hosted git repository.







