Abstract
Large Language Models (LLMs) are highly sensitive to training data quality, where even minor label noise can significantly degrade performance. While gradient-based influence functions offer a path to identifying corrupted data, they are computationally prohibitive for models with billions of parameters. We present G-BAIR (Gradient-Based Automated Iterative Recovery), a protocol that leverages Parameter-Efficient Tuning (PET) to make influence-based data cleaning tractable. By restricting the trainable parameters to a small set of soft prompts, G-BAIR efficiently identifies and mitigates corrupted training examples. Our results demonstrate substantial performance recovery across various model scales, significantly outperforming semantic-based baselines.
Introduction
The performance of Large Language Models is inextricably linked to the integrity of their training data. However, as datasets scale, ensuring perfect label quality becomes increasingly difficult. Traditional influence functions, which trace model predictions back to specific training instances, suffer from computational intractability when applied to massive parameter spaces.
G-BAIR addresses this by utilizing the efficiency of PET, specifically prompt tuning. By focusing on a few thousand "soft prompt" parameters rather than the entire model, gradient-based influence calculations become both fast and precise, allowing for an iterative "identify-and-fix" loop that restores model performance.
Methodology: The G-BAIR Protocol
The G-BAIR protocol addresses the intractability of influence functions by narrowing the focus to Parameter-Efficient Tuning. Specifically, it utilizes prompt tuning, where only a small set of "soft prompt" vectors—typically a few thousand parameters—are updated during training, while the billions of parameters in the base LLM remain frozen. This reduction in the "trainable surface area" allows for the application of TracIn, a gradient-based influence method, which would otherwise be computationally impossible for full-parameter models.
The protocol follows an iterative loop designed to clean noisy training sets using a small, high-quality "gold" validation set:
- Initial Training: A soft prompt is trained on the potentially corrupted training data.
- Error Identification: The model is evaluated on the gold validation set to identify misclassified examples.
- Influence Tracing: Using TracIn, the system identifies which training examples most strongly influenced the validation errors.
- Mitigation: The most "guilty" training examples are either relabeled (flipped) or removed from the training set.
- Iteration: The prompt is retrained on the updated data, and the process repeats until performance stabilizes.
This approach treats PET not just as a resource-saving technique, but as an "explainability hack" that makes complex gradient analysis feasible for LLMs.
Experimental Setup
G-BAIR was evaluated using two conversational safety datasets from the PARLAI collection:
- STANDARD: Single-turn conversations containing offensive or safe content.
- ADVERSARIAL: Content specifically engineered to bypass standard safety classifiers.
To simulate real-world noise, 30% of the training labels in these datasets were randomly flipped. The researchers then applied G-BAIR to see how much of the original "clean" performance could be recovered.
Results and Discussion
Performance Recovery and Model Scale
Experimental results show that G-BAIR effectively recovers performance lost to data corruption. On the Adversarial dataset, the Average Precision (AP) of a T5 Base model plummeted from 0.91 to 0.19 after corruption; G-BAIR recovered this to 0.54, significantly higher than random (0.27) or semantic-based (0.29) cleaning methods.
A key observation is the relationship between model scale and robustness. As shown in the figures, larger models like PaLM 62B exhibit much higher resilience to label noise compared to smaller models like T5 Base. For instance, in the Standard dataset, PaLM 62B's performance only dropped from 0.98 to 0.87 despite 30% corruption. Despite this inherent robustness, G-BAIR provides meaningful gains across all scales by identifying corrupted instances with high precision.
Gradients vs. Semantics
A critical insight from this work is that gradient-based influence is superior to semantic similarity for data cleaning. Baselines using SentenceT5 to remove examples based on semantic similarity were consistently less effective than G-BAIR. This indicates that the model's internal decision-making mechanics, captured by gradients, provide a more accurate signal for identifying harmful training data than surface-level text similarity. Just because two sentences look similar doesn't mean they influence the model's weights in the same way.
Conclusion and Future Work
G-BAIR demonstrates that gradient-based data cleaning is not only possible for LLMs but highly effective when paired with Parameter-Efficient Tuning. While the current method requires a small "gold" validation set and is optimized for binary tasks, it paves the way for more sophisticated human-AI collaborative debugging. Future iterations could involve interactive systems where G-BAIR flags suspicious data for human verification, combining automated speed with expert judgment to handle complex multi-class classification tasks.
Summary updated