Detecting Wolff-Parkinson-White from Lead-I ECG Using Transfer Learning and Wavelets

Shreyas Bharadwaj, Jessica Wang, Sarah Altman, Ridwan AlammedRxiv 2024 · DOI

TL;DR

Researchers have developed a deep-learning approach to detect Wolff-Parkinson-White (WPW) syndrome using only Lead-I ECG data— the kind captured by modern smartwatches. By training models on a broader "super-class" of cardiac conduction disorders rather than WPW alone, they achieved significantly better generalization on external datasets, reaching an AUC of 0.91 and 78% sensitivity.

What Problem Does This Paper Address?

Wolff-Parkinson-White (WPW) syndrome is a congenital heart condition where an extra electrical pathway causes the heart to beat abnormally fast, potentially leading to sudden cardiac death. While it is treatable via catheter ablation, the "gold standard" for diagnosis requires a 12-lead clinical ECG or a 24-hour Holter monitor.

The challenge is twofold:

  1. Accessibility: WPW is often episodic or asymptomatic. By the time a patient gets to a clinic for a 12-lead ECG, the signs might be gone. Smartwatches with Lead-I ECG sensors offer a way to monitor patients 24/7, but we lack robust algorithms to detect WPW from this single, limited signal.
  2. Data Scarcity: WPW is rare (affecting only 0.1%–0.3% of the population). In the massive PTB-XL dataset, the ratio of "normal" to "WPW" cases is over 1000:1. This extreme class imbalance makes it incredibly difficult to train deep learning models that don't just overfit to the training set.

Methods

The authors explored a multi-step pipeline to transform 1D ECG signals into a format suitable for state-of-the-art computer vision models:

  • Wavelet Transformation: Instead of feeding raw time-series data into a network, they used Continuous Wavelet Transform (CWT) with Generalized Morse wavelets to create "scalograms"—2D images representing how the frequency content of the heart signal changes over time.
  • Deep Learning Architectures: They compared two heavy hitters in image classification: ResNet18 and EfficientNet-b0, utilizing transfer learning by pre-training the models on the ImageNet dataset.
  • The "Natural Augmentation" Strategy: To fight data scarcity, the team proposed a clever "zero-shot" transfer learning approach. Instead of training a model only on the few available WPW samples, they trained it to recognize a broader "super-class" of Conduction Disorders (CD)—which includes bundle branch blocks and AV blocks. These disorders share similar electrophysiological features with WPW, effectively providing a much larger, "natural" training set.

Datasets

  • PTB-XL: A large, publicly available dataset used for training and internal validation. It contains over 21,000 12-lead ECGs, though only 70 were labeled as WPW.
  • Tongji Hospital ECG Database: Used as an external validation set to test how well the model works on a completely different patient population. This set included 140 patients (100 with WPW).

Key Insights and Ideas

  • The Generalization Trap: Models trained specifically on WPW with standard time-domain augmentations (like adding noise) looked nearly perfect on internal data (0.99 AUC). However, their performance tanked when tested on the external Tongji dataset (sensitivity dropped to 58%). This highlights a major pitfall in medical AI: high internal accuracy does not guarantee real-world utility.
  • Super-classes as a Solution: The "aha moment" was realizing that WPW is a subset of conduction disorders. By training the model on the CD super-class, the model learned more robust features of aberrant electrical flow. When applied to WPW as a "zero-shot" task, this model generalized much better to the external dataset (0.91 AUC).
  • Wavelets > Time-Series: The study confirmed that 2D scalograms are more robust inputs than 1D raw signals. Specifically, Morse wavelets outperformed Morlet wavelets and Short-Time Fourier Transforms (STFT) in capturing the "delta waves" (slurred upstrokes in the ECG) characteristic of WPW.

Key Results

  • Internal Performance (PTB-XL): The best WPW-specific models achieved 88% sensitivity and 99% specificity (AUC 0.99).
  • External Performance (Tongji): The standard WPW-specific model's AUC dropped to 0.88. However, the CD super-class model maintained a high AUC of 0.91 and a much higher sensitivity of 78%.
  • 12-lead vs. Lead-I: Interestingly, the performance of the Lead-I model was very close to a model trained on full 12-lead data (0.91 vs 0.90 AUC on external data), suggesting that Lead-I contains sufficient information for screening.

Limitations and Future Work

The authors acknowledge that their models were trained on "evident" WPW—cases where the characteristic delta wave is clearly visible. However, WPW can be "concealed" or transient, appearing only during certain heart rates.

Future work will likely involve testing these models on actual wearable device data (which is often noisier than clinical Lead-I ECGs) and exploring whether this "super-class" training strategy can be applied to other rare cardiac conditions like Long QT syndrome or specific types of myocardial infarction.

Summary updated

Abstract

Abstract Wolff-Parkinson-White (WPW) syndrome is a congenital heart defect that can trigger ventricular fibrillation and sudden cardiac death. Expert inspection of a 12- lead clinical electrocardiogram (ECG) or a Holter record is the standard approach for detecting WPW syndrome. Smartwatches that acquire lead-I ECGs can enable automated detection of WPW episodes in out-of-hospital settings and prevent adverse outcomes. In this work, we explore deep-learning solutions to identify WPW syndromes on lead-I ECG. Scarcity of labeled ECG data for WPW and other cardiac conduction disorders poses a major challenge for training data-driven methods. Moreover, generalizability of such methods to external patient population remains unexplored. To address these challenges, first we implement and compare multiple existing strategies from time-domain augmentations on the lead-I ECG to transfer learning of Imagenet-models for ECG wavelet transformations. Training and holdout validation of these methods are conducted using about 14,000 ECGs from PTB-XL, a publicly available ECG dataset. Moreover, we explore generalization of these methods by external validation on the data from 140 patients from the Tongji Hospital ECG Database. While these methods achieve 88% sensitivity and 99% specificity in identifying a lead-I ECG with evident WPW, and an area under the receiver-operating curve (AUC) of 0.99 on the holdout set from PTB-XL, the sensitivity drops to 58% with an AUC of 0.88 on the external validation. Finally, we propose a novel data augmentation strategy by incorporating labeled data from an umbrella super-class of cardiac conduction disorders, instead of WPW alone, thus naturally reducing the data imbalance for model training. We apply these models as zero-shot transfer learning for discriminating WPW from normal ECG. While this approach achieves similar performance during holdout validation, it also demonstrates strong performance on the external Tongji dataset with sensitivity 0.78 and AUC 0.91. This result shows significant generalizability of the proposed method and highlights the potential of deep-learning solutions in monitoring WPW syndrome with lead-I ECG in outof-hospital general populace settings.
BibTeX
@misc{bharadwaj2024detecting,
  author = {Shreyas Bharadwaj and Jessica Wang and Sarah Altman and Ridwan Alam},
  title = {{Detecting Wolff-Parkinson-White from Lead-I ECG Using Transfer Learning and Wavelets}},
  year = {2024},
  doi = {10.1101/2024.09.26.24314432},
  howpublished = {medRxiv},
}
Figure