ECG-based transformer model predicts future left ventricular ejection fraction deterioration: from cross-sectional screening to longitudinal risk stratification
Y T Hong, J B Park, S E LeeAbstract
Background
Artificial intelligence (AI) models applied to 12-lead electrocardiography (ECG) have demonstrated high performance for detecting existing heart failure with reduced ejection fraction (HFrEF). However, whether these models can predict future left ventricular systolic dysfunction in patients with currently preserved ejection fraction remains largely unexplored.
Purpose
To evaluate a self-supervised ECG transformer model for (1) cross-sectional HFrEF detection and (2) longitudinal prediction of incident left ventricular ejection fraction (LVEF) deterioration below 40% in patients with preserved baseline function.
Methods
A multi-variate time series transformer (MV-TST) pre-trained on MIMIC-IV ECG data using masked autoencoding1 was fine-tuned on 23,171 ECG–echocardiography pairs from 18,376 patients (HFrEF prevalence 6.9%; 2017–2025). ECGs were matched to echocardiograms acquired within ±7 days. For longitudinal validation, patients with baseline LVEF ≥40% and at least one subsequent echocardiogram were identified (n=8,104). Baseline ECGs were used to predict incident LVEF <40% at any follow-up examination. Ten-fold cross-validation with pooled area under the receiver operating characteristic curve (AUROC) estimation was applied for the longitudinal task.
Results
Cross-sectional HFrEF detection: the fine-tuned regression model achieved AUROC 0.956, with sensitivity 92.4% at the Youden-optimal threshold. In the longitudinal cohort, 307 patients (3.8%) developed LVEF <40% over a median of 7.7 months (interquartile range 1.8–19.0 months) after the index ECG. The model achieved a pooled AUROC of 0.749 (95% CI: 0.717–0.779), with sensitivity 71.0% and specificity 68.5% at the Youden-optimal threshold.
Conclusions
A transformer-based ECG model achieves strong cross-sectional HFrEF discrimination (AUROC 0.956) and retains meaningful predictive signal for future LVEF deterioration (AUROC 0.749). ECG-based longitudinal risk stratification may facilitate earlier identification of patients at risk of developing systolic dysfunction prior to clinical presentation, potentially enabling pre-emptive therapeutic intervention.ECG Transformer for Future HFrEF Detection