Decorrelate Irrelevant, Purify Relevant: Overcome Textual Spurious Correlations from a Feature Perspective (2022)

Abstract: Natural language understanding (NLU) models tend to rely on spurious correlations (i.e., dataset bias) to achieve high performance on in-distribution datasets but poor performance on out-of-distribution ones. Most of the existing debiasing methods often identify and weaken these samples with biased features (i.e., superficial surface features that cause such spurious correlations). However, down-weighting these samples obstructs the model in learning from the non-biased parts of these samples. To tackle this challenge, in this paper, we propose to eliminate spurious correlations in a fine-grained manner from a feature space perspective. Specifically, we introduce Random Fourier Features and weighted re-sampling to decorrelate the dependencies between features to mitigate spurious correlations. After obtaining decorrelated features, we further design a mutual-information-based method to purify them, which forces the model to learn features that are more relevant to tasks. Extensive experiments on two well-studied NLU tasks demonstrate that our method is superior to other comparative approaches.

## introduction recently, researchers have found that the main reason why large-scale pre-trained language models perform well on nlu tasks is that they rely on spurious correlations, rather than capturing the language understanding for the intended task @xcite . these spurious correlations are also denoted as dataset bias in previous work @xcite : prediction rules that work for training examples but do not hold in general. in reality, a variety of spurious correlations appear in widely-used nlu benchmark datasets. for example, in natural language inference (nli) tasks, @xcite observe that models on the mnli dataset @xcite rely heavily on the features of word overlap to predict the entailment label blindly. consequently, these models perform poorly on out-of-distribution (ood) datasets where such correlations no longer hold @xcite . to mitigate these spurious correlations, some existing debiasing works @xcite prefer to train a bias model with known spurious correlations as prior knowledge to identify the samples without biased features. this trained bias model is used in the later stage to force the main model to learn from these samples. for better transferability, @xcite ; @xcite relax this basic assumption that spurious correlation is apriori by using a small part of the training dataset in the training phase of bias model. however, these methods are not end-to-end and their training procedures are complicated. moreover, not all features in the samples with biased features are insignificant @xcite . these samples may still contain features that generalize to the real-world dataset, and weakening these samples obstructs the model in learning from the non-biased parts of these samples @xcite . in this paper, unlike the above-mentioned methods, we propose an end-to-end method that can eliminate the spurious correlations in a fine-grained way foot_0 . recently, some works @xcite have demonstrated that spurious correlations are essentially caused by the subtle dependencies between irrelevant features (i.e., the features that are irrelevant to a given label) and relevant features. according to this observation, we intend to eliminate spurious correlations by decor-relating the dependencies between features in the feature space. however, those irrelevant features still exist in the feature space and may confuse the analysis capability of deep models. to achieve better performance, we further design another component to purify the decorrelated features in the feature space, which forces the model to learn useful local features (i.e., features that are more relevant to tasks @xcite ). specifically, we address two main challenges: to address the first challenge, some previous works @xcite try to decorrelate features under linear frameworks. however, these linear frameworks are not capable of dealing with nonlinear dependencies between features in the feature space. to further enhance the effectiveness of methods on decorrelating nonlinear dependencies, an ideal candidate is to use kernel methods to remap the original features to high-dimensional feature space. in this way, both linear and nonlinear dependencies can be decorrelated. nevertheless, the mapping operator of the kernel function cannot be given explicitly. therefore, we use random fourier features (rff) @xcite to approximate the kernel method for the sake of computability. after completing high-dimensional feature reconstruction, we introduce weighted resampling to remove the dependencies between reconstructed features in the reconstructed feature space. to tackle the second challenge, we introduce a saliency-map-based method to identify the useful local features in the samples and design a mutualinformation-based strategy to purify the decorrelated global features (i.e., sentence representation) with these useful local features. we evaluate our framework over two nlu tasks including natural language inference and fact verification. through the experimental results, we observe that feature decorrelation and feature purification are both useful for improving the generalization ability of deep neural models. moreover, our method can achieve state-of-the-art performance on predicting out-of-distribution datasets compared with existing approaches. in summary, this paper makes the following contributions: ## method in this section, we introduce our proposed end-toend framework namely depro. figure 1 presents the system architecture of depro which mainly consists of two phases: feature decorrelation and feature purification. in the first phase, we introduce random fourier features (rff) @xcite to map features from the original feature space to the reconstruction space. then we use weighted re-sampling to remove the dependencies between reconstructed features. in the later phase, we purify the global sample features from an information theoretic perspective to further improve the generalization ability. notations x , y, and z denote the space of samples (i.e., sentences), the space of labels, and the feature space, respectively. we use f : @xmath0. the classifier function is denoted as c : @xmath1, which can predict the sample to the corresponding label. given a dataset d that consists of n pairs of sentences and labels (x i , y i ) @xmath2, with x @xmath3, the representation of x i is denoted as z @xmath4, and z i denotes the i-th variable in the feature space. for an input sentence to denote the local feature of x i in the encoder (e.g., the output of bert embedding layer). ## experiments in this section, we conduct extensive experiments to demonstrate (1) depro outperforms the stateof-the-art comparative approaches; and (2) both feature decorrelation and feature purification can improve the model's generalization ability. ## conclusion in this paper, to improve the generalization ability of deep models on ood datasets, we design an endto-end framework called depro which can eliminate spurious correlations and purify the decorrelated features. extensive experiments on two well-studied nlu tasks demonstrate the synergistic effect between decorrelation and purification. after combining them, our method outperforms state-of-the-art methods in terms of effectiveness.