ULF: Unsupervised Labeling Function Correction using Cross-Validation for Weak Supervision

Anastasiia Sedova, Benjamin RothEMNLP 2023

Abstract

ULF (Unsupervised Labeling Function correction) is a novel algorithm designed to mitigate noise in weak supervision by employing cross-validation to "fact-check" labeling functions (LFs) against one another. By iteratively re-estimating the mapping between LFs and specific classes, ULF enhances model performance across various datasets without the need for manual human annotations. This approach transforms rigid, heuristic-based rules into flexible, data-driven features, significantly boosting accuracy in low-resource and high-noise scenarios.

The Challenge of Weak Supervision

Deep learning requires massive amounts of data, but manual labeling is often prohibitively expensive. Weak Supervision (WS) addresses this by using Labeling Functions (LFs)—simple heuristics or keywords (e.g., "if a message contains 'subscribe', label it as SPAM")—to programmatically label data.

However, LFs are inherently noisy. A rule like "contains the word my" might correctly identify spam in YouTube comments ("check out my channel") but incorrectly flag legitimate messages ("my daughter loves this song"). Standard WS methods struggle with these contentious rules, often leading to biased training data. Existing denoising techniques typically treat data samples as independent, ignoring the structural relationships between the rules that generated the labels.

Methodology: The ULF Framework

ULF treats labeling function correction as an unsupervised optimization problem, using the collective signal of the LF ensemble to refine individual rules.

The ULF architecture: An iterative process that uses cross-validation to estimate LF-to-class mappings and produce clean labels.

Core Components

  1. Signature-based Splitting: Unlike random splitting, ULF partitions data based on "signatures"—the specific set of LFs that triggered for a sample. This prevents the model from simply memorizing the noise of a specific rule during cross-validation.
  2. Out-of-Sample Fact-Checking: ULF trains a model on $k-1$ folds and predicts labels for the held-out fold. If a model trained on "Rule A" and "Rule B" consistently disagrees with "Rule C" on the held-out data, it indicates that Rule C is misaligned or noisy.
  3. Soft LF-to-Class Mapping: Traditional systems use a hard binary matrix ($T$) where an LF is strictly tied to one class. ULF introduces a "soft" refined matrix ($T^*$), allowing rules to have probabilistic associations with multiple classes.
  4. Iterative Refinement: The process is cyclic; cleaned labels are used to train a better model, which then provides more accurate fact-checking for the next iteration.

Key Insights

  • The Power of Disagreement: A mismatch between a model's prediction and an LF's label serves as a diagnostic tool. By isolating LFs during cross-validation, ULF pinpoints exactly which rules are unreliable.
  • Softening the Rules: Hard-coded heuristics are brittle. By allowing the data to "vote" on the strength and direction of an LF, ULF transforms rigid rules into flexible features.
Refining the LF-to-class mapping: ULF converts hard binary rules (left) into soft probabilistic associations (right) based on data evidence.
  • Handling Unlabeled Data: ULF can label samples that weren't hit by any LFs by using the confident predictions of the cross-validated models (pseudo-labeling), maximizing the utility of the entire dataset.

Experimental Results

ULF was evaluated on six diverse datasets, including YouTube Spam, SMS Spam, TREC-6, and low-resource African languages (Yorùbá and Hausa).

  • Superior Performance: ULF consistently outperformed state-of-the-art baselines like Snorkel and MeTaL. Across all datasets, ULF achieved an average score of 68.4, compared to the Majority Vote baseline of 61.4.
  • Near-Human Accuracy: On the YouTube dataset, ULF reached 96.8% accuracy, nearly matching the "Gold" human-labeled baseline of 98.8%.
  • Scalability: The method proved robust even in scenarios with nearly 20,000 LFs and very small training sets, demonstrating its utility for low-resource NLP.

Limitations and Future Work

While effective, ULF relies on the assumption that the majority of LFs provide a correct collective signal. If the majority of rules are fundamentally flawed or highly correlated in their errors, the cross-validation signal may become misleading. Currently focused on NLP, future research will explore ULF's application to other modalities like image classification and complex tasks such as sequence tagging.

Summary updated

BibTeX
@inproceedings{sedova2023ulf,
  author = {Anastasiia Sedova and Benjamin Roth},
  title = {{ULF: Unsupervised Labeling Function Correction using Cross-Validation for Weak Supervision}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.254},
}
Figure