RhythmX™: An Interpretable Self-Supervised Contrastive Learning Framework for Heartbeat Classification
Abstract
Automated electrocardiogram (ECG) arrhythmia classification remains challenging due to signal noise, inter-patient variability, and limited annotated data, which constrain the generalization of supervised learning approaches. This study presents a self-supervised ECG representation learning framework that combines contrastive pretraining with ensemble-based supervised classification. A signal-to-noise ratio criterion is applied during self-supervised pretraining to stabilize contrastive optimization, while all extracted ECG beats, including noisy segments, are retained during downstream evaluation. The learned representations are classified using a hybrid ensemble composed of convolutional encoders and tree-based models. Model evaluation follows strict patient-level partitioning with stratified 10-fold cross-validation and bootstrap-based uncertainty estimation on a held-out test set. Under this evaluation protocol, the framework achieved high beat-level performance on curated datasets (internal and external). Class-wise performance shows precision and recall values between 0.99 and 0.999 across normal, supraventricular, ventricular, fusion, and paced beat categories. External validation is conducted on independent ECG cohorts, including PTB-XL, Chapman–Shaoxing, and INCART 12-lead datasets. On these datasets, the hybrid model attains macro-F1 scores ranging from 0.91 to 0.94, compared with standalone convolutional and handcrafted feature-based Random Forest classifiers evaluated under identical conditions. These results characterize the behavior of the proposed representation learning framework across heterogeneous patient populations and recording configurations.
Fields of Study & Subjects
ECG Monitoring and Analysis
Cardiac electrophysiology and arrhythmias
Atrial Fibrillation Management and Outcomes
Publication details
- Journal / source
- Technologies
- Publisher
- MDPI AG
- Volume
- 14
- Issue
- 3
- Pages
- 148–148
- Publication date
- 1 March 2026
- Language
- EN