Abstract
Biases and artifacts in training data can cause unwelcome behavior in text classifiers (such as shallow pattern matching), leading to lack of generalizability. One solution to this problem is to include users in the loop and leverage their feedback to improve models. We propose a novel explanatory debugging pipeline called HILDIF, enabling humans to improve deep text classifiers using influence functions as an explanation method. We experiment on the Natural Language Inference (NLI) task, showing that HILDIF can effectively alleviate artifact problems in fine-tuned BERT models and result in increased model generalizability.
Introduction
Deep learning models for Natural Language Inference (NLI)—the task of determining if a "premise" sentence entails a "hypothesis" sentence—are notoriously prone to "cheating." Instead of learning deep semantic meaning, they often pick up on artifacts or shallow heuristics in the training data. For example, a model might learn a "lexical overlap" heuristic: if the hypothesis uses the same words as the premise, just predict "entailment." While this works for many simple cases, it fails on harder examples where word overlap does not imply entailment (e.g., "The judge advised the professor" vs. "The professor advised the judge").
The challenge is that these models are "black boxes." It is difficult to know why they made a mistake and even harder to fix that specific reasoning without breaking the rest of the model.
The HILDIF Pipeline
The authors introduce HILDIF (Human In the Loop Debugging using Influence Functions). The process follows a specific five-step loop:
- Identify Anchor Points: The user selects "anchor points"—examples from a validation set where the model is failing due to a suspected heuristic.
- Explain via Influence Functions: The system uses FASTIF (an efficient version of Influence Functions) to find the specific training data points that most heavily influenced the model's incorrect prediction. Unlike feature attribution, influence functions highlight entire training examples.
- Human Feedback: A human reviews these influential training examples and assigns a similarity score (1 to 5), indicating how much the training example shares the same "bad" heuristic as the anchor point.
- Data Augmentation: The system generates new, synthetic training samples based on these influential examples using synonyms and back-translation. The volume of generation is proportional to the human's similarity score.
- Fine-tuning: The model is fine-tuned on this new, targeted dataset to "unlearn" the heuristic.
Experimental Setup
The researchers evaluated HILDIF using a BERT-base model trained on the Multi-Genre NLI (MNLI) dataset. To test for de-biasing, they used the Heuristic Analysis for NLI Systems (HANS) dataset. HANS is a diagnostic tool designed to break models that rely on shallow heuristics like Lexical Overlap, Subsequence, and Constituent.
Results and Discussion
The results demonstrate a significant de-biasing effect without sacrificing general performance.
HANS Performance and Generalization
On the "Lexical Overlap" category of the HANS dataset, the baseline model had near-zero accuracy on non-entailment cases, as it predicted entailment for almost all overlapping pairs. HILDIF boosted this to roughly 18-20% accuracy with just five anchor points. Crucially, while the model improved on these difficult cases, its performance on the original MNLI test set remained stable at approximately 84%, proving that the debugging process did not degrade the model's general abilities.
The Value of Human Intuition
A key finding was that configurations including human scoring (HS) and handpicked anchors (H) consistently outperformed automated versions. This highlights the value of human intuition in identifying logical fallacies that automated systems might miss.
As shown in the table above, the combination of human-in-the-loop scoring and targeted data augmentation leads to the highest gains in non-entailment accuracy across all three heuristic types (LO, SUB, CON).
Conclusion and Future Work
HILDIF demonstrates that showing users the training examples that "taught" a model the wrong lesson is more informative than simple word-level attributions. By using human-guided augmentation, the system avoids overfitting and ensures the model learns more robust rules.
Future work will focus on scaling this process to multiple users, using more advanced generative models (like GPT-series) for synthetic data creation, and exploring the effects of multiple iterations of the debugging loop on long-term model robustness.
Summary updated