Learning from VAE Errors to support ECG-based Differential Diagnosis of Myocardial Scar
Using β-VAE to extract features from ECG for myocardial scar differentiation, achieving ROC of 0.643.
Key Findings
Methodology
This study utilizes a β-variational autoencoder (β-VAE) to extract features from electrocardiograms (ECG) to differentiate between LGE+ and LGE- cardiomyopathy patients. By comparing the ECGx.AI model and a shallower β-VAE trained on normal PTB-XL ECG data, downstream classification performance and dynamic time warping (DTW)-based reconstruction errors were evaluated. Machine learning models such as Random Forest and Gradient Boosting were used for classification.
Key Results
- The ECGx.AI model achieved an area under the ROC curve (AUROC) of 0.686 with Random Forest, with a sensitivity of 0.852.
- The shallow β-VAE model achieved an AUROC of 0.577 with Gradient Boosting, with a sensitivity of 0.775.
- DTW-based reconstruction errors significantly differed in 10 out of 12 leads, achieving an AUROC of 0.643 with Logistic Regression.
Significance
This research provides a low-cost, accessible screening method for myocardial scar differential diagnosis by extracting features from ECG. Compared to expensive and time-consuming CMR, ECG screening can be more widely applied in clinical practice, helping to identify patients who require further CMR evaluation.
Technical Contribution
The paper proposes a feature extraction method based on a shallow β-VAE, enabling myocardial scar classification without relying on large-scale labeled data. The analysis of DTW reconstruction errors provides a novel means of ECG anomaly detection.
Novelty
This is the first study to use DTW reconstruction errors for ECG classification of myocardial scars, combined with a shallow β-VAE model, offering a new unsupervised learning approach.
Limitations
- The shallow β-VAE model shows low reconstruction accuracy in cardiomyopathy patients, affecting classification performance.
- The study is validated only on a small local dataset, lacking multi-center data validation.
Future Work
Future research could explore multi-center dataset validation and incorporate clinical variables to enhance model classification performance. Further optimization of the balance between reconstruction and classification objectives is also needed.
AI Executive Summary
Myocardial scar is a key marker of cardiomyopathy, typically detected through cardiac magnetic resonance imaging (CMR). However, the high cost and limited accessibility of CMR restrict its widespread use. This paper proposes an ECG-based screening method using a β-variational autoencoder (β-VAE) to extract features from ECGs to differentiate between LGE+ and LGE- patients. The study demonstrates that features extracted using the ECGx.AI model and a shallow β-VAE model, combined with machine learning models such as Random Forest and Gradient Boosting, can effectively differentiate myocardial scar patients. Notably, DTW-based reconstruction errors significantly differed in 10 out of 12 leads, achieving an area under the ROC curve (AUROC) of 0.643 with Logistic Regression. This method provides a low-cost, accessible alternative for early screening of myocardial scars, with broad clinical application potential. Future research could explore multi-center dataset validation and incorporate clinical variables to enhance model classification performance.
Deep Analysis
Background
Myocardial scar is a key marker of cardiomyopathy, typically detected through cardiac magnetic resonance imaging (CMR). However, the high cost and limited accessibility of CMR restrict its widespread use. In recent years, machine learning methods based on electrocardiograms (ECG) have shown potential in cardiac disease diagnosis.
Core Problem
Effectively distinguishing between LGE+ and LGE- patients using ECG data is a significant research challenge. Existing methods often rely on large-scale labeled data, making them difficult to apply to small datasets.
Innovation
This paper proposes a feature extraction method based on a shallow β-VAE, combined with DTW reconstruction error analysis, enabling myocardial scar classification without relying on large-scale labeled data.
Methodology
- �� Use ECGx.AI and shallow β-VAE models to extract 32-dimensional features from ECG. • Calculate DTW reconstruction errors to generate a 12-dimensional feature vector. • Use Random Forest, Gradient Boosting, and other models for classification. • Apply Mann-Whitney U test to evaluate the significance of DTW errors.
Experiments
Experiments used local DCM/NDLVC datasets and PTB-XL datasets. The classification performance of ECGx.AI and shallow β-VAE models was compared, and the classification effect of DTW reconstruction errors was evaluated.
Results
The ECGx.AI model achieved an AUROC of 0.686 with Random Forest, while the shallow β-VAE model achieved an AUROC of 0.577 with Gradient Boosting. DTW reconstruction errors significantly differed in 10 out of 12 leads, achieving an AUROC of 0.643 with Logistic Regression.
Applications
This method can be used for early screening of myocardial scars, helping to identify patients who require further CMR evaluation, reducing the cost of CMR usage.
Limitations & Outlook
The shallow β-VAE model shows low reconstruction accuracy in cardiomyopathy patients, affecting classification performance. The study is validated only on a small local dataset, lacking multi-center data validation.
Plain Language Accessible to non-experts
Imagine a factory where machines make specific sounds when running smoothly. An ECG is like recording the heart's electrical activity. Researchers use a tool called β-VAE, like a smart listener, to extract important features from these sounds. Then, they use these features to determine if the heart has scars, just like diagnosing a machine's need for maintenance by listening to its sounds. This method is quick and can detect issues without dismantling the machine.
ELI14 Explained like you're 14
Imagine you're playing a music game, where different tracks represent different instruments. An ECG is like these tracks, recording the heart's electrical activity. Scientists use a tool called β-VAE, like a super headset in the game, to find the heart's secrets from these tracks. Then, they use this information to determine if the heart is healthy, just like judging if the band's performance is perfect. This method is fast and convenient, without needing expensive equipment!
Glossary
β-Variational Autoencoder (β-VAE)
A neural network model used for unsupervised learning, capable of learning compact representations from data.
Used to extract features from ECG to differentiate myocardial scars.
Dynamic Time Warping (DTW)
An algorithm for comparing time series similarity, capable of aligning sequences of different lengths.
Used to calculate ECG reconstruction errors to aid classification.
Myocardial Scar
A marker of myocardial fibrosis or damage, typically detected through CMR.
Used as a diagnostic marker for LGE+ patients.
Electrocardiogram (ECG)
A graph recording the heart's electrical activity, commonly used for cardiac health assessment.
Used as a data source for feature extraction and classification.
Random Forest
An ensemble learning method that classifies by voting results from multiple decision trees.
Used to evaluate the classification performance of extracted features.
Open Questions Unanswered questions from this research
- 1 How to validate the effectiveness of this method on multi-center datasets to enhance its clinical applicability.
- 2 How to incorporate more clinical variables to enhance model classification performance.
Applications
Immediate Applications
Myocardial Scar Screening
Quickly screen for myocardial scars using ECG data, helping to identify patients who need further CMR evaluation.
Long-term Vision
Cardiac Health Monitoring
Promote use in homes or communities, providing convenient cardiac health monitoring methods.
Abstract
Late Gadolinium Enhancement (LGE) on cardiac magnetic resonance is a key marker of myocardial scar, but its limited accessibility motivates routine ECG-based screening. We evaluated whether $β$-variational autoencoder (VAE)-derived ECG representations can discriminate LGE+ from LGE- cardiomyopathic patients in a local cohort of 300 subjects. We compared 32-dimensional features from the foundation ECGx.AI model with those from a shallower $β$-VAE trained on normal PTB-XL ECGs, evaluating downstream classification and Dynamic Time Warping (DTW)-based reconstruction errors. ECGx.AI reached an area under ROC of 0.686 with Random Forest, while the proposed $β$-VAE reached 0.577 with sensitivity of 0.775 with Gradient Boosting. Notably, DTW-reconstruction errors significantly differed between classes in 10 out of 12 leads according to Mann-Whitney U test and help in classification, leading to an area under ROC of 0.643 with Logistic Regression, supporting their potential as markers of scar-related ECG alterations.