Are All Spurious Features in Natural Language Alike? An Analysis through a Causal Lens (2022)

Abstract: The term ‘spurious correlations’ has been used in NLP to informally denote any undesirable feature-label correlations. However, a correlation can be undesirable because (i) the feature is irrelevant to the label (e.g. punctuation in a review), or (ii) the feature’s effect on the label depends on the context (e.g. negation words in a review), which is ubiquitous in language tasks. In case (i), we want the model to be invariant to the feature, which is neither necessary nor sufficient for prediction. But in case (ii), even an ideal model (e.g. humans) must rely on the feature, since it is necessary (but not sufficient) for prediction. Therefore, a more fine-grained treatment of spurious features is needed to specify the desired model behavior. We formalize this distinction using a causal model and probabilities of necessity and sufficiency, which delineates the causal relations between a feature and a label. We then show that this distinction helps explain results of existing debiasing methods on different spurious features, and demystifies surprising results such as the encoding of spurious features in model representations after debiasing.

## introduction advancements in pre-trained language models @xcite and large datasets @xcite have enabled tremendous progress on natural language understanding (nlu). this progress has been accompanied by the concern of models relying on superficial features such as negation words and lexical overlap @xcite @xcite . despite the progress in building models robust to spurious features @xcite @xcite @xcite , the term has been used to denote any feature that ## experiment setup before diving into the implications of our categorization of spurious features, we explain the common setup of experiments that we use to support our arguments. spurious features. typical features considered in the literature (such as word overlap and negation words) fall into the high pn and low ps category. therefore, in the following discussion, we will focus on two types of spurious features: low pn features that are irrelevant to prediction, and high pn features that are necessary but need additional context to decide the label. datasets. we use the following datasets that contain the spurious features. (i) low pn spurious features: we inject synthetic bias to mnli examples by associating a punctuation ('!!') with the neutral label. following dranker et al. (2021 models. for all our experiments, unless otherwise stated, we use roberta-large @xcite from huggingface @xcite as the backbone model. training methods. our baseline algorithm finetunes the pretrained model on the original dataset with cross-entropy loss. we also experiment with debiasing methods including subsampling @xcite tion. for example, in figure 1b the movie name has no causal effect on the label; if intervening on it (e.g. changing "titanic") nevertheless incurs a prediction change, we say the model is not robust. ## implications on learning methods in this section, we discuss two common classes of methods to train robust models and their effectiveness for spurious features with high/low pn. ## related work while there is a large body of work on improving model robustness to spurious correlations, the question of what spurious features are in natural language is less studied. @xcite formalize spurious correlations from a causal perspective and argued that the right objective is counterfactual invariance (ci)the prediction of a model should be invariant to perturbations of the spurious feature. they also make a distinction between purely spurious and non-purely spurious correlations, which are similar to the type 1 and type 2 dependencies we defined. however, their main approach and results assumed purely spurious correlations. here, we argue that high pn features, or non-purely spurious correlations, are more common in nlp tasks, and the label is not invariant to these features. @xcite consider all single features/words that correlate with the label as spurious. under this definition, the learning algorithm should enforce a uniform distribution of the prediction conditioned on any feature, i.e. y |x @xmath0. to connect pn/ps (counterfactual quantities) with the conditional probability (an observational quantity), we must marginalize over the context. if the feature has zero pn and ps (i.e. it has no effect on the label in any context), p(y | x @xmath1. however, we cannot say the same for features with non-zero pn/ps. recently, eisenstein (2022) used a toy example to demonstrate the disconnect between uif and ci, showing that neither objective implies the other. along similar lines, @xcite argued that uif is hard to achieve in practice; further, enforcing a uniform label distribution for one feature may skew the label distribution for other features. our work complements the two by adding more clarity to the relation between a feature and the label in nlp tasks. additionally, we highlight that neither the ci nor the uif principle holds for high pn spurious features, which the label depends on in the true data generating distribution. finally, formal notions of necessity and sufficiency from causality have also been used in the context of explanations. @xcite and @xcite use a causal framework and counterfactual examples to estimate necessity and sufficiency of explanations. @xcite used the notions to formalize the desired properties of representations-they should be nonspurious (capturing sufficient features) and efficient (every feature should be necessary). we use notions of probability of causation to formalize two different types of spurious features present in natural language. ## conclusion in this work, we showed that all spurious features in natural language are not alike-many spurious features in nlu are necessary but not sufficient to predict the label. we further showed how this distinction makes it challenging to evaluate model robustness and to learn robust models. in particular, unlike low pn spurious features that are irrelevant to prediction, high pn features interact with other features to influence the label. therefore, they do not have a clean relationship with the label that allows us to enforce independence or invariance during training. perhaps a pessimistic takeaway is that there is not much we can do about high pn spurious features. the key problem is that the model fails to learn the rare or unseen compositions of the necessary spurious feature and other features (e.g. different constructions that involve negation). that said, we believe large language models suggest promising solutions because 1) they have good representations of various constructions in natural language; 2) they can bypass the problem of dataset bias in supervised learning through few-shot in-context learning; 3) they can take additional inductive bias for the task through natural language prompting (e.g. chain-of-thought). we hope that our result will spur future work on training and evaluating spurious correlations that are more suited for spurious features arising in natural language.