Cardiac Disease Diagnosis on Imbalanced Electrocardiography Data Through Optimal Transport Augmentation

Jielin Qiu, Jiacheng Zhu, Mengdi Xu, Peide Huang, Michael Rosenberg, Douglas Weber, Emerson Liu, Ding Zhao

TL;DR

Researchers have developed a novel framework to improve heart disease detection by tackling the chronic problem of imbalanced medical data. By using Optimal Transport to mathematically "morph" healthy heartbeats into synthetic disease samples and processing them through a Multi-Feature Transformer, they achieved significant gains in diagnostic accuracy and robustness.

What Problem Does This Paper Address?

In the world of medical AI, data is rarely fair. For every one recording of a rare cardiac condition, there are thousands of "Normal" electrocardiograms (ECGs). This data imbalance causes machine learning models to become biased; they get very good at identifying healthy patients but struggle to accurately detect specific diseases because they haven't seen enough examples during training.

While standard techniques like oversampling (simply repeating rare cases) or SMOTE (creating synthetic averages) exist, they often fail to capture the complex, rhythmic, and physiological nuances of an ECG. This paper aims to bridge this gap by creating high-quality synthetic data that respects the underlying geometry of heart signals.

Methods

The authors propose a two-part solution: a sophisticated data augmentation strategy and a specialized neural network architecture.

1. Optimal Transport (OT) Augmentation

Instead of just adding noise, the team uses Optimal Transport to generate new training samples. They treat the ECG data as probability distributions. By calculating the "Wasserstein distance" (a measure of the effort needed to transform one distribution into another), they can perturb "Normal" ECG beats along a geometric path toward a "Disease" category. This "barycentric mapping" ensures the synthetic samples remain physiologically plausible rather than just being random mathematical interpolations.

2. Multi-Feature Transformer (MF-Transformer)

Standard models often look only at the raw time-series signal. The authors argue that heart health is hidden in both time and frequency. Their MF-Transformer (shown below) takes a three-pronged input:

  • Raw ECG signals
  • Time-domain features (e.g., mean, skewness, kurtosis)
  • Frequency-domain features (extracted via Fast Fourier Transform)
Fig. 2: Architecture of the Multi-Feature Transformer model.

The overall pipeline involves denoising the raw data, segmenting it into individual beats by detecting R-peaks, augmenting the minority classes using OT, and finally feeding everything into the Transformer for classification.

Fig. 1: The overall pipeline of the framework.

Datasets

The study utilized the PTB-XL dataset, a large-scale collection of clinical 12-lead ECG signals. The data was categorized into five conditions:

  1. NORM: Normal ECG (The majority class)
  2. MI: Myocardial Infarction
  3. STTC: ST/T Change
  4. CD: Conduction Disturbance
  5. HYP: Hypertrophy

As shown in the paper's analysis, the NORM and CD categories were significantly overrepresented, making it a perfect testbed for their imbalance-correction method.

Key Insights and Ideas

  • Geometry Matters: By using Optimal Transport, the authors move beyond simple statistical augmentation. They exploit the "global geometric information" of the data, ensuring synthetic heartbeats "match the real samples" in a way that simpler methods like SMOTE cannot.
  • Multi-Domain Fusion: The Transformer doesn't just "see" the wave; it understands the statistical properties (like entropy and energy) of the signal's spectrum. This multi-feature approach makes the model more robust to the nuances that human cardiologists look for.
  • Robustness over Raw Accuracy: A key "aha" moment in the results is that while accuracy improves, the balance of the confusion matrix improves even more. The model stops "guessing" the majority class and starts truly distinguishing between different pathologies.

Key Results

The proposed method significantly outperformed traditional augmentation techniques across standard metrics:

Method AUROC F1-Score
No Augmentation 0.843 0.575
SMOTE 0.799 0.534
ADASYN 0.820 0.546
Ours (OT + MF-Transformer) 0.944 0.738

Qualitatively, the confusion matrices showed that without augmentation, the model achieved only ~50-60% accuracy on minority disease categories. With OT augmentation, the performance became much more balanced, with the average classification result jumping from 71.80% to 75.82%.

Limitations and Future Work

While the results are promising, the authors note a few areas for growth:

  • Overfitting: While OT handles imbalance better than traditional sampling, medical data is still prone to overfitting, and further refinement is needed to ensure the model generalizes to entirely different hospital datasets.
  • Computational Complexity: Optimal Transport, specifically solving the Sinkhorn algorithm for large datasets, can be computationally intensive compared to simpler methods.
  • Future Directions: The authors suggest that further exploring the "Wasserstein geodesic perturbation" could lead to even more robust models that can handle noise and sensor variations in real-world clinical settings.

Summary updated

BibTeX
@inproceedings{qiu2023cardiac,
  author = {Jielin Qiu and Jiacheng Zhu and Mengdi Xu and Peide Huang and Michael Rosenberg and Douglas Weber and Emerson Liu and Ding Zhao},
  title = {{Cardiac Disease Diagnosis on Imbalanced Electrocardiography Data Through Optimal Transport Augmentation}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=9VqbHFOzVJ},
}
Figure