Source-linked AI summary
Learning from VAE Errors to support ECG-based Differential Diagnosis of Myocardial Scar
Shayan Sharifi, Riccardo Treu, Ilaria Gandin, Federico Garoia, Marco Merlo, Giulia Cisotto
TL;DR
LGE is clinically useful for myocardial-scar assessment, but limited CMR accessibility motivates ECG-based screening. This study compares ECGx.AI and a shallower β-VAE, finding that latent features and DTW reconstruction errors discriminate LGE+ from LGE- patients, with error-based representations offering a compact screening alternative.
Problem
Limited accessibility of CMR motivates ECG-based screening for LGE-defined myocardial scar in cardiomyopathy patients.
Source: §1 · p. 1Method
The study compares LGE classification using ECGx.AI and a shallower β-VAE trained on normal ECGs, alongside DTW-based reconstruction errors.
Source: §2 · pp. 3–4, §4 · p. 7Results
ECGx.AI achieved AUROC 0.686 with Random Forest, the proposed β-VAE achieved AUROC 0.577 with Gradient Boosting, and DTW errors achieved AUROC 0.643 with Logistic Regression.
Source: §3 · pp. 6–7Takeaways & Limitations
DTW-based errors from a lighter β-VAE captured meaningful scar-related anomalies and provided a compact, interpretable alternative for assisting CMR prioritization.
Source: §4 · p. 8External multi-center validation, clinical-variable integration, and improved reconstruction-classification balancing remain necessary to assess and improve clinical utility.
Source: §4 · p. 8
Abstract
from arXiv · showhide
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.
1 Introduction and state of the art
LGE-visible myocardial scar is clinically useful but difficult to assess because CMR is costly and not uniformly available. ECG-based machine learning is therefore investigated as a screening approach for imaging-defined cardiac abnormalities.
- CMR-detectable myocardial fibrosis and scar support diagnosis, risk stratification, and clinical decision-making in cardiomyopathies.Source: §1 · p. 1
- CMR is costly, time-consuming, and not uniformly available, motivating ECG-based screening to prioritize patients for evaluation.Source: §1 · p. 1
- Fibrosis and focal scar may alter ventricular depolarization and repolarization, producing subtle QRS, ST-segment, and T-wave changes.Source: §1 · p. 1
- Deep learning has inferred imaging-defined cardiac phenotypes from ECG, but supervised approaches require large disease-specific labelled datasets.Source: §1 · p. 2
2 Materials and Methods
The study compares ECG representations from a pretrained foundation β-VAE and a shallower β-VAE trained on normal ECGs, then evaluates classifiers and DTW-based reconstruction errors for LGE discrimination. The pipeline varies representations, normalization, models, and validation while testing whether reconstruction errors differ between LGE classes.
Datasets and preprocessing
- The local cohort contained 300 patients with 10-second 12-lead ECGs, including 174 LGE+ and 126 LGE- cases; 3000 normal PTB-XL ECGs trained the proposed model.Source: §2 · p. 2
Baseline foundation model
- The ECGx.AI baseline uses a 32-dimensional latent space, seven-layer convolutional encoder and decoder, and training on 1.1 million ECGs from an unselected clinical population.Source: §2 · p. 3
Proposed β-VAE model
- The proposed β-VAE has four encoder layers, four decoder layers, a deterministic decoder, and training exclusively on normal PTB-XL ECGs.Source: §2 · p. 4
Reconstruction-error representation
- The proposed model reconstructed local-cohort ECGs and converted lead-wise block-wise DTW errors into a 12-dimensional feature vector per subject.Source: §2 · pp. 4–5
Representative reconstructions
- Representative reconstructions showed higher MSE and DTW errors for LGE+ than LGE- samples in Lead II.Source: §2 · p. 4, Figure 1 · p. 5
Downstream classification
- Classification varied input representation, normalization, machine-learning model, and cross-validation strategy, using five classifiers and multiple validation schemes.Source: §2 · pp. 4–5
Validation and tuning
- Hyperparameters were tuned within outer validation splits using inner three-fold grid search, while identical data splits were maintained across representations and models.Source: §2 · p. 5
Statistical analysis
- A two-tailed Mann-Whitney U test assessed lead-wise differences in DTW reconstruction-error distributions between LGE+ and LGE- patients.Source: §2 · p. 5
3 Results and Discussion
ECGx.AI latent features achieved the strongest classification performance, while DTW-based reconstruction errors substantially improved the shallow β-VAE pipeline and differed between LGE classes across nearly all leads.
- 0.686 AUROC was achieved by ECGx.AI with Random Forest, alongside 0.657 accuracy and 0.852 sensitivity.The corresponding specificity was 0.389.Source: §3 · p. 6
- 0.577 AUROC and 0.775 sensitivity were achieved by the shallow β-VAE with Gradient Boosting.Source: §3 · p. 7, Table 2 · p. 7
- 0.643 AUROC was reached by Logistic Regression when DTW-based reconstruction errors were used as shallow β-VAE input features.Extra Trees achieved 0.635 accuracy and 0.383 specificity with the same error-based representation.Source: §3 · pp. 6–7
- Significant DTW-reconstruction-error distribution differences were found between LGE+ and LGE- patients in all but two leads.The comparison used a two-sided non-parametric Mann-Whitney U test.Source: §3 · p. 7
4 Conclusions
The study evaluated ECG-derived representations for distinguishing LGE-defined myocardial scar in cardiomyopathy patients and compared a foundation encoder with a lighter β-VAE and its reconstruction errors. The results suggest that DTW-based errors can capture scar-related anomalies and offer a compact, interpretable screening alternative, although further validation is needed.
- The study compared ECGx.AI and a shallower β-VAE for LGE+ versus LGE- classification and evaluated DTW-based reconstruction errors for discrimination.Source: §4 · p. 7
- DTW-based reconstruction errors from the lighter β-VAE captured meaningful scar-related anomalies, whereas foundation representations had stronger latent discriminative capacity.Source: §4 · p. 8
- Error-based representation learning provided a compact and interpretable screening alternative to assist CMR prioritization.Source: §4 · p. 8
- External multi-center validation, clinical-variable integration, and improved balancing of reconstruction and classification objectives remain necessary to assess and improve clinical utility.Source: §4 · p. 8