Intra-Inter Subject Self-Supervised Learning for Multivariate Cardiac Signals

Xiang Lan, Dianwen Ng, Shenda Hong, Mengling Feng

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:

  1. 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.
  2. 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.

The ISL framework integrates intra-subject self-supervision (left) using the KPSS test and inter-subject self-supervision (right) via contrastive learning.

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).

ISL consistently outperforms supervised learning across three datasets, particularly when labeled data is scarce (1% to 10%).

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

BibTeX
@inproceedings{lan2022intra,
  author = {Xiang Lan and Dianwen Ng and Shenda Hong and Mengling Feng},
  title = {{Intra-Inter Subject Self-Supervised Learning for Multivariate Cardiac Signals}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i4.20376},
}
Figure