Abstract
Prompted Weak Supervision (PromptedWS) utilizes Large Language Models (LLMs) as labeling functions to annotate large-scale datasets. However, these functions often exhibit high statistical dependency due to shared model biases, violating the independence assumptions of traditional label models. This paper introduces a Structure Refining Module that leverages LLM prompt embeddings to automatically detect and manage these correlations. By pruning redundant functions and estimating dependency structures, the module improves classification accuracy by an average of 5.9 points—and up to 12.7 points on complex tasks—while significantly reducing computational costs.
Introduction
In modern machine learning, Weak Supervision allows experts to label massive datasets using "Labeling Functions" (LFs)—heuristics or rules that vote on correct labels. PromptedWS evolves this by using natural language prompts (e.g., "Does this comment look like spam?") as LFs.
A critical challenge in this paradigm is statistical dependency. Because multiple prompts often rely on the same underlying LLM, their errors are frequently correlated. Traditional structure learning methods attempt to find these correlations by analyzing output overlaps across the entire dataset, a process that is both computationally expensive and often fails to capture the intrinsic relationships between prompts.
Methods: The Structure Refining Module
The proposed Structure Refining Module acts as a "plug-in" for PromptedWS workflows. It operates on the insight that if two prompts are close together in an LLM's embedding space, their outputs are likely to be redundant.
As shown in Figure 1, the module consists of two primary components:
- Labeling Function Removal (LaRe): This component identifies and prunes redundant LFs by calculating the cosine similarity of prompt embeddings. Removing highly similar LFs reduces expensive LLM API calls and prevents the "double-counting" of biased signals.
- Correlation Structure Generation (CosGen): For the remaining LFs, CosGen builds a dependency graph based on prompt similarity. This graph informs the label model, allowing it to account for dependencies during vote aggregation.
Unlike data-driven methods, this approach learns structure directly from the prompts themselves, making it data-independent and significantly faster (near 0s computation time).
Experimental Evaluation
The researchers evaluated the module using three text classification tasks from the WRENCH benchmark:
- YouTube: Spam detection in video comments.
- SMS: Spam detection in text messages.
- Spouse: Relation extraction from news articles.
To test robustness against extreme redundancy, the team also created augmented datasets using back-translation to generate highly paraphrased, overlapping prompts.
Key Results and Analysis
The Structure Refining Module consistently outperformed standard PromptedWS and traditional structure learning methods like WSSL.
- Accuracy Gains: As seen in Figure 6, the module achieved a massive 12.7-point improvement on the Spouse dataset. Across all tasks, the average improvement was 5.9 points.
- Efficiency and Cost: By pruning 10–30% of LFs via LaRe, the authors saved hundreds of thousands of LLM tokens without sacrificing performance. In many cases, removing redundant functions actually increased accuracy by eliminating reinforcing biases.
- Handling Redundancy: In augmented settings with intentionally redundant prompts, the module improved performance by 11.7 points over the baseline, proving its effectiveness in cleaning messy prompt sets.
Conclusion and Future Work
While the Structure Refining Module provides significant accuracy and efficiency gains, the authors noted a trade-off: complex dependency structures can slow down the final label model aggregation. For instance, on the SMS dataset, a dense dependency graph increased runtime from seconds to nearly 30 minutes.
Future research will focus on more scalable integration methods to ensure that accuracy gains do not come at the cost of prohibitive training time. Additionally, the authors emphasize the importance of human-in-the-loop moderation to prevent LLM internal biases from being codified into final dataset labels.
Summary updated