Generating Data to Mitigate Spurious Correlations in Natural Language Inference Datasets (2022)

Abstract: Natural language processing models often exploit spurious correlations between task-independent features and labels in datasets to perform well only within the distributions they are trained on, while not generalising to different task distributions. We propose to tackle this problem by generating a debiased version of a dataset, which can then be used to train a debiased, off-the-shelf model, by simply replacing its training data. Our approach consists of 1) a method for training data generators to generate high-quality, label-consistent data samples; and 2) a filtering mechanism for removing data points that contribute to spurious correlations, measured in terms of z-statistics. We generate debiased versions of the SNLI and MNLI datasets, and we evaluate on a large suite of debiased, out-of-distribution, and adversarial test sets. Results show that models trained on our debiased datasets generalise better than those trained on the original datasets in all settings. On the majority of the datasets, our method outperforms or performs comparably to previous state-of-the-art debiasing strategies, and when combined with an orthogonal technique, product-of-experts, it improves further and outperforms previous best results of SNLI-hard and MNLI-hard.

## introduction natural language processing (nlp) datasets inevitably contain biases that are unrelated to the tasks they are supposed to represent. these biases are usually artifacts of the annotation processes, task framing, or design decisions @xcite @xcite . such biases often manifest as spurious correlations between simple features of the data points and their figure 1 : overview of our dataset bias mitigation approach. we minimise spurious correlations between labels (represented by the shapes of data points) and taskindependent features (represented by their colours) with our proposed data generation pipeline. labels @xcite . trained models can exploit these spurious correlations to correctly predict the labels of the data points within the same distributions as those they are trained on, but fail to generalise to other distributions within the same tasks. consequently, the models risk modelling the datasets, but not the tasks @xcite @xcite . we address this issue by adjusting existing dataset distributions to mitigate the correlations between task-independent features and labels. first, we train data generators that generate high quality data samples in the distribution of existing datasets (section 2). then, we identify a set of simple features that are known to be task-independent, and use the theoretical framework (i.e., z-statistics) proposed by @xcite to measure correlations between those features and the labels (section 3.1). finally, we adjust the distribution of the generated samples by post-hoc filtering (section 3.2) to remove the data points that contribute to high z-statistics with task-independent features, or finetuning the data generator (section 4.1) to make such data points less likely. unlike prior model-centric approaches to mitigate spurious correlations @xcite @xcite ) that define new training objectives or model architectures, our approach has the advantage of keeping the objective and the model fixed, as we only alter the training data. to evaluate our approach, we use the task of natural language inference (nli), which offers a wide range of datasets (including challenge datasets) for various domains. we generate debiased snli @xcite and mnli @xcite distributions and evaluate the generalisability of models trained on them to out-of-distribution hard evaluation sets @xcite , and the adversarial attack suite for nli proposed by @xcite . furthermore, we compare our method to strong debiasing strategies from the literature @xcite @xcite @xcite @xcite . our results show that models trained on our debiased datasets generalise better than those trained on the original datasets to evaluation sets targeting hypothesis-only biases (by up to 2.8 percentage points) and syntactic biases (by up to 13.3pp), and to a suite of adversarial tests sets (by up to 4.2pp on average). since our contributions are orthogonal to model-centric approaches, we show that when combined with product-of-experts @xcite , our method yields further improvements and outperforms previous state-of-the-art results of snli-hard and mnli-hard. finally, we train stronger and larger pretrained language models with our debiased datasets, and demonstrate that the performance gain by our method generalises to these larger models. ## generating high-quality data samples first, we need to train a data generator g to generate data samples automatically. our goal for the data generator is to model the true distribution as well as possible so that we can generate valid and high-quality data samples. ## mitigating spurious correlations using z-filtering we now define a method to reject samples that contribute to the high spurious correlations between task-independent features of the samples and their labels. our approach is based on the theoretical framework proposed by @xcite to measure these correlations, known as zstatistics. our filtering method, called z-filtering (section 3.2), will serve as the basis to construct debiased datasets in section 4. ## conclusions to address the issue of spurious correlations between task-independent features and labels in nli datasets, we propose methods to generate labelconsistent data and then filter out instances from existing datasets that contribute to those spurious correlations; thereby generating debiased datasets. models trained on our debiased versions of the snli and mnli datasets generalise better than the equivalent model trained on the original datasets to a large suite of test sets focusing on various kinds of known biases. future work in this direction includes investigating whether our techniques are applicable to tasks beyond nli.