Arrhythmia Classification Using CGAN-Augmented ECG Signals

Edmond Adib, Fatemeh Afghah, John J. Prevost

Introduction

In cardiology, the automated detection of arrhythmias using deep learning is often hampered by the "imbalance" problem. In typical clinical recordings, normal heartbeats vastly outnumber pathological ones. Consequently, AI models trained on such data become biased toward the majority class, often failing to identify rare but critical arrhythmias. This research addresses this scarcity by leveraging Generative Adversarial Networks (GANs) to synthesize realistic ECG signals, effectively balancing the training datasets and improving diagnostic robustness.

Methodology

The study investigates two distinct GAN architectures for generating synthetic heartbeat signals:

  1. Unconditional WGAN-GP: A separate Wasserstein GAN with Gradient Penalty (WGAN-GP) is trained for each specific heartbeat class. This "specialist" approach allows the model to focus on the unique morphological features of individual arrhythmias.
  2. Conditional AC-WGAN-GP: An Auxiliary Classifier GAN (AC-GAN) variant is employed to generate multiple classes within a single model, conditioned on class labels.

To ensure stability and prevent "mode collapse"—a common issue where GANs produce repetitive, non-diverse outputs—the researchers utilized the Wasserstein loss function with a gradient penalty. Furthermore, they tested a "screening" phase using Dynamic Time Warping (DTW) to filter out synthetic samples that deviated significantly from established templates. The final classification was performed using EcgResNet34, a 1D adaptation of the ResNet-34 architecture.

Dataset and Experimental Setup

The researchers utilized the benchmark MIT-BIH Arrhythmia dataset, focusing on seven specific heartbeat categories: Normal (N), Paced (P), Atrial Premature Contraction (A), Left Bundle Branch Block (L), Right Bundle Branch Block (R), Fusion Beat (F), and Nodal Escape Beat (j).

Morphological diversity of the seven ECG heartbeat classes used in the study.

To simulate a challenging real-world scenario, the training set was restricted to 50% of the available data, creating a highly imbalanced environment. For instance, some minority classes contained fewer than a hundred samples, while the majority class had tens of thousands.

Results and Discussion

The experiments revealed a surprising "Raw Paradox": unscreened synthetic data consistently outperformed screened data. While filtering "low-quality" samples might seem intuitive, the authors suggest that the raw variance in the unscreened data provides the classifier with the necessary diversity to generalize better to real-world signals.

Precision-Recall curves demonstrating the performance of the EcgResNet34 classifier across different arrhythmia classes after GAN augmentation.

The impact of augmentation was most pronounced in the rarest classes. For the Nodal Escape Beat (Class 'j'), which the baseline model failed to detect entirely (F1-score of 0.00), the addition of unconditional GAN-generated data raised the F1-score to 0.25 and achieved a recall of 0.87. Similarly, the Fusion Beat (Class 'f') saw its F1-score improve from 0.16 to 0.56. Overall, the unconditional GAN approach showed a 108% net improvement in true positive classifications for minority classes compared to the baseline.

Conclusion

This research demonstrates that generative AI can effectively mitigate data scarcity in medical diagnostics. By "hallucinating" rare pathological states, GANs enable deep learning models to achieve significantly higher sensitivity for infrequent arrhythmias. Future work will focus on reducing the computational overhead of data validation and incorporating realistic environmental noise into the synthetic signals to better simulate bedside monitoring conditions.

Summary updated

BibTeX
@inproceedings{adib2022arrhythmia,
  author = {Edmond Adib and Fatemeh Afghah and John J. Prevost},
  title = {{Arrhythmia Classification Using CGAN-Augmented ECG Signals}},
  booktitle = {BIBM},
  year = {2022},
  doi = {10.1109/bibm55620.2022.9995088},
}
Figure