Abstract
Deep learning has achieved impressive progress in automated electrocardiogram (ECG) analysis, yet its performance still relies heavily on large-scale labeled datasets. As ECG annotation requires cardiologists, this process is costly and time-consuming, limiting its scalability in clinical practice. Contrastive learning offers a promising alternative by enabling the extraction of generalizable representations from unlabeled ECG data. In this study, we propose Anatomy-Aware Contrastive Learning for ECG (ACL-ECG), a self-supervised method that incorporates cardiac anatomical relationships into contrastive learning. ACL-ECG employs a physiology-aware augmentation strategy to generate rhythm-preserving augmented views, including random scale cropping, cardiac-cycle masking, and temporal shifting. Furthermore, ECG leads are grouped into four anatomically meaningful regions-anterior, inferior, septal, and lateral-and region-level contrastive objectives are introduced to promote intra-region consistency while enhancing inter-region discriminability. Extensive evaluations of downstream tasks demonstrate that ACL-ECG consistently outperforms state-of-the-art contrastive baselines under linear probing, achieving improvements of up to 1.29% in the area under the receiver operating characteristic curve (AUROC) and 3.57% in the area under the precision-recall curve (AUPRC). Moreover, when fine-tuned using only 10% of labeled data, ACL-ECG attains a performance comparable to fully supervised training, effectively reducing annotation requirements by approximately 5∼8×. Ablation studies further confirm the contributions of both the physiology-aware augmentation strategy and the anatomy-aware contrastive objective. Overall, ACL-ECG enhances representation quality without increasing annotation burden, and provides a promising and anatomy-informed foundation for self-supervised ECG analysis in label-scarce settings.