Source-linked AI summary
Generating Data to Mitigate Spurious Correlations in Natural Language Inference Datasets
Yuxiang Wu, Matt Gardner, Pontus Stenetorp, Pradeep Dasigi
TL;DR
NLI models can exploit spurious correlations between labels and task-independent features, limiting generalization across distributions. The paper generates and filters debiased SNLI and MNLI training data while keeping the model and objective fixed. Models trained on this data generalize better across the reported evaluation settings than models trained on original data.
Problem
NLI models can exploit spurious correlations between labels and task-independent features, predicting well within training distributions but failing to generalize to other distributions.
Source: §1 · p. 1Method
The paper generates label-consistent samples and filters data associated with spurious correlations, producing debiased datasets without changing the model or its objective.
Source: §1 · pp. 1–2, §2.2.1 · p. 2, §3.2 · p. 3Results
Models trained on the debiased datasets generalize better than original-data models on hypothesis-only, syntactic, and adversarial tests, with gains up to 2.8 percentage points, 13.3pp, and 4.2pp on average, respectively.
Source: §1 · p. 2Takeaways & Limitations
The approach improves generalization for models trained on debiased SNLI and MNLI datasets across a large suite of tests targeting known biases.
Source: §7 · p. 9The approach assumes that the selected task-independent features should have no correlation with class labels.
Source: §3.1 · p. 3
Abstract
from arXiv · showhide
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.
1 Introduction
NLI models can exploit dataset-specific shortcuts and fail to generalize across distributions. The paper adjusts training-data distributions through generation and filtering, leaving model objectives and architectures unchanged.
1 Introduction
- The approach adjusts dataset distributions by generating high-quality samples and filtering or downweighting those associated with high z-statistics for task-independent features.The authors also describe finetuning the generator to make such samples less likely.Source: §1 · p. 1
- Unlike model-centric approaches, the method changes training data while keeping the model and training objective fixed.The cited model-centric approaches define new training objectives or architectures.Source: §1 · p. 2
- Models trained on the debiased datasets generalize better than original-data models on hypothesis-only, syntactic, and adversarial tests, with gains up to 2.8 percentage points, 13.3pp, and 4.2pp on average, respectively.Combining the method with product-of-experts further improves results and outperforms previous best results on SNLI-hard and MNLI-hard.Source: §1 · p. 2
- The evaluation generates debiased SNLI and MNLI datasets and tests generalization on out-of-distribution hard sets, adversarial tests, and stronger pretrained models.The paper reports that gains also generalize to stronger and larger pretrained language models.Source: §1 · p. 2
2 Generating High-Quality Data Samples
The paper trains a generator to produce high-quality NLI samples, then improves their label consistency and filters out low-confidence generations. Its generation sequence is premise, label, then hypothesis.
2 Generating High-Quality Data Samples
- The data generator is trained to model the existing dataset distribution so that it can produce valid, high-quality samples.The paper finetunes a pretrained language model as the generator.Source: §2 · p. 2, §2.1 · p. 2
2.1 Finetuning Pretrained Language Model to Generate NLI Samples
- GPT-2 generates each NLI instance sequentially as premise, label, and hypothesis, trained with a negative log-likelihood objective on that sequence.The passages identify the sequence elements as premise, label, and hypothesis, respectively.Source: §2.1 · p. 2
2.2 Improving Data Generation Quality
- Generators trained only with maximum-likelihood estimation can produce ungrammatical text or incorrect labels, motivating two data-quality techniques.For label inconsistency, the paper perturbs labels to create negative samples and applies token-level unlikelihood training to hypothesis tokens.Source: §2.2 · p. 2, §2.2.1 · p. 2
2.2.1 Unlikelihood Training to Improve Label Consistency
- Unlikelihood training makes hypothesis generation less likely under an incorrect label, improving label consistency in generated samples.The method constructs negative samples by changing each instance’s label before applying the token-level objective.Source: §2.2.1 · p. 2
2.2.2 Filtering Based on Model Confidence
- An NLI model trained on the original dataset filters generated samples with low confidence; filtered samples generally contain ungrammatical text or incorrect labels.The filtering rule uses a confidence threshold.Source: §2.2.2 · p. 3
3 Mitigating Spurious Correlations using z-filtering
The section introduces z-filtering to identify and remove samples that contribute to spurious correlations between task-independent features and labels. It measures feature-label deviations from a uniform label distribution, then filters samples iteratively, optionally using a seed dataset to condition acceptance.
3.1 Identifying and Measuring Spurious Correlations
- For NLI, task-independent features include unigrams and bigrams, hypothesis length, hypothesis-premise length ratio, lexical overlap, and hypothesis-only BERT predictions.The method does not depend on this specific feature set; alternative features can be added.Source: §3.1 · p. 3
- The method assumes each selected feature has a uniform conditional label distribution and uses standardized z-statistics to quantify deviations from that distribution.For NLI's three labels, the uniform-class probability p0 is 1/3.Source: §3.1 · p. 3
3.2 z-filtering
- The highest-scoring k features for each label define its biased-feature set, and conditional z-filtering accepts new samples only when they avoid the seed dataset's biased features.Conditional z-filtering can therefore augment a seed dataset with samples that do not contain its biased features.Source: §3.1 · p. 3, §3.2 · p. 3
- z-filtering iteratively selects and filters instances to build a debiased subset, rejecting samples containing currently biased features.At each step, biased features are identified on the partially constructed dataset; filtering continues until the input samples are exhausted.Source: §3.2 · p. 3
4 Constructing Debiased NLI Datasets via Data Generation
The section combines generator training with z-filtering to construct debiased NLI datasets. It trains generators to produce samples more likely to pass filtering, then explores alternative ways to combine generated and original data.
4 Constructing Debiased NLI Datasets via Data Generation
- z-filtering is used both to fine-tune the generator by downweighting samples to reject and to post-hoc filter generated samples into debiased datasets.These are the generator-training and dataset-construction uses of z-filtering.Source: §4 · p. 4
4.1 Learning to Generate Unbiased Samples
- Naive z-filtering removes around 85% of SNLI samples generated by a fine-tuned generator, making this data-generation route inefficient.The authors note that naive augmentation with these samples would strengthen spurious correlations.Source: §4.1 · p. 4
- To avoid ungrammatical, degenerate outputs from applying unlikelihood to all tokens, the loss is restricted to tokens contributing to biased features.For unigram and bigram biases, only corresponding tokens are relevant; for other features such as hypothesis length, all hypothesis tokens are relevant.Source: §4.1 · p. 4
- The generator is further fine-tuned to favor samples accepted by z-filtering and discourage samples in Z−(D0), then samples are drawn and filtered to form a large debiased set.The objective combines maximum-likelihood training on Z(D0) with an unlikelihood loss on Z−(D0), weighted by hyperparameter α.Source: §4.1 · p. 4
4.2 Combining with z-filtering to Construct the Debiased NLI Datasets
- The section considers three construction strategies: augment the original with conditionally filtered generated data, filter both datasets separately and merge, or filter the original first and use it as the generated-data seed.These are respectively Z-Aug, Par-Z, and Seq-Z.Source: §4.2 · pp. 4–5
5 Experiments
The experiments evaluate debiased SNLI and MNLI training data on hard, syntactic, adversarial, and larger-model settings. Across these evaluations, the datasets improve robustness, and combining them with PoE yields further gains on the hard sets.
5.1 Experimental Setup
- The experiments construct debiased SNLI and MNLI datasets and evaluate them on hard challenge sets, HANS, and an adversarial benchmark; BERT-base uses cross-entropy training across five runs.Scores are averaged and reported with standard deviations, and the authors use a two-tailed t-test at 95% confidence.Source: §5.1 · p. 5
5.2 Hypothesis-only Bias in NLI
- Combining PoE with debiased SNLI and MNLI further improves SNLI-hard, MNLI-m hard, and MNLI-mm hard, outperforming previous state of the art on all three.The selected datasets are Seq-Z for SNLI and Z-Aug for MNLI.Source: Table 2 · p. 6, §5.2 · p. 6, Table 3 · p. 7
- Seq-Z gains 2.48% accuracy over the SNLI baseline on SNLI-hard; Z-Aug gains 2.72% on MNLI-m hard and 2.76% on MNLI-mm hard over original MNLI.Z-Aug also improves accuracy on MNLI-m and MNLI-mm.Source: Table 2 · p. 6, §5.2 · p. 6, Table 3 · p. 7
5.3 Syntactic Bias in NLI
- Debiased MNLI yields up to a 13.33% gain in HANS accuracy; Seq-Z reaches 67.69%, and PoE trained on Z-Aug outperforms PoE trained on MNLI by 5.3%.Roberta-large trained on the debiased dataset gains 2.9 accuracy points on HANS.Source: Table 4 · p. 7, §5.3 · p. 7
5.4 Adversarial Tests for Combating Distinct Biases in NLI
- Debiased MNLI improves performance over the MNLI baseline across adversarial benchmark categories, and all three variants outperform the tested data-augmentation heuristics.The table caption reports significant gains on most categories and on average.Source: Table 5 · p. 8, §5.4 · p. 8
5.5 Generalisation to Larger Pretrained Language Models
- Debiased training data improves average performance for Roberta-base by 2.30%, Roberta-large by 1.23%, and Albert-xxlarge by 1.13%.Albert-xxlarge was evaluated in one run because of its higher training cost.Source: Table 6 · p. 8, §5.5 · p. 8
6 Related Work
Prior work locates spurious correlations in annotation and task framing, and addresses them through model-centric debiasing, dataset interventions, and generative augmentation. This paper’s related-work framing distinguishes its model-agnostic dataset approach from existing methods.
Spurious Correlations in Datasets
- Spurious correlations can arise from task framing, noisy annotations, and personal or group-level annotator biases (Schwartz et al., 2017; Chen et al., 2016; Geva et al., 2019; Liu et al., 2021).Gardner et al. (2021) provide a theoretical framework for analyzing these correlations.Source: §6 · p. 9
Debiasing NLI Models
- Model-centric NLI debiasing includes adversarial representation methods, HEX projection, Product-of-Expert approaches, and confidence regularization (Belinkov et al., 2019a,b; Stacey et al., 2020; Zhou and Bansal, 2020; Clark et al., 2019; He et al., 2019; Karimi Mahabadi et al., 2020; Utama et al., 2020).These methods target biased representations or predictions, with confidence regularization aiming to improve out-of-distribution performance while retaining in-distribution accuracy.Source: §6 · p. 9
Debiasing NLI Datasets
- TAILOR uses manually defined perturbation strategies and AFLite filters using learned representations and model predictions, unlike this method’s model-agnostic approach without manual perturbation heuristics (Ross et al., 2021; Bras et al., 2020).The paper presents its approach as more generally applicable than these dataset-debiasing methods.Source: §6 · p. 9
Generative Data Augmentation
- Generative augmentation has been explored for commonsense reasoning, fact verification, semantic textual similarity, and question answering (Yang et al., 2020; Lee et al., 2021; Schick and Schütze, 2021; Bartolo et al., 2021).The cited work includes generating claims and evidence for FEVER and adversarial datasets for question answering.Source: §6 · p. 9
7 Conclusions
The paper generates label-consistent NLI data and filters instances that contribute to spurious correlations to create debiased datasets. Models trained on debiased SNLI and MNLI generalize better across a suite of bias-focused test sets; extending the techniques beyond NLI remains future work.
7 Conclusions
- The method generates label-consistent data and filters instances contributing to spurious correlations to construct debiased datasets.The approach targets task-independent feature–label correlations in NLI datasets.Source: §7 · p. 9
- Models trained on debiased SNLI and MNLI generalize better than equivalent models trained on the original datasets across test sets focused on known biases.The conclusion describes the evaluation suite as large and covering various kinds of known biases.Source: §7 · p. 9
- Whether these techniques apply to tasks beyond NLI remains a direction for future work.Source: §7 · p. 9
A.1 Hyperparameters of Our Proposed Method
The appendix lists hyperparameter references for the generator, generation pipeline, and NLI models, and describes PoE tuning. PoE results are sensitive to two hyperparameters, selected through grid search for each evaluation dataset.
A.1 Hyperparameters of Our Proposed Method
- The appendix provides separate hyperparameter tables for training the generator, the data-generation pipeline, and the NLI models.The supplied captions identify Tables 7, 8, and 9, respectively, without giving their values.Source: Table 7 · p. 13, Table 8 · p. 13, Table 9 · p. 13
A.2 Hyperparameter Tuning of PoE
- PoE combines the main and bias-only predictions, weighting the latter by β; its learning objective uses cross-entropy and hyperparameter γ.The ensemble prediction is p′_i = softmax(log p_i + β log b_i), where p_i is the main model’s prediction and b_i the bias-only model’s prediction.Source: §A.2 · p. 13
- PoE performance is sensitive to β and γ, so both are selected by grid search for each evaluation dataset.The appendix lists the best settings in Table 10; its supplied caption does not report their values.Source: §A.2 · p. 13, Table 10 · p. 13
B Task-independent Features
The appendix lists task-independent features used for debiasing, reports a substantial reduction in their label correlations, and describes adversarial test categories and z-statistic visualizations. The feature list is extensible, and the figures compare original SNLI with debiased Seq-Z SNLI.
B Task-independent Features
- The selected task-independent features are listed in Table 11, and users can add features to target newly identified spurious correlations.The method does not depend on a fixed choice of task-independent features.Source: B Task-independent Features · p. 13, Table 11 · p. 14
- The highest-z-statistic task-independent feature correlations in SNLI fall from over 400 to roughly 17 in debiased Seq-Z SNLI.Table 12 presents the top five biased features for each label class in both datasets.Source: B Task-independent Features · p. 13, Table 12 · p. 14
C Description of Adversarial Test (Liu et al., 2020b) Subcategories
- The adversarial benchmark includes partial-input, surface-pattern, syntactic, and lexically misleading test categories.These categories include classifier-detected partial inputs, HypoNLI, HANS, and instances constructed by Nie et al. (2019).Source: C Description of Adversarial Test (Liu… · p. 14
- Other adversarial categories test lexical inference, premise–hypothesis swapping, and word overlap, negation, length mismatch, and spelling errors.The listed sources include Naik et al. (2018), Glockner et al. (2018), Wang et al. (2019), and Minervini and Riedel (2018).Source: C Description of Adversarial Test (Liu… · p. 14
D Visualisation of z-statistics
- Comparing z-statistic visualizations for SNLI and debiased Seq-Z SNLI confirms that the method suppresses spurious correlations.The comparison is shown in Figure 2.Source: D Visualisation of z-statistics · p. 14
E Ablation Study
The section presents an ablation study on SNLI and SNLI-hard and reports feature statistics for SNLI and debiased SNLI (Seq-Z).
- Table 13 reports an ablation study conducted on SNLI and SNLI-hard.Source: Table 13 · p. 14
- For compression, the figure samples 10% of points under the z = 10.0 curve, but the large number of points may still slow rendering.Source: E Ablation Study · p. 14
- Figure 2 presents feature statistics for SNLI and debiased SNLI (Seq-Z).Source: Figure 2 · p. 15
F Generated Samples of Debiased Dataset
Tables 14 and 15 show generated samples in the debiased SNLI and MNLI datasets, respectively; the samples are described as diverse and reasonably good in quality.
- Generated samples in the debiased SNLI and MNLI datasets are described as diverse and reasonably good in quality.The paper presents these samples as demonstrating the effectiveness of the quality-ensuring techniques in Section 2.2.Source: F Generated Samples of Debiased Dataset · p. 15
- Table 14 presents generated samples in the debiased SNLI dataset.Source: Table 14 · p. 16
- Table 15 presents generated samples in the debiased MNLI dataset.Source: Table 15 · p. 17