Introduction
Electrocardiograms (ECGs) are the primary tool for diagnosing cardiac arrhythmias. However, developing robust deep learning models for ECG interpretation typically requires vast amounts of expert-labeled data, which is both expensive and time-consuming to acquire. While unlabeled ECG data is abundant, leveraging it through self-supervised learning (SSL) is challenging due to complex temporal dynamics. This paper introduces the Intra-Inter Subject Self-Supervised Learning (ISL) model, a framework designed to overcome these challenges by incorporating medical domain knowledge into the learning process.
The Challenge of Cardiac Signal SSL
Standard SSL techniques often fail on ECG data because they do not account for two critical types of variability:
- Intra-subject difference: A patient's heart rhythm can change suddenly (e.g., a premature contraction). Most SSL methods assume temporal proximity implies similarity, which is often false in cardiac signals.
- Inter-subject difference: The morphological presentation of the same arrhythmia can vary significantly between individuals due to physiological differences or electrode placement.
Methodology
The ISL framework addresses these issues through a dual-stream self-supervision architecture that processes multivariate signals using a channel-wise attentional CNN-RNN encoder.
Intra-subject Self-supervision
To manage abrupt changes within a single patient's signal, the model employs the KPSS test, a classical statistical stationarity test. The signal is segmented into heartbeat-level frames; if the KPSS test identifies a non-stationary transition between frames, they are treated as dissimilar. A discriminator is then trained to predict these transitions, forcing the encoder to learn fine-grained temporal dependencies and recognize the transitions that define many arrhythmias.
Inter-subject Self-supervision
The model utilizes contrastive learning to distinguish between different subjects. To ensure the learned representations are clinically relevant, the authors employ three domain-specific augmentations: baseline filtering (morphological extraction), bandpass filtering (denoising), and channel-wise differencing (learning lead relationships). Unlike standard contrastive learning, ISL recognizes that segments from the same patient may be "negative pairs" if they represent different cardiac states.
Experimental Results
The model was evaluated on three major datasets: Chapman (4 categories), CPSC (9 categories), and PTB-XL (71 categories).
Performance in Low-Data Regimes
One of the most significant findings is the model's performance when labeled data is extremely limited. In semi-supervised tests using only 1% of the available labels, the pre-trained ISL model achieved a ~10% improvement in AUROC compared to a supervised model trained from scratch.
Transferability and Linear Evaluation
In linear evaluation tests—where the encoder is frozen and only a simple classifier is trained—ISL consistently outperformed other state-of-the-art SSL methods like SimCLR and CPC. Furthermore, models pre-trained on one clinical population (e.g., Chapman) and fine-tuned on another (e.g., PTB-XL) maintained superior performance, demonstrating that the learned features are highly generalizable.
Conclusion
The ISL model demonstrates that integrating domain-specific statistical tests and augmentations into self-supervised frameworks can significantly improve the diagnostic utility of unlabeled medical data. By explicitly modeling both intra-subject transitions and inter-subject variations, ISL provides a robust foundation for cardiac arrhythmia detection, especially in clinical settings where labeled data is a bottleneck.
Summary updated