Abstract
The scalability of the labeling process and the attainable quality of labels have become limiting factors for many applications of machine learning. The programmatic creation of labeled datasets via the synthesis of noisy heuristics provides a promising avenue to address this problem. We propose to improve modeling of latent class variables in the programmatic creation of labeled datasets by incorporating pairwise feedback into the process. We discuss the ease with which such pairwise feedback can be obtained or generated in many application domains. Our experiments show that even a small number of sources of pairwise feedback can substantially improve the quality of the posterior estimate of the latent class variable.
Introduction
In modern machine learning, the primary bottleneck is often the availability of high-quality labeled data. Data Programming frameworks, such as Snorkel, address this by allowing users to write "Labeling Functions" (LFs)—noisy heuristics that automatically label data. However, LFs are often independent and sparse; if a sample doesn't trigger a rule, it remains unlabeled. This paper proposes a novel extension: incorporating pairwise feedback—simple "same-class" or "different-class" relationships—to tie together evidence across samples and significantly improve label accuracy.
Methodology
The core of this approach extends the standard data programming factor graph. In traditional setups, a generative model estimates LF accuracy by observing agreements and disagreements across the dataset. The researchers introduce a sparse graph of pairwise constraints ($A$):
- Same-class ($A_{ij} = 1$): Points $i$ and $j$ likely belong to the same category.
- Different-class ($A_{ij} = -1$): Points $i$ and $j$ likely belong to different categories.
- Abstain ($A_{ij} = 0$): No information.
Crucially, the model learns the reliability of these pairwise sources during training, allowing it to handle noisy feedback effectively.
Experimental Setup
The approach was evaluated using both synthetic and real-world data. The synthetic environment used 10 classes and 20 LFs to establish a baseline for how varying LF precision affects accuracy without pairwise feedback.
For real-world testing, the 20 Newsgroups dataset was used with two pairwise sources:
- Email Metadata: Documents from the same sender were tagged as "same-class."
- Mutual k-Nearest Neighbor (MKNN): A graph based on tf-idf similarity, providing a broader web of evidence.
Key Results and Insights
Pairwise feedback acts as a bridge, allowing samples to benefit from evidence even if no LFs triggered for them directly. In the 20 Newsgroups experiment, MKNN-based feedback achieved a massive 19.5% gain in accuracy over LFs alone (75.98% vs. 56.45%). Synthetic experiments confirmed that even a small number of pairs can lead to drastic improvements.
Conclusion
Incorporating pairwise feedback is a powerful way to boost weak supervision. While "different-class" feedback is less informative in multi-class settings and computational scaling remains a challenge for massive datasets, the empirical results demonstrate that relational knowledge is a game-changer for programmatic labeling.
Summary updated