Weak Supervision for Affordable Modeling of Electrocardiogram Data

Mononito Goswami, Benedikt Boecking, Artur Dubrawski

TL;DR

Researchers at Carnegie Mellon University have developed a way to train high-performing heart arrhythmia detectors without the need for thousands of manually labeled ECG heartbeats. By using just six human-defined "rules of thumb" (heuristics) and a "data programming" framework, they achieved results that match or exceed models trained on expensive, expert-annotated datasets.

What Problem Does This Paper Address?

Deep learning has revolutionized medical signal analysis, but it has a "hunger" problem: it requires massive amounts of labeled data. In the world of Electrocardiograms (ECGs), this means clinicians must manually inspect and label tens of thousands of individual heartbeats. This process is not only tedious and error-prone but also prohibitively expensive—expert labor can cost up to $200 per hour.

Furthermore, medical data is dynamic. As patient populations evolve and medical equipment improves, old "gold standard" datasets become stale. We need a way to build models that can be quickly adapted to new data without waiting months for a team of doctors to annotate it.

Methods

The authors employ a technique called Weak Supervision via the Data Programming (DP) framework (specifically using the Snorkel library).

Instead of labeling every data point, experts write Labeling Functions (LFs)—short scripts that encode clinical "rules of thumb." For this study, they focused on identifying Premature Ventricular Contractions (PVCs) using six simple heuristics based on ECG morphology (e.g., "Is the R-wave taller than usual?" or "Does the heartbeat appear earlier than expected?").

The core technical innovations include:

  1. Time-Series Heuristics: Unlike previous weak supervision work that focused on text or images, this paper defines LFs directly on raw time-series signals.
  2. Auto-Thresholding: Because every patient’s "normal" heart rhythm looks different, the authors used a Minimum Covariance Determinant algorithm to automatically tune the thresholds for these rules for each individual patient. This handles inter-patient variability without human intervention.
  3. Generative to Discriminative Pipeline: A generative model (a factor graph) estimates the accuracy and correlations of the noisy heuristics to produce "probabilistic labels." These labels are then used to train a robust ResNet (Residual Network) classifier.

Datasets

The study utilized the MIT-BIH Arrhythmia Database, a standard benchmark containing 48 half-hour excerpts of two-lead ECG recordings. To ensure a realistic evaluation, they followed the "inter-patient" protocol, meaning the model was tested on heartbeats from patients it had never seen during training.

Key Insights and Ideas

  • The Power of "Noisy" Rules: You don't need perfect rules to build a perfect model. The framework learns which heuristics are reliable and which are not, effectively "denoising" the expert's intuition.
  • Personalization is Key: The "auto-thresholding" step was the secret sauce. A rule like "R-wave is taller than usual" is useless if you don't know what "usual" looks like for a specific patient. By automatically defining "normal" per patient, the model became significantly more generalizable.
  • Feature Learning vs. Rule Following: Even though the model was trained on simple rules, the final ResNet classifier learned to identify complex morphological features. Class Activation Maps (CAMs) showed the model naturally focused on the QRS complex, just like a model trained on human labels.

Key Results

  • Competitive Performance: The weakly supervised ResNet achieved an accuracy of 97.25% and a True Positive Rate (TPR) of 0.892, performing on par with (and sometimes slightly better than) the "Fully Supervised" model trained on ground-truth labels.
  • Beating Active Learning: The method significantly outperformed Active Learning, a popular alternative where a model asks a human to label the "most confusing" points. With only 4,000 labeled points, Active Learning struggled to match the performance the weak supervision reached with almost zero manual labeling.
  • Efficiency: The six heuristics were developed in less than 30 minutes by a non-expert using an online textbook, compared to the months of expert labor typically required for manual annotation.

Limitations and Future Work

The authors acknowledge a few areas for growth:

  • Scope: The study focused primarily on one type of arrhythmia (PVCs). Future work is needed to see if these simple heuristics can scale to the dozens of other known cardiac abnormalities.
  • Dependency Modeling: The current model assumes labeling functions are independent, but in reality, different rules might be triggered by the same underlying signal features. Modeling these dependencies could further improve accuracy.
  • Hybrid Approaches: The authors suggest a "best of both worlds" approach, combining weak supervision with a small amount of active learning to refine the model on the most difficult cases.

Summary updated

BibTeX
@inproceedings{goswami2021weak,
  author = {Mononito Goswami and Benedikt Boecking and Artur Dubrawski},
  title = {{Weak Supervision for Affordable Modeling of Electrocardiogram Data}},
  booktitle = {AMIA},
  year = {2021},
}
Figure