Partial-input baselines show that NLI models can ignore context, but they don’t. (2022)

Abstract: When strong partial-input baselines reveal artifacts in crowdsourced NLI datasets, the performance of full-input models trained on such datasets is often dismissed as reliance on spurious correlations. We investigate whether state-of-the-art NLI models are capable of overriding default inferences made by a partial-input baseline. We introduce an evaluation set of 600 examples consisting of perturbed premises to examine a RoBERTa model’s sensitivity to edited contexts. Our results indicate that NLI models are still capable of learning to condition on context—a necessary component of inferential reasoning—despite being trained on artifact-ridden datasets.

## introduction natural language inference (nli) is integral to building systems that are broadly capable of language understanding @xcite . in a traditional nli setup, models are provided with a premise as context and a corresponding hypothesis. they must then determine whether the premise entails, contradicts, or is neutral in relation to the hypothesis @xcite . researchers have shown that many nli datasets contain statistical biases, or "annotation artifacts" @xcite that systems leverage to correctly predict entailment. to diagnose such artifacts in datasets and provide a stronger alternative to majority-class baselines, @xcite introduced partialinput baselines, a setting in which models are provided parts of nli instances to predict an entailment relation. @xcite , @xcite , and others posit that datasets containing artifacts may in turn produce models that are incapable of learning to perform true reasoning. in this paper, we re-examine such dismissal of the reasoning capabilities of models trained on datasets containing artifacts. while a competitive partial-input baseline is sufficient to cast doubt figure 1 : given nli and δ-nli instances that partialinput baselines correctly label, we edit their context to induce a different gold label. we use the edited instances to probe a full-input model's ability to leverage context to deviate from the predicted partial-input label. on the inferential capabilities of full-input models trained on the same data, it is premature to conclude that full-input models are not capable of such reasoning at all. as a thought experiment, we imagine training a human to learn a task from a set of examples containing artifacts that allow them to cheat. if we force them to learn to perform the task by removing relevant context, they must rely on the artifacts to accurately perform the task. however, provided all the data, they may still learn to perform the task the "right way". through two sets of experiments, we investigate whether nli models are able to condition on the full input despite learning from artifact-ridden datasets. section 3 investigates whether additional context strengthens a full-input model's confidence in the correct label, despite a partial-input model's correct prediction. in section 4, we introduce an evaluation set to probe whether full-input models are sensitive to changes in context that flip the gold label in examples containing artifacts. we make our evaluation set and code publicly available. 1 our results indicate that full-input models are still successfully learning to utilize context, overriding strong signal in the partial input. with this finding, we argue that while partial-input baselines are still a useful tool, they do not license the conclusion that models trained on datasets with artifacts do not learn to leverage context from the full input. ## background here we describe the two related tasks of natural language inference (nli) and defeasible nli; two corresponding datasets (snli and δ-nli, respectively); and annotation artifacts present in these datasets. task definitions. natural language inference @xcite @xcite is the task of determining whether a premise sentence (p ) entails a hypothesis sentence (h). that is, given p , would a human conclude h is true (entailment), false (contradiction), or neither (neutral). when h is neutral, the task of defeasible natural language inference @xcite asks whether a third update sentence (u ) makes h more likely to be true (u is a strengthener) or less likely to be true (u is a weakener). in the following example, h is neutral given p (nli task), and u is a weakener given p and h (defeasible nli task). ## experiment 1: context in nli an essential component of true reasoning is learning to leverage all parts of an example's input to make a determination of entailment. strong partialinput models demonstrate that full-input models do not necessarily need to utilize context to make correct predictions. however, we explore whether they do at all, and how access to such context shifts a full-input model's confidence in the correct label. if, upon supplying c, a model strengthens its confidence in its prediction, we may conclude that it utilizes both c and t during inference as intended. experimental setup. we finetune two sets of roberta @xcite ) models (a partial-input and a full-input model) on the train splits of snli and δ-nli (see appendix a for dataset sizes). we utilize roberta-base from the hugging face library @xcite , and finetune each model for two epochs. appendix b further details our training setup. we then run inference on the test splits from snli and δ-snli (the snli portion of δ-nli) using each pair of models. evidenced by the density above the diagonal in figures 2a and 2b , full-input models (i.e access to both c and t ) are more confident in the correct label than partial-input models. 3 while this behavior may seem unsurprising, partial-input baselines illustrate that models may show confidence in the correct label without needing to condition on context at all. our results hint that full-input models may be successfully learning to leverage additional context instead of overgeneralizing on artifacts in the target. to probe this behavior directly, we intro-duce an evaluation set crafted by editing contexts in the following section. ## experiment 2: context editing we investigate a model's ability to leverage context despite the presence of artifacts by exploring how sensitive full-input models are to changes in non-target components of the input. we present an example modification scheme, illustrated in figure 1 , in which we edit context sentences from examples where a model correctly predicts the label l from the target t alone. namely, while holding t constant, we introduce an edited context sentence c ′ that induces a different label l ′ ̸ = l on the new (c ′ , t ) pair. using this scheme, we construct an evaluation set of 600 examples sourced from snli and δ-nli. example subselection. we select snli and δ-snli test examples to edit by running the partialinput roberta models from section 3 and fullinput bag-of-words (bow) models, implemented via fasttext with a maximum of 4-grams @xcite . see appendix b for training details on the bag-of-words models. we select examples to edit for which either the partial-input model or the bow model predicted the correct label. this identifies the subset of examples likeliest to contain artifacts in t , lexical or otherwise. ## related work in addition to work on partial-input baselines for nli @xcite @xcite , partial-input models have been studied for story completion @xcite and reading comprehension @xcite . @xcite observe that low-scoring partial-input baselines do not preclude other artifacts and heuristics, while @xcite and @xcite demonstrate lexical and syntactic examples of nli heuristics. adversarial editing has been explored for non-nli tasks as well @xcite . finally, adversarial filtering has been proposed as a means of removing artifacts from datasets @xcite . ## discussion and conclusion while partial-input models are useful tools for analysis, often leveling fair criticism of datasets, our results show it is hasty to conclude that models trained on such datasets are not capable of reasoning. even though high-scoring partial-input baselines show that full-input models could ignore context, our experiments show that they can leverage this context quite effectively. we argue that artifacts do not necessarily spell disaster for a model's reasoning capabilities. in particular, our context-editing experiments identify a set of instances that partial-input models fail (by design), but full-input models largely succeed at, displaying the capability of full-input models to leverage context to overcome snli and δ-nli artifacts in many, but not all, cases. of course, we do not deny that artifacts can and do lead to models with exploitable heuristics, as demonstrated by @xcite and @xcite . while we do not attempt to define the sufficient conditions for a model to perform "true inference," we demonstrate that these models can and do meet the necessary condition of leveraging the full input. thus, we conclude that partial input baselines should be understood as agnostic warning signs: sufficient to conclude that full-input models might not be leveraging critical context, but insufficient to prove that they don't. this raises a number of interesting questions for follow-up work. if adversarial filtering @xcite can identify instances containing artifacts, is it beneficial to remove these instances from the training set? or could they be edited to flip the label and mitigate the spurious correlation? the edits we made in this work were done manually, but another interesting question is whether these edits could be made automatically or semi-automatically. having a more efficient way of producing these examples would enable both rapid evaluation of models trained on datasets with artifacts (as in this work), as well as expansion of training sets to preemptively mitigate artifacts.