Data Programming using Continuous and Quality-Guided Labeling Functions

Oishik Chatterjee, Ganesh Ramakrishnan, Sunita Sarawagi

Abstract

Data programming has emerged as a powerful paradigm for programmatically labeling large-scale datasets using heuristic Labeling Functions (LFs). However, existing frameworks are often limited by a reliance on discrete "hard" labels and suffer from training instability in unsupervised generative models. We introduce CAGE (Continuous And quality-Guided labEling), a framework that extends data programming by supporting continuous LF outputs and incorporating user-provided quality guides for regularization. Our evaluation across six diverse datasets demonstrates that CAGE significantly improves both classification accuracy and training stability compared to state-of-the-art baselines like Snorkel.

Introduction

Supervised machine learning requires vast amounts of labeled data, the manual production of which is often prohibitively expensive and time-consuming. Data Programming addresses this by allowing users to write LFs—small scripts that encode heuristics to label data. Despite its success, the paradigm faces two primary challenges: the "Hard Label" constraint, which ignores semantic nuances by forcing binary decisions, and training instability, where unsupervised generative models used to consolidate noisy LFs become highly sensitive to initialization and hyperparameters.

Methodology

CAGE addresses these limitations through two core innovations:

Continuous Potentials

Unlike traditional frameworks that require discrete labels, CAGE supports LFs that output a continuous score $s \in (0, 1)$. These scores are modeled using a Beta distribution, a flexible probability distribution capable of representing varying levels of confidence. This allows the model to learn from the semantic strength of an LF's trigger—for example, using word embedding similarity rather than simple keyword matching.

Quality-Guided Regularization

To mitigate training instability, CAGE incorporates "quality guides" ($q$), which are rough user estimates of an LF's accuracy. These guides are integrated into the training objective via a KL-divergence penalty. This regularization forces the model to remain within the bounds of human intuition, preventing it from converging to suboptimal local maxima during unsupervised learning.

Figure 1: F1 score stability over 100 training epochs for Spouse, SMS, and CDR datasets. CAGE (green) maintains high stability compared to the fluctuating Snorkel baseline (blue).

Experiments and Results

CAGE was evaluated on six datasets, including relation extraction (Spouse, CDR), text classification (SMS Spam), and record linkage (Dedup).

Performance and Stability

CAGE consistently outperformed the Snorkel baseline and simple majority voting. On the Spouse dataset, CAGE achieved an F1 score of 0.58, a significant improvement over Snorkel's 0.41. On the Ionosphere benchmark, the performance jump was even more pronounced (0.97 vs. 0.70). Crucially, as shown in Figure 1, CAGE exhibits remarkable stability across training epochs, whereas unguided models often experience wild performance swings.

Robustness to User Input

A key finding is that the quality guides do not need to be precise to be effective. The model remains robust even when the user's accuracy estimates are distorted. This suggests that the "nudge" provided by the regularization is more important than the exact value of the guide itself.

Figure 2: Impact of distortion (Sigma) in the user's quality guide. The F1 scores for Spouse and CDR remain remarkably stable even as the guide's accuracy decreases.

Key Insights

  • Enhanced Recall: Moving to continuous scores allows LFs to trigger on semantically related terms via embeddings, significantly increasing coverage.
  • Graphical Model Expressivity: CAGE utilizes a flexible parameterization ($K$ parameters per LF for $K$ classes), better capturing complex interactions between labeling functions than previous models.
  • Handling Continuous Data: CAGE provides a native path for datasets that naturally consist of continuous similarity scores, such as the Dedup record linkage task.

Conclusion and Future Work

CAGE represents a significant advancement in data programming by making generative models more expressive and stable. Future research will focus on modeling dependencies between LFs, as the current assumption of independence may not hold in practice. Additionally, we aim to explore methods for automatically suggesting quality guides to further reduce the burden on the user.

Summary updated

BibTeX
@misc{chatterjee2019data,
  author = {Oishik Chatterjee and Ganesh Ramakrishnan and Sunita Sarawagi},
  title = {{Data Programming using Continuous and Quality-Guided Labeling Functions}},
  year = {2019},
  eprint = {1911.09860},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.09860},
}
Figure