Learning General Representation of 12-Lead Electrocardiogram with a Joint-Embedding Predictive Architecture
About
Electrocardiogram (ECG) captures the heart's electrical signals, offering valuable information for diagnosing cardiac conditions. However, the scarcity of labeled data makes it challenging to fully leverage supervised learning in the medical domain. Self-supervised learning (SSL) offers a promising solution, enabling models to learn from unlabeled data and uncover meaningful patterns. In this paper, we show that masked modeling in the latent space can be a powerful alternative to existing self-supervised methods in the ECG domain. We introduce ECG-JEPA, an SSL model for 12-lead ECG analysis that learns semantic representations of ECG data by predicting in the hidden latent space, bypassing the need to reconstruct raw signals. This approach offers several advantages in the ECG domain: (1) it avoids producing unnecessary details, such as noise, which is common in ECG; and (2) it addresses the limitations of naive L2 loss between raw signals. Another key contribution is the introduction of Cross-Pattern Attention (CroPA), a specialized masked attention mechanism tailored for 12-lead ECG data. ECG-JEPA is trained on the union of several open ECG datasets, totaling approximately 180,000 samples, and achieves state-of-the-art performance in various downstream tasks including diagnostic classification, feature extraction, and segmentation. Our code is openly available at https://github.com/sehunfromdaegu/ECG_JEPA.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| ECG Classification | CPSC 2018 | AUC98 | 23 | |
| Multi-class ECG Classification | PTB-XL | AUC93.4 | 10 | |
| Multi-class classification | PTB-XL (test) | AUC90.3 | 9 | |
| Multi-class classification | CPSC 2018 (test) | AUC97.3 | 9 | |
| Multi-label ECG classification | PTB-XL | AUC93.1 | 7 | |
| Multi-class ECG Classification | G12EC | AUC94 | 7 | |
| Multi-label ECG classification | G12EC | AUC90.6 | 7 | |
| ECG Feature Regression | PTB-XL normal-sample (test) | MAE (Heart Rate)0.4 | 6 | |
| Multi-Label Classification | PTB-XL (test) | AUC91.2 | 6 | |
| Multi-Label Classification | CPSC 2018 (test) | AUC96.6 | 6 |