Abstract
Obtaining labelled ECG data for developing supervised models is challenging. Contrastive learning (CL) has emerged as a promising pretraining approach that enables effective transfer learning with limited labelled data. However, existing CL frameworks either focus solely on global context or fail to exploit ECG-specific characteristics. Furthermore, these methods rely on hard contrastive targets, which may not adequately capture the continuous nature of feature similarity in ECG signals. In this paper, we propose Beat-SSL, a contrastive learning framework that performs dual-context learning through both rhythm-level and heartbeat-level contrasting with soft targets. We evaluated our pretrained model on two downstream tasks: 1) multilabel classification for global rhythm assessment, and 2) ECG segmentation to assess its capacity to learn representations across both contexts. We conducted an ablation study and compared the best configuration with three other methods, including one ECG foundation model. Despite the foundation model's broader pretraining, Beat-SSL reached 93% of its performance in multilabel classification task and surpassed all other methods in the segmentation task by 4%.
We propose an ECG CL framework that considers both global and local context by leveraging the heartbeat-level contrasting for local context representation. First, we use the 12-lead ECG as input, which are transformed into the 3D VCG domain and augment the signal using the 3KG strategy. Subsequently, we apply contrastive learning in both global and local contexts. We introduce two soft contrastive strategies that utilised ECG feature similarity as a continuous target between 0 and 1, moving beyond binary positive-negative pairs. Finally, we validate the model on two downstream tasks: multilabel classification for global context evaluation and ECG wave segmentation for local context evaluation.
Ablation study.
Comparison on PTB-XL superdiagnostic classification - F1-score
Comparison on LUDB segmentation - F1-score
FComparison on LUDB segmentation - Dice-score
BibTeX
@inproceedings{rizqyawanBeatSSL2026,
title={Beat-SSL: Capturing Local ECG Morphology Through Heartbeat-Level Contrastive Learning with Soft Targets},
author={M.I. Rizqyawan and P. MacFarlane and S. Hadjidemetriou and F. Deligianni},
year={2026},
}