Automating Weak Label Generation for Data Programming with Clinicians in the Loop

Jean Park, Sydney Pugh, Kaustubh Sridhar, Mengyu Liu, Navish Yarna, Ramneet Kaur, Souradeep Dutta, Elena Bernardis, Oleg Sokolsky, Insup Lee · DOI

Abstract

Deep learning models in healthcare require vast amounts of labeled data, yet expert clinician time is a scarce and expensive resource. While "Data Programming"—using programmatic rules to label data—offers a scalable alternative to manual labeling, it often fails when applied to high-dimensional medical data like images and complex time-series, where defining explicit rules is difficult. This paper introduces a distance-based weak label generation pipeline that leverages clinician expertise through a small set of representative "memory" samples. By propagating labels from these memories using domain-specific distance metrics, the method achieves significant improvements in accuracy and a drastic reduction in clinician effort.

Introduction

The "labeling crisis" remains a primary bottleneck in the deployment of medical AI. Standard supervised learning requires thousands of expert-annotated examples. Data Programming, popularized by frameworks like Snorkel, attempts to mitigate this by using Labeling Functions (LFs)—heuristics or rules that provide noisy "weak labels." However, for high-dimensional data, translating clinical intuition into Python code is often impossible. A clinician can recognize a specific skin lesion or a pathological heart rhythm instantly, but articulating that recognition as a robust programmatic rule is a significant technical challenge.

Researchers from the University of Pennsylvania propose a shift in paradigm: instead of asking clinicians to write code, the system asks them to label a strategically selected subset of data. The system then uses distance-based algorithms to propagate that "tacit knowledge" across the entire dataset.

Methodology: The Distance-Based Pipeline

The proposed framework automates the generation of weak labels through a five-step process designed to minimize human intervention while maximizing label quality.

  1. Memory Generation: Rather than selecting samples at random, the algorithm employs a variant of the CLARANS clustering algorithm. This identifies "memories"—prototypical samples that best represent the overall distribution of the dataset.
  2. Clinician-in-the-Loop: An expert clinician labels only these representative memories. This ensures that the expert's time is spent on the most informative data points.
  3. Label Induction: The system assigns labels to the remainder of the dataset based on their proximity to the labeled memories in a high-dimensional feature space. To handle different data types, the researchers utilized specific distance metrics:
  4. Dynamic Time Warping (DTW) for time-series data, which accounts for variations in speed and timing.
  5. CLIP (Contrastive Language–Image Pre-training) embeddings for images, using KL-divergence to compare probability distributions.
  6. Ensembling: The process is repeated with different random seeds to generate multiple sets of weak labels, capturing different nuances of the data distribution.
  7. Data Programming Integration: These multiple weak label sets are fed into Snorkel. The tool learns to weigh the conflicting or overlapping "votes" from different induction passes to produce a final, probabilistic label for every sample in the dataset.

Experimental Evaluation

The approach was validated on two distinct and challenging medical domains:

Pediatric Time-Series Alarms

The team analyzed 3,265 low $SpO_2$ (blood oxygen) alarms from a pediatric unit. The goal was to classify these alarms as "suppressible" (non-actionable/false) or "non-suppressible." Traditionally, this required clinicians to write complex rules. Using the distance-based method, labeling just 50–130 samples resulted in a 17-28% improvement in accuracy and a 13-28% improvement in F1-score over a baseline of 62 manual clinician-defined rules.

Dermatological Imaging

The second study involved 6,293 smartphone-captured images of skin lesions, categorized into 10 body parts. This classification is a vital pre-processing step for teledermatology. The proposed method outperformed Snuba (a state-of-the-art automated LF generator) by 5-15% in accuracy and 12-19% in F1-score.

Efficiency Gains

The most striking result was the reduction in expert labor. In the time-series study, manually labeling the entire dataset would have required approximately 55 hours of clinician time. The proposed pipeline achieved superior results with only 2 hours of clinician involvement—a 96% reduction in effort.

Discussion and Key Insights

The core contribution of this work is the realization that defining a distance function (determining how similar two samples are) is significantly easier and more effective than defining a classification rule for complex data. By using CLIP as a feature extractor for images, the system captured semantic nuances that raw pixel-based rules could not.

Furthermore, the study highlights that strategic sampling is paramount. Labeling "memories" (anchors of the data distribution) provides a much stronger foundation for label propagation than random sampling, effectively capturing the expert's tacit knowledge with minimal input.

Limitations and Future Directions

While highly effective, the system's performance is dependent on the quality of the underlying distance metric or feature extractor. If the metric fails to capture features relevant to the clinical task, the label induction will be noisy. Future research will explore the integration of Large Language Models (LLMs) to further automate the process by interpreting medical guidelines, as well as optimizing the hyper-parameters of the memory generation phase to further refine label quality.

Summary updated

BibTeX
@inproceedings{park2024automating,
  author = {Jean Park and Sydney Pugh and Kaustubh Sridhar and Mengyu Liu and Navish Yarna and Ramneet Kaur and Souradeep Dutta and Elena Bernardis and Oleg Sokolsky and Insup Lee},
  title = {{Automating Weak Label Generation for Data Programming with Clinicians in the Loop}},
  booktitle = {CHASE},
  year = {2024},
  url = {https://openreview.net/forum?id=3dFAN85bPB},
}
Figure