Abstract
The paradigm of data programming, which uses weak supervision in the form of rules/labelling functions, and semi-supervised learning, which augments small amounts of labelled data with a large unlabelled dataset, have shown great promise in several text classification scenarios. In this work, we argue that by not using any labelled data, data programming based approaches can yield sub-optimal performances, particularly when the labelling functions are noisy. The first contribution of this work is an introduction of a framework, SPEAR, which is a semi-supervised data programming paradigm that learns a joint model that effectively uses the rules/labelling functions along with semi-supervised loss functions on the feature space. Next, we also study SPEAR-SS which additionally does subset selection on top of the joint semi-supervised data programming objective and selects a set of examples that can be used as the labelled set by SPEAR. The goal of SPEAR-SS is to ensure that the labelled data can complement the labelling functions, thereby benefiting from both data-programming as well as appropriately selected data for human labelling. We demonstrate that by effectively combining semi-supervision, data-programming, and subset selection paradigms, we significantly outperform the current state-of-the-art on seven publicly available datasets.
Introduction
Modern machine learning models are increasingly data-hungry, yet manual annotation remains a significant bottleneck due to cost and time constraints. Two prominent strategies have emerged to mitigate this: Data Programming, which utilizes heuristic "Labeling Functions" (LFs) to automate annotation, and Semi-Supervised Learning, which leverages a small set of gold-standard labels to find patterns in larger unlabeled pools.
However, these approaches have distinct weaknesses. LFs are often noisy, incomplete, or contradictory, and traditional data programming frameworks like Snorkel often ignore the underlying data features when resolving these conflicts. Conversely, semi-supervised methods are highly sensitive to the quality and representativeness of the initial small labeled set. This paper introduces SPEAR (Semi-suPervisEd dAta pRogramming) and SPEAR-SS (Subset Selection) to bridge this gap by jointly leveraging noisy rules, raw data features, and a strategic human labeling budget.
Methodology
SPEAR: The Joint Model
Unlike cascaded approaches that resolve LF conflicts before training a classifier, SPEAR optimizes a joint objective function. It simultaneously trains a feature-based classifier (e.g., a neural network) and an LF-based graphical model. The loss function integrates four key components:
- Supervised Loss: Standard cross-entropy on the small labeled set.
- Semi-Supervised Loss: Entropy minimization to encourage confident predictions on unlabeled data.
- Agreement Loss: A KL-divergence term that forces the feature-based model and the LF-based model to align their predictions.
- Quality Guides: User-provided beliefs about LF accuracy to stabilize training.
SPEAR-SS: Subset Selection
To maximize the utility of a limited human labeling budget, SPEAR-SS employs submodular optimization (specifically Facility Location functions) to select a diverse and informative subset of data. The "Supervised Subset Selection" variant uses LFs to partition data into hypothesized classes before selecting the most representative examples from each, ensuring the labeled data effectively complements the existing rules.
Experimental Setup
The framework was evaluated across seven diverse datasets spanning text classification, sequence labeling, and tabular data. As shown in the statistics below, the labeled sets ($|\mathcal{L}|$) are significantly smaller than the unlabeled pools ($|\mathcal{U}|$), highlighting the semi-supervised nature of the task.
Results and Discussion
SPEAR consistently outperforms existing weak supervision and semi-supervised baselines. The joint training approach allows raw features to "denoise" human-written rules, while the subset selection ensures that manual effort is spent on data points where LFs are most uncertain.
Key empirical findings include:
- Significant Gains: On the IMDB dataset, SPEAR-SS (Supervised) achieved a +6.3% F1-score improvement over the baseline.
- Handling Imbalance: On the imbalanced Audit dataset, SPEAR-SS showed a massive +44.5% improvement over models trained only on the small labeled set.
- Stability: The joint training approach proved more stable across different runs compared to purely generative models like Snorkel.
Conclusion
SPEAR and SPEAR-SS demonstrate that combining data programming with strategic semi-supervision and subset selection can significantly lower the barrier to training high-performing models. While the framework handles noise well, future work may explore adaptive quality guides and extending the paradigm to multi-label classification or computer vision tasks where LFs could be derived from pre-trained detectors.
Summary updated