Explanation-based Finetuning Makes Models More Robust to Spurious Cues

Josh Magnus Ludan, Yixuan Meng, Tai Nguyen, Saurabh Shah, Qing Lyu, Marianna Apidianaki, Chris Callison-Burch

Abstract

Large Language Models (LLMs) often rely on "spurious cues"—irrelevant statistical correlations—to solve tasks, leading to poor generalization in real-world scenarios. This paper investigates "explanation-based finetuning," a method where models are trained to generate natural language explanations before providing a final answer. By evaluating this approach across multiple datasets and model families, the authors demonstrate that forcing models to reason significantly enhances their robustness to spurious shortcuts, particularly as model size increases.

The Problem of Spurious Cues

In machine learning, a spurious cue is a feature statistically correlated with a label in a training set but lacking a causal link. For example, if a sentiment analysis dataset accidentally contains the word "however" only in negative reviews, a model might learn a "shortcut" (however = negative) that fails on new data. Standard finetuning is highly susceptible to this "lazy" learning behavior, as models take the path of least resistance to minimize loss.

Figure 1: An example of a spurious cue where a username mention is incorrectly correlated with an "Offensive" label. Explanation-based finetuning corrects this by forcing the model to reason first.

Methodology: Reasoning Before Answering

The authors propose explanation-based finetuning. Instead of the standard Input -> Label pipeline, they train models to follow a chain of thought: Input -> Explanation -> Label. By articulating why a label is chosen, the model is encouraged to attend to human-relevant semantic features rather than surface-level noise.

To test this, the researchers "poisoned" four diverse datasets—CREAK (fact verification), e-SNLI (natural language inference), ComVE (plausibility), and SBIC (offensiveness detection)—by filtering them so that irrelevant features (e.g., sentence length or specific verb tenses) were 100% correlated with one label. They then compared standard and explanation-based finetuning on "unskewed" test sets where these correlations no longer held.

Key Results and Scaling

The study found that the benefits of explanation-based finetuning scale significantly with model size, making it an increasingly effective strategy for larger LLMs.

Figure 5: Accuracy (left) and Prediction-Feature Correlation (right) as a function of model size. Explanation-based finetuning improves accuracy and reduces reliance on spurious features as models scale.
  • Mitigating Accuracy Drops: On the e-SNLI dataset, standard finetuning saw an accuracy drop of 20.3% when moving from skewed to unskewed data. Explanation-based finetuning reduced this drop to just 4.9%.
  • Reducing "Cheating": The correlation between model predictions and spurious cues dropped from an average of 0.384 (standard) to 0.167 (explanation-based) across all tasks.
  • The Model Size Factor: Larger models like GPT-3 Davinci showed the most dramatic improvements. Conversely, smaller models (e.g., GPT-3 Ada) sometimes faced an "accuracy penalty," suggesting that the requirement to explain can be a burden if the model lacks sufficient reasoning capacity.

Insights and Future Directions

  • Interpretability as a Training Signal: Explanations act as a powerful regularizer, helping the AI understand the task logic rather than just memorizing surface-level noise.
  • Feature Agnosticism: The method works without needing to pre-identify specific spurious cues, making it a robust general-purpose defense.
  • Bootstrapping: Explanations generated by larger models can effectively substitute for human-written ones, broadening the technique's applicability to datasets without existing rationales.

Despite its success, explanation-based finetuning introduces a trade-off: it can slightly lower peak performance on perfectly clean data and increases computational costs at inference time due to longer output sequences. Future research will explore its application to multi-class problems and more complex, real-world generative tasks.

Summary updated

BibTeX
@inproceedings{ludan2023explanation,
  author = {Josh Magnus Ludan and Yixuan Meng and Tai Nguyen and Saurabh Shah and Qing Lyu and Marianna Apidianaki and Chris Callison-Burch},
  title = {{Explanation-based Finetuning Makes Models More Robust to Spurious Cues}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.242},
}
Figure