CoRe-ECG: Advancing Self-Supervised Representation Learning for 12-Lead ECG via Contrastive and Reconstructive Synergy
Authors: Zehao Qin, Xiaojian Lin, Ping Zhang, Hongliang Wu, Xinkang Wang, Guangling Liu, Bo Chen, Wenming Yang, +1 more
Organizations: Department of Electronic Engineering, Shenzhen International Graduate School, Tsinghua University, Shenzhen 518071, PR China · Department of Cardiology, Beijing Tsinghua Changgung Hospital, School of Clinical Medicine, Tsinghua Medicine, Tsinghua University, Beijing, 102218, PR China · Department of Anesthesiology, National Cancer Center/National Clinical Research Center for Cancer/Cancer Hospital, Chinese Academy of Medical Sciences and Peking Union Medical College, Beijing, 100021, PR China · Department of Electrocardiographic Diagnosis, Fuzhou University Affiliated Provincial Hospital, Fuzhou, 350001, PR China · Department of Electronic Engineering, Tsinghua University, Beijing 100084, PR China · Shanghai AI Laboratory, Shanghai, 200232, PR China
Accurate interpretation of electrocardiogram (ECG) remains challenging due to the scarcity of labeled data and the high cost of expert annotation. Self-supervised learning (SSL) offers a promising solution by enabling models to learn expressive representations from unlabeled signals. Existing ECG SSL methods typically rely on either contrastive learning or reconstructive learning. However, each approach in isolation provides limited supervisory signals and suffers from additional limitations, including non-physiological distortions introduced by naive augmentations and trivial correlations across multiple leads that models may exploit as shortcuts. In this work, we propose CoRe-ECG, a unified contrastive and reconstructive pretraining paradigm that establishes a synergistic interaction between global semantic modeling and local structural learning. CoRe-ECG aligns global representations during reconstruction, enabling instance-level discriminative signals to guide local waveform recovery. To further enhance pretraining, we introduce Frequency Dynamic Augmentation (FDA) to adaptively perturb ECG signals based on their frequency-domain importance, and Spatio-Temporal Dual Masking (STDM) to break linear dependencies across leads, increasing the difficulty of reconstructive tasks. Our method achieves state-of-the-art performance across multiple downstream ECG datasets. Ablation studies further demonstrate the necessity and complementarity of each component. This approach provides a robust and physiologically meaningful representation learning framework for ECG analysis.
Figures & tables
Figure 1: Overview of CoRe Learning. Our approach integrates Contrastive Learning and Reconstructive Learning in a unified framework. The model reconstructs the original ECG signal while simultaneously aligning the global representations of the original signal and its augmented view. This design allows the two learning paradigms to remain compatible and to mutually reinforce each other.
Figure 2: Overview of the CoRe-ECG architecture, which consists of two parallel branches: the Contrastive Branch and the Reconstructive Branch. In (a), we utilize frequency dynamic augmentation to generate an augmented view, which is transformed into a global representation via the encoder-projection structure. Simultaneously, the visible representations of the raw signal extracted by the Encoder are passed through the decoder-projection module to yield a corresponding global representation. The contrastive loss is calculated between these two representations. In (b), the input undergoes spatio-temporal dual masking and is processed by the encoder-decoder network to reconstruct the original input signal. The reconstruction loss is computed exclusively on the masked patches.
Figure 3: The structure of Spatio-Temporal Dual Masking (STDM).
Figure 4: Illustration of Frequency Dynamic Augmentation (FDA). By modulating frequency components in the magnitude spectrum based on learnable importance, FDA preserves critical physiological semantics while introducing diverse perturbations.
Figure 5: Schematic illustration of the downstream fine-tuning phase.
Methods
PTB-XL
ICBEB2018
Ningbo
ACC ↑
F1 ↑
AUROC ↑
ACC ↑
F1 ↑
AUROC ↑
ACC ↑
F1 ↑
AUROC ↑
Supervised
71.4
60.2
89.6
75.3
73.7
93.7
83.2
37.6
83.9
MoCo V3 [ 15 ]
79.9
64.4
91.3
85.2
83.8
96.7
95.1
41.7
89.1
CMSC [ 16 ]
72.4
51.0
87.7
73.6
71.7
93.8
90.3
35.6
83.2
MTAE [ 21 ]
78.9
61.3
91.0
79.3
76.9
96.1
94.4
41.1
87.7
MLAE [ 21 ]
80.2
62.5
91.5
83.4
81.6
97.3
95.7
41.3
89.6
Table 1: Performance comparison among our model and baseline methods on three ECG datasets. The best results are highlighted in bold and the second-best results are underlined.
Leads
Models
PTB-XL
ICBEB2018
Ningbo
ACC
F1
AUROC
ACC
F1
AUROC
ACC
F1
AUROC
12
ST-MEM
80.9
63.4
92.9
87.2
82.0
97.7
97.2
42.5
90.8
CoRe-ECG
81.4
69.5
94.2
86.9
84.0
97.9
97.7
43.4
92.2
6
ST-MEM
76.8
57.7
90.2
80.3
77.7
95.2
95.1
36.7
89.4
CoRe-ECG
77.1
60.7
90.3
81.0
78.8
96.3
96.7
38.1
90.9
1
ST-MEM
67.4
42.1
81.5
71.1
68.8
93.7
93.3
23.1
86.5
Table 2: Performance comparison under different numbers of leads across three ECG datasets. The best results for each lead configuration are highlighted in bold.
Data Ratio
Models
PTB-XL
ICBEB2018
Ningbo
ACC
F1
AUROC
ACC
F1
AUROC
ACC
F1
AUROC
100%
ST-MEM
80.9
63.4
92.9
87.2
82.0
97.7
97.2
42.5
90.8
CoRe-ECG
81.4
69.5
94.2
86.9
84.0
97.9
97.7
43.4
92.2
50%
ST-MEM
79.4
61.2
92.7
84.7
81.6
97.3
95.3
36.9
86.7
CoRe-ECG
80.5
64.7
93.3
86.2
83.3
97.6
96.5
37.1
88.3
5%
ST-MEM
74.5
53.4
86.4
81.7
80.9
95.4
93.0
27.1
82.0
Table 3: Performance comparison under different training data ratios (100%, 50%, and 5%) on three ECG datasets. The best results for each data ratio are highlighted in bold.
Method
PTB-XL
ICBEB2018
Ningbo
ACC
F1
AUROC
ACC
F1
AUROC
ACC
F1
AUROC
Contrastive Learning
80.6
68.7
93.6
83.4
82.5
97.0
96.3
41.1
91.3
Reconstructive Learning
81.2
69.1
94.0
84.4
83.0
97.3
96.5
42.4
91.7
CoRe Learning
81.4
69.5
94.2
86.9
84.0
97.9
97.7
43.4
92.2
Table 4: Ablation study of different pre-training paradigms across three datasets. CoRe Learning (Ours) combines contrastive and reconstructive objectives. The best results for each dataset are highlighted in bold.
STDM
FDA
PTB-XL
ICBEB2018
Ningbo
ACC
F1
AUROC
ACC
F1
AUROC
ACC
F1
AUROC
×
×
80.0
66.1
92.3
83.7
81.4
96.4
94.1
41.3
89.7
×
✓
80.1
66.4
92.6
84.1
82.3
96.7
94.8
41.7
90.0
✓
×
80.6
67.8
93.7
84.9
82.8
97.1
96.1
42.3
90.7
✓
✓
81.4
69.5
94.2
86.9
84.0
97.9
97.7
43.4
92.2
Table 5: Ablation study of the proposed STDM and FDA. The checkmark ( ✓ ) indicates the component is included, and ( × ) indicates it is not.
Figure 6: Sensitivity analysis of the Time Full Mask Rate ( Ptime ) and Lead Drop Rate ( Plead ) in STDM strategy.
Figure 7: Visual comparison of reconstruction fidelity between ST-MEM (a) and our method (b). Red lines represent the reconstructed signals, while blue lines denote the original signals.
Figure 8: T-SNE visualization of the learned representations fine-tuned on two datasets. ICBEB2018 with 9 diagnostic categories. PTB-XL with 5 diagnostic categories.
Department of Computer Engineering, University of Kurdistan, Sanandaj, Iran · Department of Mathematics and Operational Research, University of Mons, Mons, Belgium
Graduate School of Engineering Science Yokohama National University Yokohama, Japan · Division of Cardiology Yokohama City University Medical Center Yokohama, Japan · Technology and Innovation Department Fukuda Denshi Co.,Ltd Tokyo, Japan