Skip to main content
Back to timeline
arXivSource publication:

ECG pretraining now measures deviation from normal: frozen features gain up to 6.5% AUROC across four public datasets

Synopsis

Deep learning models for electrocardiograms are mostly trained with supervision tied to specific diagnostic labels, which makes them fragile when patient populations or acquisition settings change. This self-supervised pretraining framework learns features from 918,915 unlabeled 12-lead ECG recordings, with one path explicitly measuring each lead's deviation from normal waveform morphology and another reconstructing cross-lead associations under those deviation cues. With the feature extractor frozen and no downstream fine-tuning, it improves AUROC by up to 6.5% and F1 by up to 12.8% over prior methods on four public datasets.

Source-provided article image: Deviation-Aware Pretraining for Cardiovascular Disease Detection from Electrocardiograms
arXiv

Interpretation

ECG feature extraction gains a pretraining route that does not depend on diagnostic labels: the model learns how far each lead's waveform deviates from normal morphology, and how that deviation is corroborated across the 12 leads. Most earlier models were trained in a supervised, task-specific way with labels tied to particular diagnostic outcomes, so the learned associations were constrained by the training set's patient demographics, disease distribution and recording conditions, and the representations lacked diversity across samples, tasks and databases. After pretraining on 918,915 unlabeled 12-lead recordings, with the feature extractor frozen and no downstream fine-tuning, it improves AUROC by up to 6.5% and F1 by up to 12.8% over prior methods on four public datasets: PTB-XL, ML12L, CPSC2020 and WGEX.

The two embeddings divide the work: one compares an input segment against normal ECG prototypes to quantify per-lead waveform deviation, and the other uses those deviation cues to weight peer leads when reconstructing a target lead. The Deviation Localization Embedding (DLE) first builds a codebook of normal ECG prototypes through Bayesian clustering with Soft-DTW distance, then takes the root-mean-square error between an input lead and the retrieved normal prototypes as the per-lead deviation. The Association Reconstruction Embedding (ARE) feeds the selective fusion matrix derived from DLE into attention, giving higher weight to peer leads with stronger deviations; both embeddings are concatenated with the masked signal and sent to a multi-scale U-Net-like backbone with Mamba2 as its temporal core for symmetric masked reconstruction, with the loss computed only on masked positions.

Ablation attributes the gains to individual components: starting from a random-masking Transformer baseline, switching to the multi-scale backbone and adding symmetric masking raise balanced accuracy, while adding weighted rotational partial freezing alone (without DLE and DMb) lowers balanced accuracy on CPSC2020 from 0.466 to 0.454. The baseline reached balanced accuracy of 0.289 on CPSC2020 and 0.270 on WGEX; switching to the multi-scale backbone raised these to 0.397 and 0.337, and adding symmetric masking raised them to 0.466 and 0.464. The full model with all components reached balanced accuracy 0.538, F1 0.536 and AUROC 0.763 on CPSC2020, and 0.513, 0.471 and 0.787 on WGEX.

Perspective

The demonstrated scope is pretraining on 918,915 unlabeled 12-lead recordings, frozen-feature evaluation and external generalization comparison on four public datasets (PTB-XL, ML12L, CPSC2020 and WGEX), and a real-world observational clinical cohort without intervening in patient care; the authors propose next integrating state-of-the-art ECG-based CVD diagnosis models to further improve performance and provide more precise clinical decision support tools.

Absolute performance on the observational cohort remains limited by the cohort's heterogeneity, as the authors state; the deviation localization embedding alone has limited discriminative power for weak anomalies such as mild ST-segment elevation, where samples are more dispersed with overlapping boundaries; these conclusions come from retrospective datasets and an observational analysis, not prospective clinical validation.