Abstract
Timely diagnosis and treatment of heart blocks are critical for preventing fatal outcomes in patients with cardiac conduction disorders. Expert analysis of clinical 12-lead electrocardiograms (ECG) remains the standard diagnosis apparatus. In this study, we propose a self-supervised deep learning model that can detect evidence of heart blocks in ECG signals. We build a multichannel residual neural network (KRes) and train this model in a self-supervised contrastive fashion leveraging 3.6 million ECG from patients at the Massachusetts General Hospital (MGH) to learn robust ECG representations. We evaluate the utility of such representations on a large public dataset, PTB-XL, through fine-tuning and linear probing for identifying heart blocks. To compare, we also build a baseline supervised model by adapting KRes. The training data contains a subset of 10.6 thousand PTB-XL ECG from patients with and without heart block patterns, and a holdout set of 1319 ECG is used for evaluation. We compare the performances of the finetuning and the linear probing of the self-supervised representations with that of the supervised model using the area under the receiver-operating curve (AUC), sensitivity, specificity, and predictive values, and found those performing equally well. Moreover, we repeat the training cycles of the three pipelines while reducing the number of training samples and demonstrate that the performance of the self-supervised representations remain steady even when labeled data is limited. This research underscores the potential of self-supervised learning in cardiac diagnostics, emphasizing generalizability and performance across diverse datasets and clinical settings, especially in data-scarce paradigms.
Introduction
Heart blocks, or cardiac conduction disorders (CD), occur when electrical impulses in the heart are delayed or obstructed. While some forms are benign, others—like a 3rd-degree AV block—can lead to sudden cardiac arrest. The gold standard for diagnosis is the 12-lead electrocardiogram (ECG). While deep learning has shown promise in automating ECG analysis, most models rely on supervised learning, which requires massive amounts of high-quality, human-labeled data. This creates two major bottlenecks: data scarcity for rare conditions and "brittleness," where models fail to generalize across different hospital settings.
Researchers from MIT and MGH investigated whether self-supervised learning (SSL)—where a model learns the inherent structure of ECG signals without needing labels—can overcome these limitations.
Methods
The researchers developed a framework based on a multichannel residual neural network called KRes. Their approach involved two distinct phases:
- Self-Supervised Pre-training (SimCLR): Using a contrastive learning strategy, the model was fed 10-second ECG signals. Each signal was split into two non-overlapping 5-second segments. The model was tasked with "recognizing" that these two segments came from the same patient/recording by maximizing the agreement between their representations in a latent space. This forced the model to learn robust, invariant features of ECG morphology without ever seeing a "heart block" label.
- Downstream Evaluation: The pre-trained model was then tested on the task of heart block identification using two methods:
- Linear Probing: The pre-trained "backbone" was frozen, and only a simple logistic regression layer was trained on top. This tests how much useful information the SSL phase captured.
- Fine-tuning: The entire network was allowed to update its weights based on labeled data.
- Baseline Comparison: A standard supervised KRes model was trained from scratch on the same labeled data for comparison.
The pre-training utilized a massive, unlabeled dataset containing 3.6 million 12-lead ECGs from MGH. Evaluation was performed on a curated subset of 13,240 ECGs from the publicly available PTB-XL dataset.
Results and Discussion
In the full-data setting, all three methods performed similarly. The Supervised model achieved an AUC of 96.35, while the Self-Supervised Linear Probe achieved 96.00 and Fine-tuning achieved 95.56.
The most striking insight is the performance stability of linear probing in data-scarce scenarios. While supervised and fine-tuned models saw their accuracy plummet as the amount of labeled training data decreased, the linear probe remained nearly flat.
When the training set was reduced from approximately 10,000 samples to just 1,000, the AUC for the supervised and fine-tuned models dropped significantly, approaching the 0.70-0.80 range. In contrast, the Linear Probing method maintained an AUC above 0.90. This suggests that the SSL pre-training successfully captured the fundamental physiological markers of conduction disorders, creating high-quality features that do not require extensive weight tuning to be effective.
Conclusion
This study demonstrates that self-supervised learning can identify heart blocks in ECGs as effectively as traditional supervised models while offering significantly better generalizability. By leveraging millions of unlabeled recordings, the model learns a "language" of ECGs that is far richer than what can be learned from limited labeled samples. Future work will explore whether these representations generalize to other arrhythmias and structural heart diseases, and how these AI "reads" can be integrated into real-time clinical workflows.
Summary updated