Abstract
Left ventricular (LV) scar is a critical risk factor for sudden cardiac death and heart failure in patients with hypertrophic cardiomyopathy (HCM). While late gadolinium enhancement (LGE) on cardiac magnetic resonance imaging (MRI) is the current gold standard for scar detection, its utility is limited by high costs and susceptibility to artifacts from implanted cardioverter-defibrillators (ICDs). We present XplainScar, an explainable machine learning framework designed to detect and localize LV scar using standard 12-lead electrocardiogram (ECG) data. Developed using 500 patients from the Johns Hopkins HCM Registry and validated with 248 patients from the UCSF HCM Registry, XplainScar utilizes a combination of unsupervised clustering and self-supervised representation learning. The model achieves high performance, with an F1-score of 90% and a processing time of less than one minute for ten patients. Our findings reveal distinct ECG signatures for regional scarring: basal LV scar is primarily associated with QRS features, while mid and apical scars are dominated by T-wave features. XplainScar offers a scalable, interpretable, and device-independent tool for the longitudinal monitoring of HCM patients.
Introduction
Hypertrophic cardiomyopathy (HCM) is a common genetic heart disease characterized by unexplained LV hypertrophy. The presence of myocardial fibrosis, or LV scar, is a major prognostic marker for adverse outcomes, including life-threatening arrhythmias. Despite the diagnostic power of Cardiac MRI, many HCM patients—particularly those with ICDs—cannot be effectively monitored using this modality.
In contrast, the 12-lead ECG is a ubiquitous, low-cost diagnostic tool. However, identifying HCM-related scars via ECG is traditionally difficult due to the "patchy" and heterogeneous nature of the scarring compared to the more predictable patterns seen in myocardial infarction. XplainScar addresses this challenge by leveraging advanced machine learning to identify subtle ECG signatures that correlate with the presence and location of LV scars.
Methodology
The XplainScar framework is built on a multi-stage pipeline designed to maximize both accuracy and clinical interpretability:
- Feature Engineering: The model extracts 276 features from the ECG, focusing on ventricular depolarization (QRS) and repolarization (ST-T waves), while adjusting for demographic factors like age, sex, and heart mass.
- Unsupervised Clustering: To account for the high phenotypic variability in HCM, the model first groups patients with similar ECG patterns. This step is crucial; ablation studies showed that removing clustering reduced the F1-score by approximately 50%, as it allows the model to learn more specific signatures within sub-populations.
- Self-Supervised Representation Learning: Within these clusters, the model employs self-supervised learning to refine data representations, ensuring robust performance even when labeled MRI data is limited.
- Explainability (SHAP): Using Shapley Additive Explanations (SHAP), the framework identifies which specific ECG leads and wave components drive each prediction, providing clinicians with a transparent rationale for the AI's output.
Experimental Results
XplainScar was rigorously tested across two independent clinical registries, using Cardiac MRI (LGE) as the ground truth.
Performance and Generalization
- Internal Validation (JH Registry): The model achieved an F1-score of 0.92, with a sensitivity of 95% and specificity of 80%.
- External Validation (UCSF Registry): The model demonstrated strong generalizability, maintaining an F1-score of 0.89, sensitivity of 91%, and specificity of 78%.
- Scar Burden: Detection accuracy was highest in patients where the scar mass exceeded 10% of the total heart mass, achieving near-perfect sensitivity in these cases.
Regional ECG Signatures
A key contribution of XplainScar is the localization of scars to the basal, mid, or apical LV myocardium. The model revealed that:
- Basal Scars: These are primarily reflected in QRS features (depolarization). Notably, lead aVR—often overlooked in routine clinical practice—was found to be highly predictive of scarring in the basal septum.
- Mid and Apical Scars: These are predominantly characterized by T-wave features (repolarization).
Discussion and Clinical Impact
XplainScar significantly outperforms traditional machine learning methods (such as SVMs) and standard deep learning architectures (CNNs) previously applied to HCM. Its computational efficiency—processing 10 patients in under a minute on standard hardware—makes it highly suitable for integration into clinical workflows, especially in resource-limited settings where MRI access is restricted.
Limitations
The study is currently retrospective, and while the model shows promise for longitudinal monitoring, prospective trials are required to confirm its ability to track scar progression over time. Additionally, while the model localizes scars effectively, it does not yet provide a precise volumetric quantification of the scar tissue.
Conclusion
XplainScar represents a significant advancement in cardiac diagnostics, transforming the standard ECG into a powerful tool for identifying structural heart disease. By providing an explainable and accessible alternative to MRI, XplainScar facilitates better risk stratification and monitoring for patients with hypertrophic cardiomyopathy. The model and code are publicly available to support further research and clinical adoption.
Summary updated