Biometric Contrastive Learning for Data-Efficient Deep Learning from Electrocardiographic Images

Veer Sangha, Akshay Khunte, Gregory Holste, Bobak J. Mortazavi, Zhangyang Wang, Evangelos K. Oikonomou, Rohan Khera

Abstract

A pretraining strategy that leverages biometric signatures of different ECGs from the same patient enhances the efficiency of developing AI models for ECG images. This represents a major advance in detecting disorders from ECG images with limited labeled data.

Introduction

Deep learning has revolutionized the analysis of Electrocardiograms (ECGs), yet its clinical application faces two significant hurdles. First, most advanced AI models require raw digital signal data, whereas many clinical settings only have access to ECGs as images (PDFs or physical printouts). Second, training robust supervised models typically requires massive datasets of expert-labeled examples, which are often unavailable for rare cardiovascular disorders.

Standard self-supervised learning (SSL) techniques, such as SimCLR, have attempted to mitigate label scarcity by learning from augmented versions of the same image. However, these methods often fail with ECGs because clinical features are highly sensitive to spatial orientation; standard augmentations like flipping or cropping can destroy the diagnostic meaning of a waveform. To bridge this gap, researchers have developed Biometric Contrastive Learning (BCL), a strategy that teaches AI to recognize the unique "biometric signature" of a patient’s heart across different images.

Methods

BCL leverages the fact that an individual’s heart possesses a unique, persistent physiological signature. Instead of using artificial image augmentations to create "positive pairs" for contrastive learning, BCL uses the natural physiological variation of a patient's heart over time.

The Pretraining Task

The model, utilizing an EfficientNet-B3 backbone, is presented with pairs of ECG images. "Positive pairs" consist of two different ECGs taken from the same patient at different times (ranging from 5 to 1,000 days apart) and displayed in varying visual layouts. "Negative pairs" consist of ECGs from different patients. The model is trained using a contrastive loss function, which rewards it for projecting ECGs from the same patient close together in a high-dimensional embedding space while pushing ECGs from different patients further apart.

Downstream Fine-tuning

Following pretraining, the model is fine-tuned on specific clinical tasks, including the detection of Atrial Fibrillation (AF), gender identification, and the detection of Left Ventricular Systolic Dysfunction (LVSD, defined as LVEF < 40%).

Experimental Setup and Datasets

The researchers utilized a diverse set of data for development and validation:

  • Internal Validation (Yale New Haven Health System): Pretraining was conducted on 156,576 ECGs from over 78,000 individuals (2000–2015), with fine-tuning and testing performed on data from 2015–2021.
  • External Validation: To ensure generalizability, the model was tested on the PTB-XL dataset (Germany) for AF and gender detection, and a dataset from Lake Regional Hospital (Missouri, US) for LVSD detection.

Key Insights

Physiology as Augmentation

By treating natural physiological variation as a "natural augmentation," BCL forces the model to ignore transient noise—such as heart rate changes or lead placement—and focus on underlying structural and functional features. This approach makes the model layout-agnostic, allowing it to function across different hospital printing standards.

The Failure of Generic SSL

The study found that SimCLR performed worse than random initialization in several low-data scenarios. This suggests that generic computer vision augmentations are actively harmful when applied to the delicate, spatially-dependent patterns of cardiac waveforms.

Results

The most striking advantage of BCL is its extreme data efficiency:

  • Low-Data Performance: With only 0.1% of labeled data, BCL achieved an AUROC of 0.90 for Atrial Fibrillation. In comparison, random initialization (0.51) and SimCLR (0.61) performed only slightly better than chance.
  • The 50% Rule: BCL models trained on only half of the available data performed as well as models trained on the full dataset.
  • Hidden Label Detection: For features not easily visible to human experts, such as gender or LVSD, BCL outperformed other methods in external validation even when 100% of the data was used (AUROC 0.88 vs. 0.83 for random initialization).
  • Overall Gain: Across all tasks, BCL showed a mean gain in AUROC of 8.7% at the 1% data threshold compared to baseline methods.

Limitations and Future Work

While BCL represents a significant step forward, several areas remain for future exploration. The study focused on the EfficientNet-B3 architecture; it remains to be seen if similar gains occur with Vision Transformers (ViTs). Additionally, while the model was tested on small fractions of common conditions, future work should validate BCL on truly rare diseases. Finally, expanding the biometric diversity of the pretraining dataset beyond a single health system could further enhance the model's global robustness.

Summary updated

Abstract

A pretraining strategy that leverages biometric signatures of different ECGs from the same patient enhances the efficiency of developing AI models for ECG images. This represents a major advance in detecting disorders from ECG images with limited labeled data.
BibTeX
@article{sangha2024biometric,
  author = {Veer Sangha and Akshay Khunte and Gregory Holste and Bobak J. Mortazavi and Zhangyang Wang and Evangelos K. Oikonomou and Rohan Khera},
  title = {{Biometric Contrastive Learning for Data-Efficient Deep Learning from Electrocardiographic Images}},
  journal = {J. Am. Medical Informatics Assoc.},
  year = {2024},
  doi = {10.1093/jamia/ocae002},
}
Figure