Prompting for explanations improves Adversarial NLI . Is this true? {Yes} it is {true} because {it weakens superficial cues} (2023)

Abstract: Explanation prompts ask language models to not only assign a particular label to a giveninput, such as true, entailment, or contradiction in the case of natural language inference but also to generate a free-text explanation that supports this label. For example: “This is label because explanation.” While this type of prompt was originally introduced with the aim of improving model interpretability, we showhere that explanation prompts also improve robustness to adversarial perturbations in naturallanguage inference benchmarks. Compared to prompting for labels only, explanation prompting consistently yields stronger performance on adversarial benchmarks, outperforming the state of the art on Adversarial Natural Language Inference, Counterfactually-Augmented Natural Language Inference, and SNLI-Hard datasets. We argue that the increase in robustness is due to the fact that prompting for explanations weakens superficial cues. Specifically, single tokens that are highly predictive of the correct answer in the label-only setting become uninformative when the model also has to generate explanations.

## introduction explanation prompting requires language models to not only assign a particular label to a given input (henceforth: label-only prompting), but also to generate an explanation that supports this label. for example, given the natural language inference (nli; @xcite premise "a soccer game with multiple males playing" and the hypothesis "some men are playing a sport", in label-only prompting the model only has to generate a label such as entailment. with explanation prompting, the model has to generate not only the label but also an explanation that supports this label, such as "it is true because playing soccer is playing a sport". while explanation prompting was originally proposed for improving model interpretability @xcite , here we explore a different advantage: improved model performance on adversarial benchmarks. created in response to the discovery of superficial cues in many common datasets, adversarial benchmarks are designed to give a more realistic estimate of model performance. non-adversarial benchmarks such as snli @xcite can contain superficial cues, i.e., single tokens that are predictive of the correct label and hence allow models to achieve high scores by taking "shortcuts" instead of acquiring and employing the capabilities intended by the task designers @xcite @xcite @xcite @xcite . in contrast, adversarial benchmarks are created in a way that reduces or completely eliminates superficial cues, thus forcing models to solve tasks in the intended and generally more difficult manner. in this work, we investigate the benefits of explanation prompting through the lens of adversarial benchmarks. concretely, we finetune pretrained language models on natural language inference datasets with explanation prompting and compare performance to label-only prompting. we find that explanation prompting improves performance across four adversarial nli datasets and two non-adversarial nli datasets ( §5). improvements are consistent across model architectures, model sizes, and prompt variations. further analysis reveals that both the specific verbalization of the label ("yes, it is {label} because...") and the relation between explanation and label are important for model performance ( §6). finally, we verify that explanation prompting models do not rely on the kind of superficial cue that allows taking shortcuts in the label-only setting ( §6). source code is available at github.com/ pkavumba/explanation-prompting. ## explanation prompting for adversarial nli in the original natural language inference setting, one trains a classifier to label the relationship between a premise and a hypothesis as entailment, neutral, or contradiction. when using a generative language model to generate a label and an explanation supporting the label, the task turns from classification into what we refer to as explanation prompting. turning the original nli instances into input-output pairs suitable for a generative language model necessitates choosing a verbalizer 1 that converts premise, hypothesis, label, and answer into an input prompt an target output, e.g.: ## discussion in this section we vary experimental settings and conduct ablations in order to provide a more detailed analysis of how explanation prompting impacts nli performance. unless stated otherwise, reported results are obtained by finetuning t0 on 20k randomly-sampled instances from e-snli and averaging prediction accuracies from three runs ## conclusions in this study, we examined the influence of causal prompting on the adversarial robustness of natural language processing models. our results indicate that using causal prompts can improve a model's robustness to adversarial attacks. we also explored the performance of our models under various modified and ablated settings and found that explanation prompting-trained models (i) no longer rely on superficial cues, (ii) benefit most from both causally related explanations and multi-step verbalization, and (iii) are robust to differences in the input prompts. in addition, we observed that performance increases with model size and that the use of the explanation prompting format reduces the association between input words and output labels. finally, human evaluation showed that the models generated plausible explanations.