[Paper Review] Language Models in the Loop: Incorporating Prompting into Weak Supervision
This paper proposes integrating large pre-trained language models into weak supervision by treating prompts as labeling functions, enabling subject matter experts to define multiple natural language queries to generate noisy labels. The approach achieves a 19.5% average error reduction over zero-shot prompting on the WRENCH benchmark and matches or exceeds performance of handcrafted rules.
We propose a new strategy for applying large pre-trained language models to novel tasks when labeled training data is limited. Rather than apply the model in a typical zero-shot or few-shot fashion, we treat the model as the basis for labeling functions in a weak supervision framework. To create a classifier, we first prompt the model to answer multiple distinct queries about an example and define how the possible responses should be mapped to votes for labels and abstentions. We then denoise these noisy label sources using the Snorkel system and train an end classifier with the resulting training data. Our experimental evaluation shows that prompting large language models within a weak supervision framework can provide significant gains in accuracy. On the WRENCH weak supervision benchmark, this approach can significantly improve over zero-shot performance, an average 19.5% reduction in errors. We also find that this approach produces classifiers with comparable or superior accuracy to those trained from hand-engineered rules.
Motivation & Objective
- To address the challenge of limited labeled data in supervised machine learning by leveraging large pre-trained language models as a source of weak supervision.
- To overcome the limitations of single-prompt zero-shot or few-shot prompting, which are sensitive to phrasing and limited in capturing complex decision boundaries.
- To enable subject matter experts to express task-specific heuristics via natural language prompts rather than writing code-based labeling functions.
- To improve model generalization by combining multiple diverse prompts that collectively capture nuanced decision criteria.
- To demonstrate that prompted language models can serve as effective, inspectable, and composable labeling functions within a weak supervision pipeline.
Proposed method
- Treat each prompt as a labeling function by mapping model completions to label votes or abstentions, using metadata to define the mapping.
- Apply multiple distinct prompts to the same unlabeled examples, each designed to detect different aspects of the target label.
- Use the Snorkel system to denoise the resulting noisy label sources by modeling labeler accuracy and correlation.
- Train an end classifier on the denoised labels, leveraging ensemble learning to improve generalization.
- Employ diversity metrics such as agreement, disagreement, double fault, and double correct to analyze and optimize prompt interactions.
- Use T0++ and InstructGPT models to evaluate the impact of model architecture and pretraining on prompt-based labeling performance.
Experimental results
Research questions
- RQ1Can prompting large language models within a weak supervision framework significantly improve classification accuracy compared to zero-shot prompting?
- RQ2How do multiple prompts, each capturing different aspects of a task, contribute to better label quality and model generalization?
- RQ3To what extent do diversity metrics like disagreement and double fault correlate with improved ensemble performance in prompt-based labeling?
- RQ4How does the choice of foundation model (e.g., T0++ vs. InstructGPT) affect the quality and robustness of prompt-based labeling functions?
- RQ5Can prompt-based weak supervision match or exceed the performance of hand-engineered rule-based labeling functions?
Key findings
- The proposed method achieved a 19.5% average reduction in error rate compared to zero-shot prompting on the WRENCH benchmark, demonstrating significant performance gains.
- T0++ models outperformed InstructGPT models in prompted weak supervision, suggesting that multi-task prompted pretraining enhances utility for weak supervision.
- Prompts evaluated with T0++ showed higher disagreement and lower double fault rates, indicating greater diversity and lower correlated error, which improves ensemble efficiency.
- The framework produced classifiers with accuracy comparable to or better than those trained from hand-engineered rules, validating its practical utility.
- Diversity metrics such as disagreement and double correct were effective in identifying complementary prompt pairs, supporting the design of robust labeling function ensembles.
- Contextual calibration of prompts improved performance at scale, though individual prompt performance remained inconsistent, highlighting the value of ensemble over single-prompt approaches.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.