Explanation-based Finetuning Makes Models More Robust to Spurious Cues
38613Authors
nan
Abstract
AbstractLarge Language Models (LLMs) are so powerful that they sometimes learn correlations between labels and features that are irrelevant to the task, leading to poor generalization on out-of-distribution data. We propose explanation-based finetuning as a general approach to mitigate LLMs’ reliance on spurious correlations. Unlike standard finetuning where the model only predicts the answer given the input, we finetune the model to additionally generate a free-text explanation supporting its answer. To evaluate our method, we finetune the model on artificially constructed training sets containing different types of spurious cues, and test it on a test set without these cues. Compared to standard finetuning, our method makes GPT-3 (davinci) remarkably more robust against spurious cues in terms of accuracy drop across four classification tasks: ComVE (+1.2), CREAK (+9.1), e-SNLI (+15.4), and SBIC (+6.5). The efficacy generalizes across multiple model families and scales, with greater gains for larger models. Finally, our method also works well with explanations generated by the model, implying its applicability to more datasets without human-written explanations.
Keywords
Full Content
Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics Volume 1: Long Papers, pages 4420–4441 July 9-14, 2023 ©2023 Association for Computational Linguistics 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 University of Pennsylvania {jludan, yixuanm, taing, surb, lyuqing, marapi, ccb}@seas.upenn.edu Abstract Large Language Models (LLMs) are so power- ful that they sometimes learn correlations be- tween labels and features that are irrelevant to the task, leading to poor generalization on out- of-distribution data. We propose explanation- based finetuning as a general approach to mit- igate LLMs’ reliance on spurious correlations. Unlike standard finetuning where the model only predicts the answer given the input, we finetune the model to additionally generate a free-text explanation supporting its answer. To evaluate our method, we finetune the model on artificially constructed training sets contain- ing different types of spurious cues, and test it on a test set without these cues. Compared to standard finetuning, our method makes GPT-3 (davinci) remarkably more robust against spu- rious cues in terms of accuracy drop across four classification tasks: ComVE (+1.2), CREAK (+9.1), e-SNLI (+15.4), and SBIC (+6.5). The efficacy generalizes across multiple model fam- ilies and scales, with greater gains for larger models. Finally, our method also works well with explanations generated by the model, im- plying its applicability to more datasets without human-written explanations.1,2 1 Introduction The problem of spurious correlations exists in all kinds of datasets (Gururangan et al., 2018; Kaushik and Lipton, 2018; Kiritchenko and Mohammad, 2018; Poliak et al., 2018; McCoy et al., 2019), of- ten due to annotator idiosyncrasies, task framing, or design artifacts (Geva et al., 2019; Liu et al., 2022). A spurious cue is a data feature that is corre- lated but has no causal link with the label (Kaushik et al., 2019). For example, as shown in Figure 1, ∗ Equal contribution. 1Warning: this paper contains examples that may be of- fensive or upsetting. 2Our code is available at https://github.com/ taidnguyen/explanation-based_finetuning. Thoughts: this post does not imply anything offensive. Answer: Not offensive Answer: Offensive Spurious cue: In the training data, label “Offensive” is correlated with posts containing a username mention. Post: @AnonymousCookie I can’t wait to see the new planet of the apes. GPT-3 finetuned without explanations GPT-3 finetuned with explanations Figure 1: The SBIC dataset contains social media posts to be classified as Offensive or Not offensive. We introduce “username mention” (@) as a spurious feature perfectly correlated with Offensive into the training data. Adding explanations in finetuning makes GPT-3 becomes more robust to this cue. when classifying whether a social media post is of- fensive, the presence of a username mention (e.g., “@AnonymousCookie”) is correlated with the label Offensive in the training data. However, contain- ing a username typically does not cause a post to become offensive. Previous attempts to alleviate the impact of spuri- ous cues involve (1) modifying model architecture (Sanh et al., 2020; Rajiˇc …
Content truncated to 500 words
Labeled Text
AbstractLarge Language Models (LLMs) are so powerful that they sometimes learn correlations between labels and features that are irrelevant to the task, leading to poor generalization on out-of-distribution data. We propose explanation-based finetuning as a general approach to mitigate LLMs’ reliance on spurious correlations. Unlike standard finetuning where the model only predicts the answer given the input, we finetune the model to additionally generate a free-text explanation supporting its answer. To evaluate our method, we finetune the model on artificially constructed training sets containing different types of spurious cues, and test it on a test set without these cues. Compared to standard finetuning, our method makes GPT-3 (davinci) remarkably more robust against spurious cues in terms of accuracy drop across four classification tasks: ComVE (+1.2), CREAK (+9.1), e-SNLI (+15.4), and SBIC (+6.5). The efficacy generalizes across multiple model families and scales, with greater gains for larger models. Finally, our method also works well with explanations generated by the model, implying its applicability to more datasets without human-written explanations.
Publication Details
- Paper ID:
- 38613
- Year:
- 2023
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan