A simple self-supervised ECG representation learning method via manipulated temporal-spatial reverse detection

Wenrui Zhang, Shijia Geng, Shenda Hong · DOI

TL;DR

This paper introduces a novel self-supervised learning (SSL) method for ECG representation learning by training a model to distinguish original ECG signals from temporally and/or spatially reversed versions. This approach effectively learns robust ECG representations that significantly improve performance on downstream tasks like atrial fibrillation detection, outperforming existing methods with less data and effort.

What Problem Does This Paper Address?

Extracting meaningful representations from electrocardiogram (ECG) signals is crucial for various machine learning applications in healthcare, such as disease detection and patient monitoring. Traditional supervised learning methods require extensive labeled data, which is costly and time-consuming to obtain. Self-supervised learning (SSL) offers a promising alternative by leveraging inherent data structures to learn representations without explicit labels. However, existing SSL methods for ECG either produce suboptimal representations or demand complex data augmentation strategies. This paper aims to bridge this gap by proposing a simple yet effective SSL task that generates high-quality ECG representations with minimal data engineering.

Methods

The core of this work is the "Temporal-Spatial (T-S) reverse detection" method. The authors manipulate ECG segments in three ways:

  • Temporal Reverse: Flipping the signal horizontally, simulating a time reversal.
  • Spatial Reverse: Flipping the signal vertically, altering its amplitude characteristics.
  • Temporal-Spatial Reverse: Combining both horizontal and vertical flips.

The SSL task involves training a deep neural network (a modified 32-layer ResNeXt) to classify the original ECG segment and these three manipulated versions into four distinct classes. The encoder part of this network learns to generate representations that capture the essential features of the ECG signals. After pre-training, this encoder is transferred to a downstream task, such as atrial fibrillation (AF) detection, where a new classifier is fine-tuned on top of the learned representations.

Datasets

The study utilizes the publicly available and widely used dataset from the PhysioNet/Computing in Cardiology Challenge 2017 (CinC 2017). This dataset consists of single-lead ECG recordings. For their experiments, the authors selected ECG signals labeled as "Normal" and "Atrial Fibrillation (AF)". The data was preprocessed into 10-second segments with a 5-second stride, and segments shorter than 3000 data points were discarded.

Key Insights and Ideas

  • Simplicity is Key: The T-S reverse detection method is remarkably simple to implement and requires no manual data annotation, making it highly practical.
  • Temporal Dominance: Temporal reversal (horizontal flipping) appears to be more crucial for learning effective ECG representations than spatial reversal (vertical flipping). This suggests that the temporal dynamics of ECG signals hold more discriminative power for general representation learning.
  • Feature Space Separation: The learned representations from temporal and T-S reverse detection lead to a feature space where ECG segments of the same class (Normal vs. AF) are more clustered together, indicating better discriminative power compared to spatial reverse.
  • Generalization Power: The pre-trained encoder significantly boosts performance on downstream tasks, even with limited fine-tuning data, demonstrating its ability to generalize well.

Key Results

  • Superior Performance: The T-S reverse detection method achieved state-of-the-art performance on AF detection, outperforming baseline methods like Random Projection (RP), Principal Component Analysis (PCA), Autoencoders (AE), and SimCLR by a significant margin. For instance, in terms of AUC, T-S achieved 35.8%, 30.5%, and 25.6% higher than the best baseline for representation dimensions 64, 128, and 256, respectively.
  • Ablation Study Findings: The ablation study revealed that spatial reverse detection alone was a relatively poor task for learning ECG representations. Temporal reverse detection, however, performed comparably to or even better than the combined T-S reverse method, reinforcing the importance of temporal information.
  • Data Efficiency: The method demonstrates strong performance even with small amounts of training data, and pre-training consistently improves performance over training from scratch, regardless of data availability.
  • Model Interpretation: Layer-wise Relevance Propagation (LRP) heatmaps showed that temporal reverse detection encourages the model to attend to more diverse parts of the ECG signal, while spatial reverse detection tends to focus primarily on R-peaks.

Limitations and Future Work

  • Dataset Specificity: The current study is performed on a single-lead ECG dataset. The authors suggest that the method can be easily extended to 12-lead ECG signals.
  • Generalization to Other Tasks: While AF detection was used as a downstream task, the authors plan to test their method on more diverse downstream tasks to examine its broader generalization capabilities.
  • Integration with Other SSL Methods: The authors propose exploring the application of the reverse paradigm to construct negative pairs for contrastive learning (CL)-based methods, potentially enhancing their effectiveness.

Summary updated

BibTeX
@article{zhang2023simple,
  author = {Wenrui Zhang and Shijia Geng and Shenda Hong},
  title = {{A simple self-supervised ECG representation learning method via manipulated temporal-spatial reverse detection}},
  journal = {Biomedical Signal Processing and Control},
  year = {2023},
  doi = {10.1016/j.bspc.2022.104194},
}
Figure