Explainable deep learning on magnetocardiography detects coronary artery disease, left ventricular dysfunction, and arrhythmia risk from a single scan
D Kranz, O Kahriman, D Dischl, S Treskatsch, A Sander, J Brachmann, J W Park, N WesselAbstract
Background
Magnetocardiography (MCG) records the cardiac magnetic field, which propagates through tissue with minimal distortion and preserves high-dimensional spatiotemporal structure that is attenuated in surface potentials like the ECG. While MCG is a promising non-invasive and radiation-free imaging modality, its adoption remains limited by a lack of clinical trust, stemming from small datasets, complex high-dimensional magnetic field data, and the absence of model interpretability. Recent advances in explainable deep learning provide a tractable path toward overcoming these barriers.
Purpose
We therefore developed a self-supervised deep learning framework, incorporating contrastive representation learning and Grad-CAM-based explainability, to detect high-burden CAD, left ventricular dysfunction, and arrhythmia risk from a single MCG scan. We hypothesised that self-supervised pretraining would yield embeddings capturing clinically relevant cardiac physiology, validated through interpretable activation maps.
Methods
We trained the deep learning encoder MCG2Vec unsupervised on 10-second, 64-channel sinus-rhythm MCG segments for generalised signal morphology. We then fine-tuned the encoder and a classifier for three clinical tasks on 1,732 consecutive cardiology patients, enrolled at a tertiary cardiology centre: detection of high-burden CAD (≥70 % stenosis), reduced left ventricular ejection fraction (LVEF <50 %), and atrial fibrillation (AF) risk. The model was evaluated using five-fold cross-validation at patient level. To provide interpretable signal attribution, we applied a one-dimensional variation of Grad-CAM and averaged the activation maps over all beats within each segment.
Results
The model classified high-burden CAD with an area under the curve (AUC) of 0.89 (95 % CI 0.82–0.93), with activation maps localising importance to the QRS onset and ST-T wave segments. Vessel-specific localisation of obstructive stenosis yielded distinct spatial topographies for the left anterior descending (AUC 0.89, 95 % CI 0.82–0.97), right coronary (AUC 0.84, 95 % CI 0.76–0.92), and left circumflex arteries (AUC 0.86, 95 % CI 0.78–0.94), with distinct channel importance patterns per vessel territory. Reduced LVEF was predicted with an AUC of 0.81 (95 % CI 0.71–0.91), driven primarily by QRS peak morphology. Paroxysmal AF was detected from sinus-rhythm signals with an AUC of 0.77 (95 % CI 0.69–0.85), based on P-wave and S-wave morphology. Across all tasks, activation patterns were consistent with established electrophysiological correlates, confirming physiologically grounded rather than spurious model decisions.
Conclusion
By combining strong diagnostic performance with physiologically interpretable signal attribution, this framework directly addresses the trust barriers limiting MCG adoption and offers a scalable, radiation-free pathway for multi-task cardiac screening, warranting prospective validation in multicentre cohorts.Explainable deep learning for MCG diagnosis