Abstract
Early diagnosis and localization of myocardial ischemia (MS) and coronary artery stenosis (CAS) play a crucial role in the effective prevention and management of ischemic heart disease (IHD). Magnetocardiography (MCG) has emerged as a promising approach for non-invasive, non-contact, and high-sensitivity assessment of cardiac dysfunction. This study presents a multi-center, AI-enabled diagnosis and localization of myocardial ischemia and coronary artery stenosis from MCG data. To this end, we collected a large-scale dataset consisting of 2,158 MCG recordings from eight clinical centers. We then proposed a multiscale vision transformer-based network for extracting spatio-temporal information from multichannel MCG recordings. Anatomical prior knowledge of the coronary artery and the irrigated left ventricular regions was incorporated by a carefully designed graph convolutional network (GCN)-based feature fusion module. The proposed approach achieved an accuracy of 84.7%, a sensitivity of 83.8%, and a specificity of 85.6% in diagnosing IHD, an average accuracy of 78.4% in localization of five MS regions, and an average accuracy of 65.3% in localization of stenosis in three coronary arteries. Subsequent validation on an independent validation dataset consisting of 268 MCG recordings collected from four clinical centers demonstrated an accuracy of 82.3%, a sensitivity of 83.8%, and a specificity of 81.3% in diagnosing IHD, an average accuracy of 77.3% in localization of five myocardial ischemic regions, and an average accuracy of 65.6% in localization of stenosis in three coronary arteries. The proposed approach can be used as a fast and accurate diagnosis tool, boosting the integration of MCG examination into clinical routine.
Similar content being viewed by others
Introduction
Ischemic heart disease (IHD) is a prevalent pathological condition characterized by a reduction or complete cessation of blood flow to a specific region of myocardium. Globally, it has emerged as a leading cause of mortality, affecting approximately 1.72% of the population and exhibiting an increasing prevalence 1. The primary etiological factor of IHD is atherosclerosis 2, a condition characterized by the accumulation of lipids and cholesterol, resulting in the stenosis of coronary arteries and subsequent compromised blood supply within the corresponding perfusion territories. Typically, the autoregulatory mechanism of collateral vessels provides an opportunity for compensation in regional myocardial ischemia, thereby assisting in maintaining the functionality of the affected myocardium, albeit to a certain extent 3.Early identification of abnormal cardiac function is of vital importance for effective prevention and management of IHD 4. However, the complex characteristics of symptoms and outcomes, along with the presence of high intra-subject vascular and metabolic heterogeneity, significantly increase the difficulty of early diagnosis.
Both electrocardiograph (ECG) and Magnetocardiography (MCG) as functional examinations have been used for early diagnosis of pre-symptomatic IHD 5. In comparison with the conventional 12-lead ECG, MCG enables non-contact myocardium activity inspection 6, and it has a higher sensitivity to tangential and eddy current signals caused by damaged myocardial tissue 7. Typically, MCG sensors are arranged in an array and positioned in a plane relative to the upper chest to achieve a higher spatial resolution, thereby improving the acquisition of functional information from the heart 8. Although MCG allows for the sensitive acquisition of functional information from the heart, its interpretation is labor intensive, time consuming, and requires expert knowledge, thus limiting its widespread clinical application. Therefore, development of MCG signal-based computer-aided diagnosis systems may substantially improve its clinical acceptance.
In this study, we aim to present, a large-scale, multi-center, retrospective cohort study evaluating the performance of an AI-enabled method for IHD diagnosis and localization of obstructed coronary arteries and cardiac ischemic regions from MCG data. We collect a large-scale dataset consisting of 2,158 MCG recordings from eight clinical centers for methodology development. Among these, 1,045 MCG recordings have diagnostic reports of CAG with detailed documentation of blockage of coronary arteries, and 370 MCG recordings have clinical reports of SPECT imaging with annotations of the left ventricle (LV) ischemic regions. We then propose a multiscale vision transformer-based network specifically tailored for extracting spatio-temporal information from multichannel MCG recordings. To aggregate information from heterogeneous clinical diagnostic references and to take advantage of anatomical prior knowledge of each coronary artery and its irrigated left ventricular regions, we incorporate a carefully designed graph convolutional network (GCN)-based feature fusion module. The proposed method is developed on the 2,158 MCG recordings using a stratified 5-fold cross-validation strategy. It is then tested on an independent validation dataset of 268 MCG recordings collected from four clinical centers.
Background
Various imaging modalities have been developed to detect anatomical and physiological symptoms associated with early IHD 9,10. Some screening methods, such as fractional flow reserve (FFR) and invasive coronary angiography (CAG), are invasive. Others like single photon emission computed tomography (SPECT) and positron emission tomography (PET) involve radiation exposure. Although ECG has been recognized as a routine clinical procedure for the early diagnosis of pre-symptomatic IHD, it has been reported that the sensitivity and the specificity of ECG are lower when compared with other modalities 11,12. It has also been shown by EVINCI study 13 that in patients with intermediate risk of coronary artery disease (CAD), hybrid imaging that allows for non-invasive co-localization of myocardial perfusion defects and subtending coronary arteries impacts clinical decision-making in almost one every five subjects. Although hybrid imaging has emerged as a non-invasive way of assessing CAD by integration of myocardial perfusion images with individual coronary anatomy, its acquisition, however, may result in higher radiation exposure or cost than single imaging modality.
MCG was introduced in the early 1960’s as a promising solution for non-invasive, non-contact, non-radioactive and high-sensitivity myocardium activity inspection 6. MCG studies are fast, safe and completely non-invasive. Consequently, MCG as an imaging modality offers great convenience for patients. Recent advancements, such as unshielded MCG systems 14, high-sensitive magnetic gradiometers 15, and room-temperature magnetic sensors 16, have enabled the detection of extremely weak cardiac magnetic signal down to the pico-Tesla range in clinical routine. In addition to notable sensitivity, MCG is less influenced by confounding factors like skin-electrode contact artifacts and inter-subject body composition variations 16, whereas more sensitive to the tangential and vortex current caused by ischemic cardiac tissue 17. MCG has been used before as a diagnostic tool for various cardiac diseases including ischemia 17,18, CAD 19, cardiomyopathy 20, localization of myocardial ischemia 21 or infarction 22, and congenital cardiac disease 23. This was done by quantitative analysis of MCG ventricular repolarization parameters and magnetic field map (MFM) pattern 18,24, where cardiac anomalies were characterized by counting the number of abnormal parameters whose values fall out of the normal range and by finding abnormal MFM patterns. Manual interpretation of MCG data is labor intensive, time consuming, and strongly relying on the experience of interpreter, limiting its acceptance in clinics. Therefore, an automatic system that can reduce or eliminate the variability introduced by human interpretation of MCG data would be extremely beneficial to clinicians. This has sparked the interest in developing artificial intelligence (AI)-enabled methods for analysis of MCG recordings.
The applications of AI-enabled methods for analysis of MCG data, however, are quite limited to date. For example, Fenici et al. 24 conducted a study on MCG data of 147 patients (73 for training and 74 for testing) to validate the IHD diagnosis value of machine learning (ML) techniques in comparison with interactive, computer-aided MCG analysis. With 75% sensitivity, 85% specificity, 83% positive predictive value (PPV), 78% negative predictive value (NPV), and 80% predictive accuracy, their ML techniques demonstrated a statistically better performance than the interactive analysis. Tantimongcolwat et al. 11 developed two types of ML techniques, namely back propagation neural network (BNN) and direct kernel self-organizing map (DK-SOM) to explore IHD patterns recorded by MCG. Validated on MCG data of 125 patients (74 for training and 51 for testing), they found that DK-SOM provided relatively higher diagnosis performance than BNN, with a sensitivity, specificity, and accuracy of 86.2%, 72.7% and 80.4%, respectively. Huang et al. 25 investigated the usefulness of 10 MCG parameters to detect coronary artery disease (CAD) in 209 patients with chest pain by means of a multilayer perceptron (ML) neural network. They reported an accuracy ranged from 71.2% to 90.5%. By extracting 164 features from T waves that were segmented from averaged MCG recordings, Tao et al. 17 compared the performance of four different classifiers in diagnosis of IHD on MCG data of 347 healthy subjects and 227 subjects with clinically identified coronary stenosis. They found that the SVM-XGBoost model achieved the best results. Recently, based on spatiotemporal features extracted from MCG data, Han et al. 5 evaluated six ML classification models for severity assessment and localization of CAD. They found that for CAD severity assessment, a support vector machine (SVM) achieved the best result, with an accuracy of 75.1%, prediction of 73.9%, sensitivity of 67.0%, specificity of 88.8%, F1-score of 69.8%, and area under the curve (AUC) of 0.876. They also found that the amplitude and correlation features were key factors for severity assessment and localization. Despite significant progress that has been achieved, two limitations common to all above mentioned studies can be identified. First, methods used in these studies were based on hand-craft features, which had low discriminative power, thereby limiting their performance. Second, all above mentioned methods were only validated on limited number of data. Whether similar performance can be achieved when applied to a large-scale clinical dataset has not been checked.
Recently, deep convolutional neural networks (CNN)-based methods, when trained on large amount of ECG data, have demonstrated diagnostic performance levels comparable to those of cardiologists 26,27,28,29. These methods, however, cannot be directly applied to MCG analysis due to disparities in signal characteristics and data processing techniques. In our previous work 30, we developed an end-to-end CNN called MCG-Net for fine-grained delineation and diagnostic classification of cardiac events from MCG data. MCG-Net demonstrated superior performance over the state-of-the-art (SOTA) methods on both event delineation and diagnostic classification but it was only validated on a limited number of data. Second, it is often important to be able to determine the localization of myocardial ischemic regions, as well as being able to determine which coronary artery that is narrowed. This may facilitate diagnosis of ischemia and help to guide management. For example, information on the location of the myocardial ischemic regions will enable cardiologists to better distinguish between STEMI (ST-Segment Elevation Myocardial Infarction) and NSTEMI (Non-ST-Segment Elevation Myocardial Infarction) patients and thus, enable them to perform an adequate treatment strategy 21. However, existing AI-enabled methods can either predict the localization of myocardial ischemic regions 21 or narrowed coronary arteries 5,30 from MCG data but not both, despite the fact that myocardial ischemia results from coronary artery stenosis. More importantly, most of the existing AI-enabled methods are only validated on limited number of data collected from one clinical center. For clinical routine integration, it is essential to check their performance when applied to large-scale data collected from multiple centers.
Patient enrollment and study design flowchart. From an initial pool of 1562 patients presenting with chest pain or suspected CAD between January 2020 and December 2023, 926 patients met the inclusion criteria after excluding those with previous cardiac interventions (n = 324), unstable conditions (n=158), and inadequate imaging quality (n = 154).
Results
Baseline characteristics
To develop the model, we compiled a dataset consisting of 36-channel MCG data from 2,158 individuals. Furthermore, an independent testing dataset consists of 268 MCG recordings were collected for validation. The subject enrollment pipeline is presented in Fig. 1. Specifically, the study cohort comprises three subgroups, namely the control group, the CAG group and the SPECT group. Out of the total 2,426 MCG recordings, 745(30.7%) were obtained from healthy individuals collected during routine health checkups (the control group), 1,180(48.6%) were obtained from patients who underwent CAG examinations (the CAG group), and 446(18.4%) were obtained from patients underwent SPECT screening (the SPECT group). Among the CAG group, 988 patients were confirmed to have IHD with blockages equal to or greater than 70%, based on diagnostic standards suggested in 31; while 151 patients in the SPECT group were diagnosed with IHD, as reduced blood supply was observed in at least one segment of the LV region. Details of baseline patient characteristics are presented in Table 1. Furthermore, we determined the narrowed coronary arteries from the CAG reports, including the left anterior descending artery (LAD), the left circumflex artery (LCX) and the right coronary artery (RCA). Additionally, we derived a 5-segment polar map based on the standard 17-segment polar map to summarize the occurrences of cardiac ischemia in specific LV regions 32, which were the apex (AP), the anterior wall (AW), the septal wall (SW), the inferior wall (IW), and the lateral wall (LW).
IHD diagnostic performance of the proposed approach
The IHD diagnostic performance of the proposed approach is presented in Table 2. When evaluated on the combined group, our model demonstrated an accuracy of 84.7%, a sensitivity of 83.8%, a specificity of 85.6%, a positive predictive value (PPV) of 84.5%, a negative predictive value (NPV) of 85.4% and an F1 score of 83.9%. When comparing the diagnostic performance between the two subgroups, our method exhibited better agreement with the SPECT subgroup than the CAG group. Specifically, our model achieved a sensitivity of 83.4% and a specificity of 82.3% on the SPECT group whereas on the CAG group, our model obtained a sensitivity of 82.4% and a specificity of 72.6%. To visually compare the performance of the proposed approach on different groups, the receiver operating characteristic (ROC) curves for all three groups are presented in Fig. 2. Our model achieved an area under the curve (AUC) score of 0.91 on the combined group, an AUC of 0.89 on the SPECT group and an AUC of 0.82 on the CAG group. Qualitative examples are shown in Fig. 3.
Localization performance of the proposed approach
Localization performance of the proposed approach is summarized in Table 3. We observed respectively an average accuracy of 71.5%, 77.1%, 86.7%, 81.1% and 75.6%, an average sensitivity of 74.4%, 76.4%, 86.3%, 75.4% and 80.7%, and an average specificity of 71.9%, 78.0%, 86.1%, 85.3% and 73.5%, when the myocardial ischemia was happened in the apex, the anterior wall, the septal wall, the inferior wall, or the lateral wall of the LV. For the task of localizing coronary artery stenosis, we observed respectively an average accuracy of 71.1%, 60.3%, and 64.5%, an average sensitivity of 82.7%, 83.5%, and 61.6%, and an average specificity of 42.5%, 37.8%, and 68.1%, when the stenosis is happened in the LAD, the LCX, and the RCA.
Qualitative examples of IHD diagnosis of the proposed approach from the MCG recordings. For each subject, we show the reference diagnosis (2nd column), the predicted IHD probability (3rd column), the averaged waveform (4th column) and the samples of magnetic field maps during the TT interval (5th column).
Ablation study on the choice of cardiac events for IHD diagnosis
We investigated the effectiveness of using different combinations of cardiac events as input sequences for the diagnosis of IHD. The experiment was conducted on a single fold, employing a 75%-5%-20% data split for training, validation, and testing, respectively. Specifically, we compared the diagnostic performance using three different types of input, which were the QRS sequence only, the QRS sequence and the TT sequence combined, and the TT sequence only. The results are presented in the first three rows of Table 4. From the results, we observed that using the TT sequence only achieved the best result in IHD diagnosis. Our finding is consistent with previous findings reported in17,33 where it has been shown that T wave repolarization synchronicity is an important factor to distinguish IHD from normal subjects.
Ablation study on evaluating the effectiveness of incorporating anatomical prior knowledge
We investigated the effectiveness of the proposed anatomical prior knowledge fusion module on the diagnosis of IHD. The results are presented in the last row of Table 4. By incorporating the anatomical prior knowledge fusion module, we observed an increase of 2.2% for accuracy, an increase of 2.1% for sensitivity, and an increase of 3.8% for specificity.
Validation on the independent testing dataset
We further validated the trained models on the independent validation dataset using a majority voting ensemble method. The results are presented in Table 5. For the combined group, the accuracy, sensitivity, and specificity for diagnosing IHD were found to be 82.3%, 83.8%, and 81.3%, respectively. Upon evaluating within subgroups, we observed a slight increase in sensitivity by 0.3% and a decrease in specificity by 0.5% in the SPECT group of the independent testing dataset in comparison with that of the development dataset. Additionally, in the CAG group of the independent testing dataset, we observed an increase in sensitivity by 1.6% accompanied by a decrease in specificity by 3.3% when compared to that of the development dataset. This increase in sensitivity in both the SPECT and CAG subgroups can be attributed to a higher percentage of severe ischemia cases in the validation dataset than in the development dataset, while the decreased specificity can be partially attributed to an increased percentage of IHD negative cases, as shown in Table 1. In terms of localizing ischemic regions and obstructed coronary arteries, the proposed method demonstrated consistent performance. Specifically, the method showed better performance in recognizing ischemia in the SW region, with an accuracy of 83.3%, a sensitivity of 66.7%, and a specificity of 88.9%. Additionally, the method performed slightly better in identifying stenosis in LAD, achieving an accuracy of 74.5%, a specificity of 31.6%, and a sensitivity of 85.3%. Overall, the evaluation study on the independent validation dataset confirms the effectiveness and consistency of the proposed method.
Failure case analysis
Although the proposed model achieved reasonably accurate results on both ischemia diagnosis and localization tasks as demonstrated in Tables 2, 3 and 5, there were still cases when it failed. Figure 4 illustrates four examples of failure cases where Case A involved a healthy individual; Case B pertained to a subject with localized ischemia in the anterior (AP) region; Case C was characterized by extensive ischemia across all five cardiac regions; and Case D was associated with blockages in the RCA and LCX artery. In each of these cases, both magnetic field maps and corresponding Grad-CAM maps 34 were visualized. In particular, for Case A, the proposed model assigned a 52.3% probability to the presence of ischemia, with Grad-CAM maps highlighting patterns of magnetic poles. This outcome may be attributed to the mild temporal instability of the magnetic poles, which could be indicative of other underlying cardiac anomalies. For Case B, the method was unsuccessful in localizing a mild cardiac ischemia in the AP region, with a probability of 40.8%. This failure could be attributed to the subtle nature of the ischemia, which may not have been sufficiently pronounced to be detected by the proposed model. For Case C, while ischemia in the LW region was correctly identified, the proposed model failed to detect the other four ischemia regions. For Case D, the proposed model localized blockage in the LCX but failed to identify the blockage in the RCA. This may be due to the complexity of these cases, as it either involves ischemia in multiple regions (Case C) or blockages in multiple coronary arteries (Case D).
Discussion
In this multicenter, retrospective cohort study, a comprehensive collection of MCGs with clinical reports was obtained from eight institutes, enabling AI-based analysis to screen for IHD, a potentially life-threatening condition often presenting with asymptomatic symptoms in its early stages. The objectives of this study were twofold: automatic identification of IHD, and to provide diagnostic information regarding the ischemic LV regions and obstructed coronary arteries. To achieve this, we employed a multiscale vision transformer-based spatiotemporal feature extraction backbone, which was specifically tailored for magnetic field map sequences. Furthermore, a GCNs-based feature fusion module was devised to leverage prior knowledge about three coronary arteries and the irrigated left ventricular territories.
Comprehensive evaluation was conducted on a development dataset comprising 2,158 MCGs, utilizing a stratified five-fold cross-validation strategy. The proposed model achieved an overall sensitivity of 83.8% and specificity of 85.6% for diagnosing IHD. Subsequent analysis on an independent test dataset of 268 MCGs yielded consistent results. Further evaluation across the SPECT subgroup and the CAG subgroup revealed that our model exhibited a higher level of concordance with SPECT outcomes. This observation can be explained by following factors. First, since the cardiac magnetic signals recorded by MCG originates from myocardial activity, both MCG and SPECT can provide direct interpretation of myocardial functionality. Second, in cases where the obstruction of coronary artery occurs, collateral vessels have the opportunity to compensate for the blood flow, thus alleviating ischemic conditions in the myocardium. Third, MCG examinations are typically performed in a resting pose with light cardiac overload, which means that patients with coronary artery blockage may not display ischemic electrophysiological symptoms during the screening process. Additionally, in-depth analysis revealed that our model displayed better discriminative ability to classify patients with moderate to severe IHD. However, it occasionally generated false-positive alerts for suspected high-risk patients, as showed in an accuracy score of 52.8% for the CAG group with 0-vessel disease and 72.8% for the SPECT group with 0-region ischemia. Nonetheless, considering the primary role of MCGs as an early screening method, these alerts for high-risk subjects can effectively raise concerns and prompt clinicians to schedule follow-up screenings.
Beyond IHD diagnosis, the proposed model can also identify ischemia regions and narrowed coronary arteries from input MCG data, which are important for stratified treatment strategy. It was observed, however, that the proposed model obtained a better accuracy in identifying stenosis happened in LAD than in other two coronary arteries. We attribute such a performance bias to following factors. First, it was reported in 17 that cardiac signal changes caused by LCX stenosis resembled those seen on posterior wall infarction due to occlusion in RCA. Thus, it would be difficult to separate LCX stenosis from RCA stenosis. This might explain why the proposed model obtained relatively less accurate results in identifying stenosis happened in LCX and RCA than in LAD. Second, patient population that we collected might play a role. Specifically, among 428 patients with single vessel disease, LAD stenosis was predominant while stenosis in other two arteries was mostly found in patients with multiple vessel disease (498 cases). In patients with multiple vessel disease, the MCG signals were influenced by multiple bundle branch lesions, leading to reduced performance compared to those with LAD stenosis.
At the algorithmic level, one of the major problem encountered was the heterogeneity of labels derived from CAG and SPECT, respectively. These two modalities provide interpretations of IHD from different aspects, with CAG giving anatomical information of coronary artery blockage and SPECT assessing myocardial functionality at the physiological level. Conventional learning approaches would involve training two separate models on independent datasets, limiting data usage and potentially impacting the model’s robustness. To overcome these challenges, a feature fusion method based on GCNs was devised to incorporate the relationship between the three coronary arteries and the five left ventricular regions. The proposed method offers two advantages. First, it enabled the efficient utilization of all available MCG data. Second, the model was able to simultaneously leverage features learned using the CAG or the SPECT supervisions, leading to a more holistic and integrated analysis of the data.
The integration of anatomical prior knowledge is indeed a crucial advancement in our feature fusion method. Our previous findings demonstrate that coronary artery morphology significantly influences diagnostic accuracy, particularly for LCX and RCA 17. This anatomical variability underscores the importance of incorporating structural information into functional assessments. The fusion of MCG with anatomical data represents a significant methodological innovation. We are currently developing an advanced image fusion framework combining MCG with computed tomography angiography (CTA), which provides detailed coronary anatomy visualization. This integration leverages complementary strengths: MCG’s ability to detect functional ischemia and CTA’s precise anatomical mapping. Early results suggest that incorporating this anatomical prior knowledge can help resolve ambiguities in vessel attribution, particularly in regions where multiple vessels’ territories overlap. This approach aligns with the broader trend in cardiovascular imaging towards multimodality integration for improved diagnostic accuracy. The biological relevance is particularly noteworthy as it addresses the fundamental challenge of matching electromagnetic signals with their anatomical origins, accounting for individual variations in coronary artery morphology.
According to the 2024 ESC Guidelines for the Management of Chronic Coronary Syndromes 35, the diagnostic process for coronary artery disease is divided into three steps: (1) assessment of clinical symptoms; (2) non-invasive tests; and (3) invasive tests. Existing non-invasive tests include stress echocardiography, SPECT, Cardiac Magnetic Resonance (CMR), PET and Coronary Computed Tomography Angiograph (CCTA), which not only pose various risks to patients including contrast agent side effects and radiation exposure, but also are time-consuming and cumbersome to perform. MCG is a non-invasive, radiation-free, non-contact, simple procedure and its sensitivity in detecting myocardial ischemia has been demonstrated in numerous studies 17,18,19,20,21,22. We believe that MCG can fill a gap in the non-invasive assessment of coronary artery disease. However, how to analyze MCG data is a major challenge for clinicians, thus limiting its widespread application. In this study, we developed an AI-enabled method for IHD diagnosis and localization of obstructed coronary arteries and cardiac ischemic regions from MCG data. The performance of the developed method was evaluated on a large-scale, multi-center, retrospective cohort study data. Our future work will focus on the clinical translation of the technique that we developed in this study. Despite its potential values for early screening of ischemic heart disease, prospective clinical trial are required to validate such capabilities. Once thoroughly validated, the technique that we developed in this study may boost the integration of MCG examination into clinical routine to generate automated diagnostic reports.
While our study demonstrated the promising application of deep learning algorithms to MCG signal processing and interpretation, several important limitations warrant discussion. First, our method was validated only on data collected from Chinese population, which might raise the question whether similar performance could be achieved when our method would be applied to other ethnic groups. Second, the patient cohort used in our study shows disproportionate representations, with male patients comprising 70% of the population and a predominance of middle-aged individuals (45-65 years). Geographic distribution is also skewed toward urban residents with overrepresented common comorbidities such as hypertension and diabetes. These demographic imbalances, coupled with variations in coronary artery morphology that may influence MCG signal characteristics, suggests potential challenges in generalizing the proposed model to other patient cohorts. Third, environmental factors present another challenge, as MCG measurements can be influenced by variations in data collection environments, equipment calibration differences, and ambient electromagnetic interference levels across different healthcare facilities. Future studies should prioritize balanced recruitment strategies across age groups, genders, geographic locations, and comorbidity profiles to enhance the proposed model’s robustness and clinical applicability.
In conclusion, this study established a baseline for the practicability of an AI-enabled approach in MCG analysis, providing a reference and feasible report for other researchers.
Methods
Study approval
The study was approved by local institutional review boards (IRBs) (Approval No. 2022-YS-181 from the Sixth People’s Hospital of Shanghai, Shanghai Jiao Tong University, China and Approval No. SHSY-IEC-4.1/21-195/01 from the Tenth People’s Hospital of Shanghai, Shanghai Jiao Tong University, China). The study complies with the Declaration of Helsinki. All patients gave written informed consent.
The proposed MCG processing pipeline
As illustrated in Fig. 5, MCG screening is collected at a sampling rate of 1000 Hz using axial gradiometer sensors placed at 36 locations on a horizontal plane above the chest. The spatial arrangement ensures full coverage of a scanning area of \(25 \times 25cm^2\). The duration of a MCG examination is approximately 540 seconds, implemented using a 36-channel unshielded SQUID-based MCG system (Shanghai MEDI Instruments Ltd., China).
Subsequently, following standard operation protocol,, we implement following noise suppression strategies. First, a three-axis magnetometer is incorporated to measure environmental magnetic field fluctuation and compensate for its effects on the magnetic gradiometer measurements. Additionally, an adaptive noise compensation algorithm, based on dynamic adjustments of compensation coefficients for the three-axis magnetometers, has been developed to further enhance the noise compensation process. Considering that the major physiological information of the heart is concentrated within the frequency range of 0.5-40 Hz, offline signal processing techniques are employed for noise reduction. Specifically, finite impulse response (FIR) filtering is utilized to eliminate high-frequency signals and power line interference. To achieve this, the data is preprocessed using a low-pass filter with a cutoff frequency of 40 Hz, along with a bandstop filter ranging from 48.5 Hz to 51.5 Hz. Then, the processed heart signal is divided into small segments representing each cardiac cycle. Using the template-matching method, segments exhibiting significant artifacts are removed, leaving behind clean segments for further analysis. These remaining segments are then aligned and averaged, resulting in the average MCG recording for a single cardiac cycle. This averaging process effectively eliminates low frequency fluctuations, pulse spikes, and other interferences. Finally, the four major cardiac events are precisely delineated on averaged signals to obtain magnetic field map sequences representing the QRS interval and the TT interval based on our previously introduced method 30.
Algorithm development
In this study, we propose a multi-task learning-based framework for joint diagnosis of myocardial ischemia, localization of ischemic LV region and localization of coronary artery stenosis. Specifically, we approach IHD diagnosis as a binary classification problem, aiming to determine the presence or absence of IHD, represented by a binary diagnostic label \(d\in \{(0,1\}\). Simultaneously, we formulate localization of obstructed coronary artery and localization of ischemic LV region as multi-label classification problem. For localization of obstructed coronary artery, we have ground truth label \(l_k\in \{0,1\}\), where k corresponds to three categories of coronary artery \(k\in \{LAD, LCX, RCA\}\). Similarly, for localization of ischemic region, we have ground truth label \(l_j\in \{(0,1\}\), where j pertains to five categories of LV segments \(j\in \{AP, AW, SW, IW, LW\}\).
The overall network architecture of proposed framework is presented in Fig. 6A, which features three parallel multiscale spatio-temporal feature extractors (MSFEs) to extract task related features, and three graph convolution based feature fusion units (GCNs) to aggregate information from different tasks. We adopt a two stage training strategy. In the first training stage, we independently train three MSFEs with single task setup, with each unit supervised with their own loss, respectively designed for diagnosis of myocardial ischemia (\({MSFE}_{IHD}\)), localization of ischemic LV region (\({MSFE}_{SPECT}\)) and localization of coronary artery stenosis (\({MSFE}_{CAG}\)). Once the MSFEs are trained, we can represent an MCG recording as 9 feature vectors. Additionally, three parallel GCN units, namely \({GCN}_{IHD}\), \({GCN}_{SPECT}\) and \({GCN}_{CAG}\), are employed to further fuse information of different tasks. After training, our network can output three sets of probabilities, one set for IHD diagnosis, one set for localization of five ischemic LV regions and one set for localization of three coronary artery stenosis. Details about each unit will be presented below.
The design of MSFEs unit includes multiscale 3D convolution blocks (MS-3D Conv) and stacked vision transformers (VIT), as shown in Fig. 6B. The 3D convolution blocks extract spatio-temporal features, followed by two 3D bottleneck branches with varying kernel size along the temporal dimension. In addition, squeeze-excitation (SE) block36 is injected in each layer of CNN blocks to employ channel-wise attention for improved performance. For an input averaged MCG recording, we first extract QRS sequence with m samples and TT sequence with n samples. Let us denote QRS sequence as \(S_{QRS}=[s_1,...,s_m]_{QRS}\), TT sequence as \(S_{TT}=[s_1,...,s_n]_{TT}\), the dimension of magnetic field map at time stamp i as \(s_i\in \mathbb {R}^{6\times 6\times 1}\) where \(6\times 6\) represents the sensor spatial configuration. For IHD diagnosis, \({MSFE}_{IHD}\) receives TT sequence as input and outputs a feature set \(\bar{x}_{IHD}=\left\{ \bar{x}_{t}|t\in \left\{ IHD\right\} \right\}\). For ischemic region localization and coronary artery stenosis localization, \({MSFE}_{SPECT}\) and \({MSFE}_{CAG}\) both receive a joint input of TT sequence and QRS sequence, where features from TT sequence and QRS sequence are concatenated inside the corresponding feature extractor. Accordingly, we denote the output of \({MSFE}_{SPECT}\) as feature set \(\bar{x}_{SPECT}=\left\{ \bar{x}_{j}|j\in \left\{ AP, AW, SW, IW, LW \right\} \right\}\), and the output of \({MSFE}_{CAG}\) as feature set \(\bar{x}_{CAG}=\left\{ \bar{x}_{k}|k\in \left\{ LAD,LCX,RCA \right\} \right\}\). During training, the MSFEs unit is attached with 9 prediction heads corresponding to \(1+5+3=9\) predicted probabilities from three tasks, with each head comprising three fully-connected layers and an activation layer with sigmoid activation. After training, we fix the weight of MSFEs unit. Then, for each MCG recording, the trained MSFEs generate a total of 9 feature vectors from all three task branches, which are served as input to the next stage.
In the second training stage, we fix the weights of MSFEs and fine-tune the subsequent GCN unit. Specifically, each task is assigned with an 2-layer GCN unit, where prior knowledge of coronary arteries and irrigated LV regions are leveraged for information aggregation. To model relationship between three coronary arteries and five LV regions, we construct a 9-node adjacency matrix \(A\in \mathbb {R}^{9\times 9}\), whose nodes correspond to IHD diagnosis, three coronary arteries, and five LV regions, respectively. As illustrated in Fig. 7A, the node representing IHD diagnosis is connected to all other nodes, while the nodes representing LAD, LCX, and RCA are connected to the corresponding LV regions. Details of proposed GCN unit are illustrated in Fig. 7B. Let use denote input feature set to GCN layer as \(\bar{X}=\left\{ \bar{x}_{IHD}, \bar{x}_{SPECT}, \bar{x}_{CAG} \right\}\) and \(\bar{X}\in \mathbb {R}^{9\times 288}\), where 9 is the number of nodes and 288 is the predefined hidden dimension. We thus obtain the output enhanced feature set \(\bar{Z}=\left\{ \bar{z}_{IHD}, \bar{z}_{SPECT}, \bar{z}_{CAG} \right\}\) which has the same dimension as the input:
and
where I is an identity matrix; \(\tilde{D}\) is the degree matrix of \(\tilde{A}\); \(W^{\left( 0 \right) }\) and \(W^{\left( 1 \right) }\) are trainable weights for corresponding GCN layers; \(\sigma\) is the activation function.
Eventually, the output features of GCNs are sent to corresponding prediction head, obtaining probability for IHD diagnostic \(\hat{d}\), probabilities for localization of coronary artery stenosis \(\hat{l}_k, k\in \{LAD, LCX, RCA\}\) and probabilities for localization of ischemic region \(\hat{l}_j,j\in \{AP, AW, SW, IW, LW\}\).
For IHD diagnosis, assuming that the ground truth label for the i-th MCG recording is \(d^i\), and the corresponding output from the last fully-connected layer of IHD diagnosis branch is \(\hat{d}^i\) , we compute the binary cross-entropy loss
where \(N_{total}\) is the number of MCG recordings in a batch.
For localization of coronary artery stenosis, assuming that the ground truth label for the i-th MCG recording in the k-th coronary artery is \(l_k^i, k\in \{LAD, LCX, RCA\}\), and the corresponding predicted coronary artery stenosis probability \(\hat{l}_k^i\), we compute the binary cross-entropy loss for each coronary artery
where \(N_{CAG}\) is the number of MCG recordings that have annotations of coronary artery stenosis in a batch.
For localization of ischemic region, assuming that the ground truth label for the i-th MCG recording in the j-th region is \(l_{j}^{i},j\in \{AP, AW, SW, IW, LW\}\), and the corresponding predicted ischemic region probability \(\hat{l}_{j}^{i}\), we compute the binary cross-entropy loss for each region
where \(N_{SPECT}\) is the number of MCG recordings that have annotations of ischemic region in a batch.
In summary, the overall loss function of the proposed approach is
where the same loss function is applied in two training stages.
(A) Illustration of the incorporated anatomical prior knowledge, featuring the relationship between three coronary arteries and five LV regions, (B) design of the graph convolution based feature fusion (GCN) unit and the output feature selection process for GCN unit corresponding to IHD diagnosis (\({GCN}_{IHD}\)), localization of ischemic region (\({GCN}_{SPECT}\)) and localization of coronary artery stenosis (\({GCN}_{CAG}\)), respectively.
Implementation details
All methods reported in this study are implemented in Python using Pytorch framework and are trained and tested on a workstation with 2.7 GHz Intel Xeon(R) Silver 4214R CPU and a single GeForce RTX 3090 graphics card with 24.5 GB GPU memory. We pretrain the three feature extractors for approximately 240 epochs each, and finetune the proposed network with feature fusion module and prediction head for 20 epochs. We adopt the cosine learning rate scheduler 37 with initial learning rate \(5e^{-6}\) and reached at the target learning rate \(1e^{-4}\) after the first epoch. The AdamW optimizer 38 is adopted, with a weight decay 0.05. At the first training stage, the batch size is set to be 5 to train three MSFEs, while at the second training stage, the batch size is set to be 10.
Experimental setup
We conducted a five-fold stratified cross validation study on the development dataset. Within each fold, the subjects were divided into 80-20% training-testing splits, with 5% of the training set allocated as a validation set. The IHD diagnostic performance of the proposed approach was assessed on the combined testing set of all subgroups (the combined group), as well as on the SPECT group and the CAG group. The cardiac ischemic region localization performance was evaluated only on the SPECT group, while the coronary artery stenosis localization performance was evaluated only on the CAG group. We further validated the proposed approach on the independent validation dataset using a majority voting ensemble method.
Statistical analysis
The end points of this study concerned the evaluation of MCG on diagnosis and localization of IHD in terms of sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), F1 score and accuracy in identifying patients with significant IHD, which was defined on CAG as stenosis in at least one coronary artery with diameter of 70% or more, or on SPECT as reduced blood flow in at least one region on the polar map. For each metric, we report the mean value and the \(95\%\) confidence interval (CI). For a comprehensive evaluation of the model’s performance, we employ receiver operating characteristic (ROC) curve and area under the ROC curve (AUC) score. The statistical analysis was performed using statistical python packages including Scipy (version 1.9.1, https://scipy.org/install/) and Scikit-learn (version 1.2.2, https://scikit-learn.org/stable/).
Data availability
The datasets generated during and/or analyzed during the current study are available from the co-first author Prof. Shulin Zhang (email: zhangsl@mail.sim.ac.cn) on reasonable request.
Code availibility
The source code is available at GitHub https://github.com/gloriatao/MCG_diagnosis.
References
Salari, N. et al. The global prevalence of myocardial infarction: A systematic review and meta-analysis. BMC Cardiovasc. Disord. 23, 206 (2023).
Herrington, W., Lacey, B., Sherliker, P., Armitage, J. & Lewington, S. Epidemiology of atherosclerosis and the potential to reduce the global burden of atherothrombotic disease. Circ. Res. 118, 535–546 (2016).
Duncker, D. J., Koller, A., Merkus, D. & Canty Jr, J. M. Regulation of coronary blood flow in health and ischemic heart disease. Prog. Cardiovasc. Dis. 57, 409–422 (2015).
Brewer, L. C., Svatikova, A. & Mulvagh, S. L. The challenges of prevention, diagnosis and treatment of ischemic heart disease in women. Cardiovasc. Drugs Ther. 29, 355–368 (2015).
Han, X. et al. Magnetocardiography-based coronary artery disease severity assessment and localization using spatiotemporal features. Physiol. Meas. 44, 125002 (2023).
Heidecker, B. Rediscovery of magnetocardiography for diagnostic screening and monitoring of treatment response in cardiology. Eur. Heart J. 44, 2140–2142 (2023).
Dutz, S., Bellemann, M. E., Leder, U. & Haueisen, J. Passive vortex currents in magneto-and electrocardiography: Comparison of magnetic and electric signal strengths. Phys. Med. Biol. 51, 145 (2005).
Smith, F. E. et al. Comparison of magnetocardiography and electrocardiography: A study of automatic measurement of dispersion of ventricular repolarization. , Europace 8, 887–893 (2006).
Danad, I. et al. Comparison of coronary CT angiography, spect, pet, and hybrid imaging for diagnosis of ischemic heart disease determined by fractional flow reserve. JAMA Cardiol. 2, 1100–1107 (2017).
Dewey, M. et al. Clinical quantitative cardiac imaging for the assessment of myocardial ischaemia. Nat. Rev. Cardiol. 17, 427–450 (2020).
Tantimongcolwat, T., Naenna, T., Isarankura-Na-Ayudhya, C., Embrechts, M. J. & Prachayasittikul, V. Identification of ischemic heart disease via machine learning analysis on magnetocardiograms. Comput. Biol. Med. 38(1), 817–825 (2008).
Tuohinen, S. S. et al. Associations between ECG changes and echocardiographic findings in patients with acute non-ST elevation myocardial infarction. J. Electrocardiol. 51, 188–194 (2018).
Liga, R. et al. Multicentre multi-device hybrid imaging study of coronary artery disease: results from the evaluation of integrated cardiac imaging for the detection and characterization of ischaemic heart disease (evinci) hybrid imaging population. Eur. Heart J.-Cardiovasc. Imaging 17, 951–960 (2016).
Xiao, W. et al. A movable unshielded magnetocardiography system. Sci. Adv. 9, eadg1746 (2023).
Drung, D. et al. Highly sensitive and easy-to-use squid sensors. IEEE Trans. Appl. Superconduct. 17, 699–704 (2007).
Kominis, I., Kornack, T., Allred, J. & Romalis, M. V. A subfemtotesla multichannel atomic magnetometer. Nature 422, 596–599 (2003).
Tao, R. et al. Magnetocardiography-based ischemic heart disease detection and localization using machine learning methods. IEEE Trans. Biomed. Eng. 66, 1658–1667 (2018).
Lim, H. K., Chung, N., Ko, Y.-G., Lee, Y.-H. & Park, Y. K. Magnetocardiogram difference between healthy subjects and ischemic heart disease patients. IEEE Trans. Magnet. 45, 2890–2893 (2009).
Kwong, J. S., Leithäuser, B., Park, J.-W. & Yu, C.-M. Diagnostic value of magnetocardiography in coronary artery disease and cardiac arrhythmias: A review of clinical data. Int. J. Cardiol. 167, 1835–1842 (2013).
Brala, D. et al. Application of magnetocardiography to screen for inflammatory cardiomyopathy and monitor treatment response. J. Am. Heart Assoc. 12, e027619 (2023).
Robnik-Šikonja, M., Radović, M., Đorović, S., An đelković-Ćirković, B. & Filipović, N. Modeling ischemia with finite elements and automated machine learning. J. Comput. Sci. 29, 99–106 (2018).
Zhang, J. et al. Automated localization of myocardial infarction from vector cardiographic via tensor decomposition. IEEE Trans. Biomed. Eng. 70, 812–823 (2022).
Cuneo, B. F. et al. In utero diagnosis of long qt syndrome by magnetocardiography. Circulation 128, 2183–2191 (2013).
Fenici, R., Brisinda, D., Meloni, A. M., Sternickel, K. & Fenici, P. Clinical validation of machine learning for automatic analysis of multichannel magnetocardiography. In International Workshop on Functional Imaging and Modeling of the Heart. 143–152 (Springer, 2005).
Huang, X., Chen, P., Tang, F. & Hua, N. Detection of coronary artery disease in patients with chest pain: A machine learning model based on magnetocardiography parameters. Clin. Hemorheol. Microcirc. 78, 227–236 (2021).
Siontis, K. C., Noseworthy, P. A., Attia, Z. I. & Friedman, P. A. Artificial intelligence-enhanced electrocardiography in cardiovascular disease management. Nat. Rev. Cardiol. 18, 465–478 (2021).
Attia, Z. I. et al. An artificial intelligence-enabled ECG algorithm for the identification of patients with atrial fibrillation during sinus rhythm: A retrospective analysis of outcome prediction. Lancet 394, 861–867 (2019).
Attia, Z. I. et al. Screening for cardiac contractile dysfunction using an artificial intelligence-enabled electrocardiogram. Nat. Med. 25, 70–74 (2019).
Yao, X. et al. Artificial intelligence-enabled electrocardiograms for identification of patients with low ejection fraction: a pragmatic, randomized clinical trial. Nat. Med. 27, 815–819 (2021).
Tao, R. et al. Mcg-net: End-to-end fine-grained delineation and diagnostic classification of cardiac events from magneto cardiographs. IEEE J. Biomed. Health Inform. 26, 1057–1067 (2022).
Ous, R. 2013 esc guidelines on the management of stable coronary artery disease. Eur. Heart J. 34, 2949–3003 (2013).
Myocardial on Segmentation, A. H. A. W. G. et al. Standardized myocardial segmentation and nomenclature for tomographic imaging of the heart: A statement for healthcare professionals from the Cardiac Imaging Committee of the Council on Clinical Cardiology of the American Heart Association. Circulation 105, 539–542 (2002).
Pille, M. et al. Cardiac magnetic field map topology quantified by Kullback–Leibler entropy identifies patients with clinically suspected myocarditis. Front. Cardiovasc. Med. 10, 1276321 (2023).
Selvaraju, R. R. et al. Grad-cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV). 618–626 (2017).
Vrints, C. et al. 2024 ESC guidelines for the management of chronic coronary syndromes: Developed by the task force for the management of chronic coronary syndromes of the european society of cardiology (esc) endorsed by the european association for cardio-thoracic surgery (eacts). Eur. Heart J. 45, 3415–3537 (2024).
Cao, Y., Xu, J., Lin, S., Wei, F. & Hu, H. Gcnet: Non-local networks meet squeeze-excitation networks and beyond. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops (2019).
Loshchilov, I. & Hutter, F. SGDR: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983 (2016).
Loshchilov, I. & Hutter F. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101 (2017).
Acknowledgements
The study was partially supported by the National Key Research and Development Program of China (Project No. 2022YFC2407004), by the National Key laboratory of functional materials for informatics open funding project (Project No. SKL2022) and by the National Natural Science Foundation of China (Project No. U20A20199).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Tao, R., Zhang, S., Zhang, R. et al. AI-enabled diagnosis and localization of myocardial ischemia and coronary artery stenosis from magnetocardiographic recordings. Sci Rep 15, 6094 (2025). https://doi.org/10.1038/s41598-025-90615-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-025-90615-x
Keywords
This article is cited by
-
Magnetoionography enhances diagnostic accuracy of magnetocardiography in coronary artery disease
Scientific Reports (2025)