---
title: "An Empirical Study on Robustness to Spurious Correlations using"
description: "An empirical study of when pretraining and multitask learning help sentence-pair classifiers overcome misleading word overlap."
canonical: "https://research.elamur.ai/free/en/papers/tu-2020-empirical-study-robustness-spurious-correlations/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/tu-2020-empirical-study-robustness-spurious-correlations/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Models

# An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Models

Paper · 2020 · Lifu Tu, Garima Lalwani, Spandana Gella et al.

**Authors:** [Lifu Tu](https://md.research.elamur.ai/free/en/authors/lifu-tu/), [Garima Lalwani](https://md.research.elamur.ai/free/en/authors/garima-lalwani/), [Spandana Gella](https://md.research.elamur.ai/free/en/authors/spandana-gella/) and [He He](https://md.research.elamur.ai/free/en/authors/he-he/) · **Year:** 2020 · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2020.tacl-1.40/)
- [PDF](https://aclanthology.org/2020.tacl-1.40.pdf)
- [DOI 10.1162/tacl_a_00335](https://doi.org/10.1162/tacl_a_00335)
- [arXiv 2007.06778](https://arxiv.org/abs/2007.06778)

## Summary

Two sentences can share almost all their words and still describe different things. A classifier trained to compare sentences may miss that distinction if word overlap usually points to the correct answer in its training data. This paper asks why [pretraining](https://md.research.elamur.ai/free/en/topics/language-models/) sometimes helps a classifier avoid that mistake. The authors study natural language inference, where the question is whether a premise supports a hypothesis, and paraphrase identification, where the question is whether two sentences mean the same thing. They train on MultiNLI and Quora Question Pairs and evaluate on both ordinary development examples and challenge sets designed to expose shortcuts based on shared words.

Pretraining gives a clear advantage on HANS, the challenge set for inference, and only a marginal advantage on PAWS QQP, the challenge set for paraphrase identification. The authors trace the difference to exceptions already present in the supervised training data. MultiNLI contains 727 non-entailment examples in which every hypothesis word occurs in the premise. Quora Question Pairs contains 247 non-paraphrase pairs with the same bag of words. When the authors remove high-overlap non-entailment examples from MultiNLI, HANS accuracy falls much more than it does after an equally large random deletion. With enough targeted removal, most pretrained classifiers approach the performance of the randomly initialized baseline. Direct training on the challenge sets also shows that HANS patterns can be learned with fewer examples than the distinctions tested by PAWS QQP.

The length of [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) matters because the aggregate development score and the score on rare exceptions improve on different schedules. For BERT BASE, ordinary development accuracy levels off around epoch 3, while challenge accuracy continues to rise until around epoch 10. A separate analysis of high-overlap non-entailments inside MultiNLI shows why the aggregate score offers a poor guide to this improvement. Accuracy on that subset keeps rising after average accuracy has largely settled. Larger classifiers and the RoBERTa checkpoints pretrained on more text also improve HANS accuracy in the comparisons reported.

For the scarce and harder-to-learn exceptions in Quora Question Pairs, the authors train a shared encoder on the target data and related auxiliary datasets. This multitask approach improves PAWS QQP accuracy across the pretrained classifiers tested while preserving ordinary development accuracy. Much of the challenge-set benefit disappears when the authors remove the exceptions from the target data. Removing comparable exceptions from the auxiliary data has an effect similar to random removal. The experiments therefore connect the observed robustness gains to a specific kind of data coverage. Pretraining and auxiliary supervision help a classifier learn from exceptions it encounters during task training, and the usefulness of that help depends on how well those exceptions represent the challenge.

## Deep dive: An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Models

An empirical study of when pretraining and multitask learning help sentence-pair classifiers overcome misleading word overlap. · about 37 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why shared words are such a tempting signal

A sentence-pair classification task gives the system a pair of texts and asks for a discrete judgment about their relationship. The system has to learn what evidence supports that judgment from labeled examples. If many pairs with overlapping words receive the same label, shared vocabulary offers an easy way to make correct predictions. It can also be legitimate evidence. Sentences that talk about the same things frequently use some of the same words. The difficulty arises when the training data give the system little reason to check how those words are arranged or what roles they play. [Text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/)

In natural language inference, the first sentence is a premise and the second is a hypothesis. Entailment means that the hypothesis follows from the premise. Contradiction means that the premise and hypothesis are incompatible. A neutral hypothesis goes beyond what the premise establishes without necessarily conflicting with it. A hypothesis assembled entirely from words in the premise can still be neutral or contradictory. The words may express a different relation when they are put in a different order. A stretch of the premise may also belong to a larger construction that changes what the whole sentence commits its speaker to.

Paraphrase identification asks whether two sentences convey the same meaning. The shortcut has a similar shape here, although the judgment is different. Inference is directional because the question is what follows from a particular premise. Paraphrase identification is concerned with equivalence. Questions about the same topic can share almost every word while asking about different situations. Swapping the roles associated with two terms can preserve the vocabulary and change what an adequate answer would have to say. This makes even very close word overlap an unreliable substitute for examining the relationship expressed by the sentence. [Semantic similarity](https://md.research.elamur.ai/free/en/concepts/semantic-similarity/)

The paper calls the unreliable association a spurious correlation. A classifier can benefit from it whenever the correlation holds and fail systematically when it breaks. The examples that expose the failure are what the authors call minority examples. Here, “minority” refers to a combination of input properties and a label. High-overlap non-entailments form such a group because the words provide the usual cue for entailment while the label goes the other way. The terminology concerns the frequency of this pattern in the dataset. It gives the authors a way to ask whether average performance conceals a difficulty concentrated in a recognizable part of the data.

#### What a challenge set changes

A conventional development split estimates how well a classifier performs on held-out examples drawn under conditions like those of the training data. The paper refers to this as the in-distribution or independent and identically distributed setting, abbreviated i.i.d. A split of this kind serves an important purpose. It can reveal whether training has yielded a system that works beyond the examples used to fit it. It can also continue to reward reliance on the same easy signal if the relationship between the cue and the label persists in both parts of the dataset.

A challenge set changes the relationship between the cue and the answer on purpose. It places greater emphasis on examples for which the familiar signal is unhelpful, including examples constructed so that relying on it gives the wrong prediction. The authors use “robust accuracy” for accuracy on these challenge sets. The terminology is specific to their evaluation. HANS and PAWS QQP put pressure on identifiable ways of solving a sentence-pair task, so their results help identify where a classifier fails when the usual distribution changes. Testing both kinds of data lets the authors see whether a change helps on the difficult examples while retaining performance under the ordinary evaluation. [Evaluation and benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/)

Earlier work described in the paper had already found that strong performance on natural language inference benchmarks could coexist with reliance on cues that were inadequate for inference. The HANS work focused on syntactic heuristics, including lexical overlap. The PAWS work identified a related problem in paraphrase data. Other investigations traced predictable labels to artifacts introduced during dataset construction. These lines of work made a high aggregate score harder to interpret as evidence of broad language understanding. The training and development examples can share enough regularities for a superficial decision rule to do well on both. [Annotation Artifacts in Natural Language Inference Data](https://md.research.elamur.ai/free/en/papers/gururangan-2018-annotation-artifacts-natural-language-inference/)

There are related terms for this problem because different investigations emphasize different parts of it. Work on annotation artifacts asks how the collection procedure leaves clues that predictors can exploit. Research on dataset bias asks how such cues affect predictions and how they can be discouraged. The group-shift framing draws attention to examples with a common pattern and to the effects of changing how prominent that pattern is at evaluation. The paper works with the latter idea when it studies rare counterexamples. A feature that matters little to overall accuracy while a group is small can matter a great deal on a test set that deliberately emphasizes that group.

#### Why the benefit of pretraining needed explaining

The paper describes several existing approaches for weakening a shortcut. Some identify a known bias and give the training procedure a way to focus on examples that resist it. A bias-aware ensemble is one example of this approach. The authors note that methods built around known shortcuts can rely on substantial prior knowledge. They also describe a practical tradeoff in earlier work. An intervention can help when the test set breaks the dominant correlation and cost accuracy when that correlation continues to hold. A comparison on the challenge set alone would miss that cost. [Don't Take the Easy Way Out](https://md.research.elamur.ai/free/en/papers/clark-2019-don-t-take-easy-way/)

Data augmentation addresses the problem by changing the examples available for learning. Earlier HANS and PAWS studies reported that adding challenge examples to training could improve challenge accuracy. The paper also describes syntactic augmentation for inference, counterfactual augmentation that changes parts of an input relevant to its label, and recombination of data to teach compositional patterns. These approaches can supply direct evidence about what makes the answer change. Their usefulness depends on identifying the kind of evidence to generate and supplying enough appropriate variation. [Syntactic Data Augmentation Increases Robustness to Inference Heuristics](https://md.research.elamur.ai/free/en/papers/min-2020-syntactic-data-augmentation-increases-robustness/) · [Data Recombination for Neural Semantic Parsing](https://md.research.elamur.ai/free/en/papers/jia-2016-data-recombination-neural-semantic-parsing/)

Self-supervised pretraining raised a different possibility. It starts with supervision derived from text itself, before adding labeled data for the target task. Earlier work discussed in the paper found robustness benefits in settings involving label noise, class imbalance and detection of out-of-distribution inputs. The appeal for sentence-pair classification was that large amounts of generic text might improve subsequent robustness without tailoring pretraining to a known overlap shortcut or giving up accuracy on ordinary examples. The open question was what a pretrained starting point allowed the classifier to do when it encountered biased supervision. [Pretrained Transformers Improve Out-of-Distribution Robustness](https://md.research.elamur.ai/free/en/papers/hendrycks-2020-pretrained-transformers-improve-out-distribution/)

One possibility was that pretraining supplied enough knowledge of language to handle a class of difficult examples even when task training offered little evidence about their labels. Another was that pretraining made the system better at using task-specific evidence that was already there, but was easy to overlook because it occurred infrequently. The distinction matters for data collection. The first account places the emphasis on what the system brings to the task. The second also places it on which combinations of features and labels the supervised data allow it to see. Challenge accuracy alone gives limited leverage on this question. The authors therefore change the supply of relevant examples and watch how the advantage responds.

A related question concerns what can be gained from data that arrive with labels for another task. The paper situates this option in transfer learning, where experience on one source is used to help predictions on a related target. Earlier work on selecting and reweighting source examples suggested that resemblance to target data can matter for successful transfer. Multitask learning offered a way to study transfer while maintaining supervision from the target dataset throughout training. The authors ask whether a common representation learned from several sources can make sparse target evidence more useful. [Learning to Select Data for Transfer Learning with Bayesian Optimization](https://md.research.elamur.ai/free/en/papers/ruder-2017-learning-select-data-transfer-learning/) · [An Overview of Multi-Task Learning in Deep Neural Networks](https://md.research.elamur.ai/free/en/papers/ruder-2017-overview-multi-task-learning-deep/)

### The method, step by step

#### Start with ordinary training and a targeted evaluation

The study puts the training data and the challenge data in different roles. At the start, the classifiers learn their task from an ordinary labeled benchmark. They are then evaluated on that benchmark’s development split and on the associated challenge set. The same training run can therefore give two readings. One concerns held-out examples under the usual benchmark conditions. The other concerns held-out examples chosen to weaken a particular predictive cue. The authors keep these readings separate so that a gain on one distribution cannot hide a loss on the other.

For inference, the training benchmark is MultiNLI, or MNLI. It uses the crowdsourcing protocol of its predecessor SNLI and includes material from more domains. The ordinary comparison is on the MNLI matched development split, abbreviated MNLI-m. The challenge evaluation is HANS, whose authors use syntactic templates to construct examples that test lexical overlap, subsequence and constituent heuristics. The labels relevant to the challenge distinguish entailment from non-entailment. This groups together the cases in which the hypothesis does not follow, whether the premise conflicts with it or simply leaves it open. [MultiNLI](https://md.research.elamur.ai/free/en/papers/williams-2018-broad-coverage-challenge-corpus-sentence/) · [SNLI](https://md.research.elamur.ai/free/en/papers/bowman-2015-large-annotated-corpus-learning-natural/)

The HANS categories describe related ways of confusing surface form with support. Lexical overlap concerns whether the words of the hypothesis are present in the premise. A subsequence has an additional property involving the order and adjacency of those words. A constituent is a unit in a sentence’s grammatical structure. The motivation for separating these conditions is that recognizing shared vocabulary, seeing an intact string of words and identifying a grammatical phrase each provides a different kind of evidence. A whole premise can still fail to entail a hypothesis built from any of them. [Syntax and grammar](https://md.research.elamur.ai/free/en/topics/syntax-grammar/)

For paraphrase identification, the ordinary benchmark is Quora Question Pairs, abbreviated QQP. The challenge split used for the main evaluation is the QQP-derived portion of PAWS, written here as PAWS QQP. The PAWS authors use word swaps and back-translation to construct high-overlap pairs. Human inspection is part of the process the paper discusses for swapped examples. A separate PAWS collection uses sentences from Wikipedia. The distinction matters because the paper’s results for PAWS QQP concern the collection derived from question pairs. [PAWS](https://md.research.elamur.ai/free/en/papers/zhang-2019-paws-paraphrase-adversaries-word-scrambling/) · [Machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/)

One example in the paper makes the role of word order concrete. One question asks which things are considered classy when a person is poor and trashy when a person is rich. Its counterpart attaches those judgments to the opposite wealth conditions. The two questions retain the same inventory of words. Their answers would have to address different contrasts because the terms switch roles. A system that counts words can record the similarity accurately and still miss the change that determines the paraphrase label.

#### Compare starting points under the same fine-tuning procedure

The authors use BERT BASE with 110M parameters and BERT LARGE with 340M parameters. Their pretrained checkpoints were trained on 16GB of text. They also use RoBERTa BASE and RoBERTa LARGE, which the paper describes as sharing BERT’s architecture and having been pretrained on about 160GB of text. These comparisons allow the authors to examine breadth of pretraining and size of the network alongside the basic question of whether a pretrained initialization helps. GluonNLP supplies the implementations used for these experiments. [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/) · [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/)

The BERT BASE comparison includes a randomly initialized counterpart, called BERT scratch. An initialization is the set of parameter values from which training starts. For BERT scratch, the supervised dataset has to support learning the encoder as well as the decision layer. For the pretrained alternatives, the encoder already has parameter values learned from text and is adapted to the labeled task. The authors initialize the final classification layer of the pretrained systems, and the weights of BERT scratch, using a normal distribution with mean zero and variance 0.02. A classifier layer converts the shared representation of a sentence pair into scores for the task’s candidate labels.

The authors run single-task fine-tuning for 20 epochs. An epoch is a pass through the task training data. They choose the checkpoint using the ordinary development split. They optimize with Adam, setting the learning rate to 2e-5 and the L2 weight decay to zero.01. The learning rate controls the size of the updates proposed by the optimizer. Weight decay discourages large parameter values. Each small group of training examples processed together is a mini-batch. The batch size is 32 for the base variants and 16 for the large variants.

Runs are repeated with 5 random seeds. A seed fixes the starting state for the random choices in a run, which makes repetitions with different seeds informative about sensitivity to those choices. The authors report average performance and use standard deviations where they give dispersion across runs. Their code accompanies the study in the repository named Study-NLP-Robustness.

#### Measure and vary the supply of exceptions

The authors identify high-overlap examples in MNLI by looking from the hypothesis back to the premise. The measure asks how much of the hypothesis vocabulary is present in the premise. A compact expression for this verbal definition is:

```
O(p, h) = M(p, h) / N(h)
```

Here, `p` is the premise and `h` is the hypothesis. `N(h)` is the number of words in the hypothesis. `M(p, h)` counts the hypothesis words that occur in the premise. `O(p, h)` is the resulting fraction, which the paper expresses as a percentage. The slash denotes division. Extra words in the premise can leave the score unchanged because the denominator counts words on the hypothesis side. The direction matters when a short hypothesis is assembled from a longer premise.

To intervene on the training distribution, the authors take MNLI examples labeled contradiction or neutral and rank them by overlap. They then remove progressively more examples from the high-overlap end of the ranking. In control runs they remove the same number of training examples, sampled uniformly at random. Both operations shrink the training data. Targeting the high-overlap non-entailments has the additional effect of selectively withdrawing evidence that shared words can occur with a non-entailment label. The HANS comparison asks whether that difference in the content of the discarded examples matters.

The paper also uses a broader subset of MNLI for tracking what happens during training. It groups together non-entailment examples with at least 80% overlap and plots their losses and accuracies separately from the corresponding quantities over the full data. This threshold makes the training diagnostic distinct from the count of examples with complete overlap. The epoch-by-epoch view allows the authors to compare progress on the difficult subset with progress on average, both for training examples and for held-out development examples.

A different data procedure tests how quickly the challenge patterns can be learned when labeled examples are directly available. The authors use 11,990 training examples drawn from PAWS QQP and a random sample of 11,990 examples from HANS. They subsample HANS because it has 30,000 examples in total. Examples outside the resulting training portions are used for development or testing. They vary the amount of challenge supervision and plot the corresponding accuracy, producing learning curves. Matching the available training counts helps distinguish a difference in the rate of learning from a simple difference in the number of challenge examples initially available.

The authors then compare characteristics of the sentence pairs themselves. They use the Stanford CoreNLP constituency parser to obtain grammatical trees for both members of a pair. Tree height measures the depth of the parsed structure. For each pair, the authors take the longer sentence’s word count as the length measure and the taller of the two parses as the height measure. These maxima make the analysis sensitive to a pair in which one sentence contains the harder structure. They compare the datasets on those measures and examine how PAWS QQP accuracy varies with length and height. [Parsing](https://md.research.elamur.ai/free/en/concepts/parsing/)

#### Add auxiliary data through a shared encoder

In the multitask experiments, one labeled dataset remains the target. It supplies the prediction problem whose development and challenge accuracies are evaluated. Other datasets are auxiliary. They contribute training signals through their own labels. An auxiliary dataset can share the target task, as SNLI does with MNLI, or supply another kind of sentence-pair judgment, as QQP does in relation to MNLI. The authors choose inference and paraphrase data because both ask the classifier to compare what two sentences mean.

The architecture shares the pretrained encoder across datasets and gives each dataset a separate linear classification layer. Each head, as such a layer is often called, makes predictions in the label space of its own dataset. An inference head can learn the distinction among entailment, contradiction and neutral, while a paraphrase head can learn the paraphrase decision. Updating the shared encoder on either dataset can change the representations available to both heads. This is how supervision from an auxiliary dataset can affect performance on the target.

The paper describes the objective as a weighted sum of average losses. In notation, that description is:

```
J = Σd∈D w_d ℓ̄_d
```

Here, `J` is the joint training objective, `D` is the collection of participating datasets, and `d` identifies a dataset in that collection. `Σd∈D` means to sum over those datasets. `ℓ̄_d` is the average prediction loss for dataset `d`, and `w_d` is its weight. The multiplication of a weight by its corresponding loss is implicit in the juxtaposition. The authors set each weight to 1 and describe their sampling setup as giving datasets representation proportional to their size.

Training proceeds through mini-batches sampled sequentially from the datasets. The operation uses the single-task optimization settings apart from the smaller batches needed for memory. The target contributes a mini-batch of 16. The size of each auxiliary mini-batch scales with the size of its dataset and is capped at 16 examples, while each full batch contains no more than 32 examples. With this arrangement, a batch contributes target supervision and the selected auxiliary supervision while each dataset retains its own prediction layer.

Both ordinary benchmark datasets and challenge datasets serve as possible auxiliaries. They represent different reasons for expecting transfer. An ordinary benchmark supplies many comparisons between sentences and may provide useful general supervision. A challenge dataset supplies concentrated evidence about particular ways surface similarity can be misleading. The authors compare the auxiliary sources and run targeted deletion experiments to see whether the improvement requires exceptions from the target, exceptions from an auxiliary source, or both. For MNLI they leave out smaller potential auxiliaries such as STS-B, whose size they give as 3.7k, and the corpus of sentential paraphrases, whose size they give as 7k. [SemEval Semantic Textual Similarity](https://md.research.elamur.ai/free/en/papers/cer-2017-semeval-2017-task-1-semantic/) · [Automatically Constructing a Corpus of Sentential Paraphrases](https://md.research.elamur.ai/free/en/papers/dolan-2005-automatically-constructing-corpus-sentential-paraphrases/)

How the study tests and improves shortcut robustness The steps in order.

### Experiments and results

#### A stronger baseline helps most on HANS

The standard training benchmarks are large. The paper describes MNLI and QQP as having around 400k examples each. The primary metric is accuracy, the share of examples assigned the correct label. For inference, the authors pair ordinary accuracy on MNLI-m with robust accuracy on HANS. For paraphrase identification, they pair QQP development accuracy with robust accuracy on PAWS QQP. The named splits matter because the same word, “accuracy,” describes success under different distributions. The study uses the ordinary scores to track whether a robustness gain comes at a cost under familiar conditions.

The comparisons include BERT scratch as the baseline for learning without pretraining, the pretrained BERT variants for comparisons within that family, and their RoBERTa counterparts for comparisons involving the checkpoints trained on more text. The paper also places some results from earlier work beside its own runs. Those comparisons provide context for the extended training schedule. The random initialization control and the measurements after each epoch give the authors comparisons under their own experimental procedure.

Pretrained initialization improves ordinary benchmark performance. Its benefit on the challenge sets is uneven. HANS responds clearly to pretraining, with further gains in the comparisons involving larger variants or RoBERTa. The paper describes those HANS gains as 5 to 10 accuracy points for the larger-size and more-pretraining-data comparisons. PAWS QQP shows only a marginal benefit from the analogous changes. That difference motivates the later examination of how much evidence for each kind of exception is available and how readily each pattern can be learned.

The size comparisons also illustrate the importance of the evaluation split. The authors note that RoBERTa LARGE can score below RoBERTa BASE on ordinary evaluation and point to high variance as part of the explanation. The same paper reports strong HANS performance for RoBERTa LARGE. Results depend on which variants are compared and on the part of the target problem emphasized by the test set. A score from the matched development data and a score from a shortcut-focused challenge answer different performance questions even when both are produced by the same checkpoint.

#### Ordinary development accuracy settles early

The authors track BERT BASE after each epoch of fine-tuning. The MNLI and QQP development curves level off around epoch 3. On the corresponding HANS and PAWS QQP evaluations, accuracy keeps improving until around epoch 10. The authors describe the continuing increase on the challenge data as more than 30% improvement. That is the paper’s characterization of the change during fine-tuning on the challenge evaluations, where it is more informative to watch the trajectory than to rely on a single ordinary development score.

This experiment matters because typical fine-tuning practice in the paper’s account uses three to four epochs when ordinary accuracy is the objective. By that point, the training procedure can have made most of the progress that the conventional development split will reveal. Continuing the run gives the classifier more opportunities to fit difficult parts of the training distribution. For a practitioner comparing checkpoints, this creates a practical gap. The standard development score can become almost indifferent among checkpoints that differ meaningfully on the challenge set. The authors’ separate tracking of rare MNLI examples investigates what changes during that period.

The experiment uses challenge scores to examine the training trajectory. The main single-task procedure still chooses checkpoints with ordinary development data. Distinguishing those roles is important when interpreting the improvement. The study can document that challenge accuracy continues to rise and that conventional checkpoint selection may fail to surface this progress. A diagnostic curve that reveals the difference does not by itself supply a new selection procedure that would work when challenge labels are unavailable.

#### Joint training has its clearest benefit on PAWS QQP

In the multitask comparison, the baseline is single-task learning, abbreviated STL. It adapts the pretrained encoder to the target dataset alone. Multitask learning, abbreviated MTL, adds auxiliary supervision while preserving the target’s own prediction layer. The authors check both the ordinary and challenging evaluations to see whether joint training helps where counterexamples are difficult without losing standard benchmark accuracy.

With BERT BASE as the starting point, multitask learning improves HANS accuracy significantly. The gain is smaller for RoBERTa BASE, where the authors do not find a significant improvement on HANS. They run an additional check with RoBERTa LARGE. On the HANS challenge set, single-task training gives mean accuracy of 77.1, with standard deviation 1.6 across runs. Joint training gives mean accuracy of 75.7, with standard deviation 2.1. The authors describe the two results as similar. This is a case in which adding supervision from related data does not provide the improvement seen for BERT BASE.

RoBERTa LARGE single-task and multitask accuracy on HANS Single-task training has the higher mean in this comparison.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Single-task training (this paper) | 77.1 |
| Multitask training | 75.7 |

On PAWS QQP, the authors report large improvements from multitask learning across the pretrained classifiers tested. Ordinary development performance holds up in the joint-training comparisons. This is the setting where pretraining on its own had yielded only marginal challenge gains. The juxtaposition is informative because it distinguishes the starting representation from the supervision used to adapt it. The pretrained encoder in the single-task condition sees the same target benchmark, and the joint condition gives its shared parameters additional labeled comparisons between sentences. The deletion experiments then ask which part of the target data allows this extra supervision to pay off.

The main STL and MTL comparisons use t-tests on mean accuracies from the repeated runs. The paper flags differences using the following threshold:

```
p < 0.001
```

Here, `p` is the p-value returned by the test and `<` means “is less than.” The numerical threshold is `0.001`. The same threshold is used when the authors mark differences between targeted and random deletion in the multitask ablation. The mean reports typical performance across the runs, the standard deviation describes their spread, and the test is the authors’ rule for identifying a difference they treat as statistically significant.

### What the ablations show

#### Removing rare exceptions takes away much of the HANS advantage

The central removal experiment changes which MNLI examples are available during training. The authors first establish that the relevant pattern has some support in that dataset. MNLI contains 727 non-entailment examples with complete hypothesis-to-premise overlap. An entailment shortcut based on shared words would fail on every example in that group. QQP contains 247 non-paraphrase pairs with the same bag of words. A bag of words records the words present without using their order to represent the sentence. These counts establish a starting point for asking whether the challenge examples are wholly foreign to supervised training or rare instances of distinctions the ordinary benchmark already contains.

The MNLI removal experiment targets a ranked set of high-overlap non-entailments. Across the systems tested, HANS accuracy falls as more such examples are taken away. Removing the same quantity at random largely preserves the original HANS accuracy. At the reported 6.4% targeted-removal setting, most pretrained classifiers perform near random on HANS and approach the randomly initialized baseline. RoBERTa LARGE appears somewhat more resistant as this intervention makes the training distribution more imbalanced.

The random-deletion control is crucial to the interpretation. If both versions of deletion had led to a comparable drop, a reduction in training set size would have been a plausible explanation. The difference between the curves instead ties the decline to the kind of evidence that is discarded. Specifically, the target data no longer give the classifier as many occasions to see shared words paired with a non-entailment label. A classifier that previously benefited from pretraining now has less supervised evidence for when to override the easy cue.

The paper interprets the original HANS gain as better generalization from a minority group. From the standpoint of the whole benchmark, HANS changes the distribution. From the standpoint of the group, the task still resembles something the classifier has seen in training. That helps explain how an out-of-distribution evaluation can improve through better learning of examples inside the target training set. The unusual feature of the test is partly how strongly it emphasizes those cases. A group that has little weight in ordinary accuracy can dominate the difficulty of an evaluation designed around it.

The ablation also gives a way to interpret the residual performance of the larger pretrained system without treating it as proof of a separate mechanism. Its slower deterioration suggests that size and the pretrained starting point may affect how much evidence is required. The intervention changes the degree of imbalance by removing a ranked group of examples. It provides evidence of different sensitivity to that change. It does not identify a sharp boundary at which every related construction disappears from the surviving data.

#### The two challenge sets differ in how readily their patterns can be learned

The authors examine direct learning curves because counting minority examples leaves an important question open. A small group may be enough if its examples exhibit a regular pattern with few variations. A larger group can still be insufficient if each example supplies information about only a small part of a more varied phenomenon. This is the sense in which the authors use sample complexity. The question is how much labeled evidence is needed to achieve reliable performance on a family of examples.

HANS is generated using a limited collection of templates. PAWS includes pairs generated by swapping words and checking the resulting sentences. The swapping operation can produce pairs where the text changes very little but the interpretation changes in a way that depends on syntax. For example, the pair about wealth and judgments requires tracking which condition applies to each judgment. This distinction can be hard to learn from a few examples because the relevant role reversal need not look the same across different sentences. HANS templates provide a more regular source of recurring patterns within the evaluated collection.

In the direct-supervision comparison, the classifiers quickly reach 100% accuracy on the HANS evaluation portions. With PAWS QQP, accuracy increases more slowly, and the classifiers struggle to reach around 90% on the evaluation data even with the full training portion available for the learning curve. These are results from training directly on the challenge distributions. They answer how readily the classifiers can learn the challenge patterns once those patterns are represented in the training data. The ordinary MNLI-to-HANS and QQP-to-PAWS QQP experiments ask how well the classifiers transfer from the more uneven supervision of the benchmark datasets.

The structural comparison supports the authors’ account of the difference in difficulty. For PAWS QQP, the average pairwise maximum length is 20.7 words and the average maximum parse height is 11.4. For HANS, the corresponding averages are 9.2 words and 7.5. Taking the maximum within a pair means that the statistic follows the longer or more deeply nested member, even when the other member is simpler. For BERT BASE and RoBERTa BASE, accuracy on PAWS QQP declines as sentence length and parse-tree height increase.

The learning curves and the structural comparisons have complementary roles. The learning curves show a difference in how quickly accuracy rises when the amount of labeled challenge training grows. Length and tree height suggest properties of the examples that may help explain that difference. Together with the counts in the ordinary training sets, they make it plausible that QQP offers sparse evidence for a task that needs comparatively extensive supervision. The structural observations are correlations. They do not isolate what would happen if the authors could change a sentence’s length while holding its grammatical demands and paraphrase relationship fixed.

#### The rare group keeps improving after the average levels off

The training-duration analysis looks inside MNLI, using BERT BASE. The authors track the average loss and accuracy for all training and development examples and for the non-entailment subset with at least 80% overlap. A loss measures how strongly a prediction disagrees with its label under the training objective. Accuracy records whether the selected label is correct. At a particular epoch, a classifier can have the right top prediction on an example while its loss still leaves room for change.

Training loss on the minority subset declines more slowly than the full-data average and takes more than 15 epochs to approach zero. On held-out MNLI development examples, accuracy for the minority subset levels off around epoch 10. The full development average in this analysis stops visibly improving around epoch 5. These timings come from the subgroup analysis, whereas the observation about epoch 3 comes from the earlier comparison of ordinary and challenge curves for both tasks. The common result is that the average settles earlier than the measurements that emphasize exceptions.

The development result is especially important for the paper’s argument. If the authors had observed only a later decrease in training loss, the change could have reflected a better fit to the particular minority examples seen during training. The improvement in minority development accuracy indicates that other examples with the same broad pattern are also benefiting. This connects the training trajectory to HANS. A classifier fine-tuned for longer has acquired a better basis for judging high-overlap cases even when the aggregate MNLI development score gives little indication of further progress.

The authors report that average development accuracy stays almost constant while development loss rises. They suggest that changing confidence can account for the divergence because loss responds to the scores assigned to labels and accuracy depends on which label comes first. Their observation about overfitting is based on the accuracy curves. It provides a reason to distinguish correct classification from the quality of the confidence assigned to those classifications. The paper also relates the effect of longer fine-tuning to concurrent work on learning with few supervised examples. [Revisiting Few-sample BERT Fine-tuning](https://md.research.elamur.ai/free/en/papers/zhang-2020-revisiting-few-sample-bert-fine/)

#### The HANS categories reveal where the gains occur

An aggregate HANS score combines examples built to test lexical overlap, subsequence and constituent heuristics. Splitting the score by category shows whether a gain is dispersed across those conditions or concentrated in one. The paper finds that both joint training and the move to RoBERTa BASE deliver their largest gains in the lexical-overlap category. It also reports that 85% of the 727 fully overlapping non-entailment examples counted in MNLI belong to that category.

The authors interpret the category results in terms of coverage. If lexical overlap accounts for most of the relevant training examples, it is the category in which a capability to learn better from scarce exceptions has the most material to work with. A change can therefore improve the HANS average substantially through that category while doing less for subsequence and constituent cases. This refines the removal result. There is an imbalance between the dominant pattern and its counterexamples, and there is a further imbalance among the patterns represented by the counterexamples themselves.

The category comparison also helps put the limited extra HANS benefit from joint training with RoBERTa in context. The authors suggest that RoBERTa may already generalize well enough from the available MNLI exceptions for the additional auxiliary data to yield little improvement. The concentration of gains in lexical overlap is consistent with there being more opportunity to improve where target evidence is plentiful enough to support learning. The explanation remains a hypothesis about these runs. The category comparison and the aggregate score alone cannot determine whether the remaining errors are due to weak coverage, a mismatch in the auxiliary data or another property of the training procedure.

#### The target exceptions matter more than matching exceptions in the auxiliary data

The auxiliary-dataset ablations first remove whole sources, one at a time, from joint training. For MNLI and QQP as targets with BERT BASE, omitting a source has little effect on ordinary development accuracy. The challenge-set response varies with the source omitted. The authors find that auxiliary challenge datasets are not consistently much more helpful than ordinary benchmark auxiliaries. That comparison weakens the explanation that joint training works mainly by importing a concentrated set of examples that directly teach the target shortcut’s exceptions.

To test the mechanism more directly, the authors focus on paraphrase identification, where the multitask gain is largest. QQP is the target, MNLI is the auxiliary dataset under examination, and PAWS QQP provides the challenge evaluation. One intervention removes fully overlapping non-entailment examples from MNLI. Another removes fully overlapping non-paraphrase examples from QQP. Random-deletion controls withdraw the same number of examples from whichever source is being altered. This makes it possible to compare the effect of removing rare evidence from each source while controlling for the loss in training volume.

For MNLI, the ablation removes 727 non-entailments with 100% overlap. For QQP, the ablation removes 228 non-paraphrases with 100% overlap. The paper separately reports 247 when counting same-bag-of-words non-paraphrases in QQP. The latter describes the earlier dataset inventory, while 228 is the count associated with the specified deletion experiment. The paper gives both counts without explaining their relationship in detail, so each is best read with its stated definition and experimental role.

When the authors withdraw the QQP exceptions, joint training retains only a marginal advantage over single-task training on PAWS QQP. Removing the MNLI exceptions has a much smaller effect and behaves similarly to deleting randomly selected MNLI examples. A useful way to read that asymmetry is to ask which data tell the classifier what the difficult examples mean for the target label. An inference example can help train a representation of how two sentences differ. The QQP exceptions connect differences of that kind to the decision about whether two questions are paraphrases.

The authors’ interpretation is that the shared encoder makes the target exceptions more useful. More supervision can improve the representation that is fitted to those examples, and the target examples still supply the crucial evidence for the paraphrase decision. The experiment supports this interpretation more directly than an accuracy comparison between STL and MTL alone, because it changes the availability of the proposed source of the gain. It also leaves room for auxiliary examples other than the fully overlapping non-entailments to contribute to the shared representation.

### Limitations

#### Limits stated by the authors

The authors limit their main claim to robustness gains that depend on coverage in the supervised data. In their setting, removing exceptions largely removes the gains that prompted the investigation. They describe pretraining and multitask learning as helping classifiers generalize from rare patterns. They treat extrapolation to unseen patterns as a separate problem and suggest that it may require a different learning algorithm or additional inductive bias. An inductive bias is a preference built into a learning system that helps it choose among explanations compatible with its training examples. [Invariant Risk Minimization](https://md.research.elamur.ai/free/en/papers/arjovsky-2019-invariant-risk-minimization/)

The authors also caution against treating a challenge set as a comprehensive test of out-of-distribution generalization. HANS and PAWS use different construction methods and cover particular distribution shifts. Their differing results are part of the reason for that caution. A classifier that handles the exceptions in a synthetically generated inference challenge may face a different problem when it must interpret varied questions changed by word swapping. Broad claims about robustness would require evaluation over a wider range of shifts than those represented by either collection.

The study leaves questions about optimization open. The authors ask why the pretrained classifiers can continue learning from minority examples without an apparent loss of minority development accuracy in the observed runs. They also ask how parameter values inherited from different checkpoints affect subsequent optimization and generalization. Their procedures document when learning occurs and how it responds to removal. The curves and ablations leave the internal changes that produce the behavior unresolved.

The paper identifies data diversity as a promising direction, including through improved crowdsourcing protocols and human-in-the-loop augmentation. The authors also recognize a practical problem for augmentation. The amount of supervision needed depends on the pattern. An intervention that supplies enough examples for a compact family of templates may be too small to cover a collection with more varied constructions. The controlled learning curves illustrate this problem for the two challenges, while leaving the appropriate scale of an augmentation effort for other phenomena open.

#### Limits that follow from the experimental setup

The comparison between BERT and RoBERTa is informative about the checkpoints tested. It is weaker evidence for the isolated effect of pretraining corpus volume. The paper describes architectures held in common and a large difference in the amount of text, but the comparison uses existing checkpoints from different pretraining setups. A controlled estimate of the contribution of text volume would require varying it while holding the rest of the pretraining procedure fixed. The BERT BASE comparison with random initialization is more direct for testing the contribution of having a pretrained starting point under the chosen fine-tuning recipe.

Similarly, the deletion procedure tests a particular operational definition of a minority example. In the MNLI experiment, the definition uses label and measured word overlap. The random baseline controls the amount of data removed, but deleting examples ranked by these properties can change other aspects of the surviving data at the same time. High-overlap non-entailments can share syntactic constructions for reasons that extend beyond the overlap score. The drop in HANS accuracy supports the importance of the group as defined. It provides less direct evidence about which grammatical distinctions inside the group drive the effect.

The evidence for differences in sample complexity is strong for the evaluation splits constructed in the paper, with a qualification about what comparing them can establish. Training on HANS and testing on held-out HANS examples can allow a classifier to encounter recurring patterns from a dataset built with templates. High accuracy in this setting demonstrates that the supervised task is learnable under that split. It does not establish that the classifier would generalize equally well to a separately constructed collection of unseen inference structures. Similarly, the slower PAWS QQP curve establishes a difference for these data and training conditions. It leaves open how much of that difference comes from grammatical variety, the particular decision required or other differences between the collections.

Word count and parse depth also give limited descriptions of difficulty. The measurements use the larger value from a pair, which is appropriate for asking whether a long or deeply structured sentence can make the pair harder. They do not identify which part of the sentence a classifier misinterpreted. The association between lower accuracy and these measurements could arise because long sentences contain more opportunities for structural ambiguity or because length and parse height accompany other features of the examples. The paper uses these measurements to motivate an explanation, and its design supports that role.

There is also an asymmetry in how the paper tests the proposed mechanism. The main pretraining ablation deletes rare exceptions from MNLI and evaluates HANS. The most direct target-versus-auxiliary multitask ablation uses QQP as the target and PAWS QQP as the challenge. These are complementary tests, and both support the relevance of target counterexamples. Their combination is less direct evidence for how every pretrained variant and every auxiliary dataset would behave under the same ablation on both tasks. The HANS category results already show why that qualification matters. The available examples and the benefits of an intervention are uneven across closely related heuristics.

Finally, preserving ordinary development accuracy is a claim about the aggregate scores the authors measure. It leaves room for individual cases or smaller groups to change in either direction. The early plateau in that metric shows why this matters for checkpoint selection. Once the average settles, multiple checkpoints can appear similarly good while their errors on rare patterns continue to change. The authors demonstrate this limitation of the usual selection criterion. They leave the design and validation of a more informative criterion open.

### What came after

Several later works cite the study while pursuing distinct parts of the robustness problem. The strongest continuity is in inference research that asks whether a successful prediction survives a change to the cues available in training. Other works place that question within dataset construction, robustness evaluation or the broader study of generalization. Those are different relationships to the paper. A new dataset can make more exceptions available, an analysis can give a more detailed account of a particular shortcut, and a survey can position the result among other ways to measure and improve robustness.

#### Inference heuristics and the evidence used to test them

*Generalization in NLI* returns to the question of how an inference system can move beyond simple heuristics. The connection is close because the earlier study separates ordinary benchmark success from success when a known heuristic fails. It also shows how easily apparent progress can depend on which exceptions the target training set happens to contain. This gives the later paper’s question a concrete form. Evidence for moving beyond a heuristic requires cases where the heuristic and the correct inference come apart, along with attention to the supervised examples that could have taught the difference. [Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics](https://md.research.elamur.ai/free/en/papers/bhargava-2021-generalization-nli-ways-not-go/)

*Looking at the Overlooked* focuses directly on word-overlap bias in natural language inference. In the earlier study, overlap serves as a diagnostic property and as the basis for ranking examples to remove. The later work makes the bias itself the subject of analysis. The continuity is especially clear in the HANS result by category. Similar-looking overlap cases can embody different grammatical problems, and success concentrated in the lexical-overlap category gives a different account of progress from an equal gain across the categories. A closer study of word overlap can investigate that part of the robustness question in its own right. [Looking at the Overlooked](https://md.research.elamur.ai/free/en/papers/rajaee-2022-looking-overlooked-analysis-word-overlap/)

*PECO* investigates single-sentence label leakage in inference datasets through progressive evaluation of cluster outliers. Its subject is a different shortcut. The earlier overlap experiments ask whether a shallow comparison of the two sentences supplies a strong enough label cue. PECO asks about cues available within an individual sentence. This brings the same measurement problem to a different kind of evidence. A benchmark can require two sentences to define the task, while regularities in how labeled data are constructed may still allow accurate predictions from a smaller part of the input. [PECO](https://md.research.elamur.ai/free/en/papers/saxon-2023-peco-examining-single-sentence-label/)

#### Dataset creation and selection

*WANLI* brings worker and AI collaboration to the creation of natural language inference data. This addresses an upstream part of the problem identified by the earlier experiments. Removing naturally occurring counterexamples shows how much inference performance can depend on a small part of the existing dataset. A dataset-creation project addresses the process that determines which examples are present in the first place. The connection concerns the opportunities for collecting varied supervision, including examples that cannot be resolved by a dominant cue. The earlier paper’s training interventions explain why that coverage is worth examining alongside the overall size of a new dataset. [WANLI](https://md.research.elamur.ai/free/en/papers/liu-2022-wanli-worker-ai-collaboration-natural/)

The later work on improving out-of-distribution NLI performance through strategic data selection takes up a related decision under a different setup. Its stated focus is selecting data for closed-source systems. The earlier study highlights data selection by comparing the effects of deleting particular examples and deleting the same amount at random. The later title puts deliberate selection at the center of the intervention. The common question is which examples matter for the behavior under evaluation. The answer can depend on the system and on how selected examples are used, so the connection is the emphasis on the composition of data rather than a shared training protocol. [Improving OOD Performance Through Strategic Data Selection](https://md.research.elamur.ai/free/en/papers/stacey-2026-improving-ood-performance-closed-source/)

#### Broader accounts of robustness and generalization

*Measure and Improve Robustness in NLP* surveys how robustness is evaluated and improved. The earlier study offers an example in which the measurement and the intervention need to be read together. Its challenge sets specify the weak point to be tested, and the training interventions vary the availability of evidence that might correct it. This distinction matters in a survey because “robustness” can refer to several kinds of distribution change, metrics and interventions. The inference and paraphrase experiments give the survey a concrete case of robustness to a spurious correlation in labeled data. [Measure and Improve Robustness in NLP](https://md.research.elamur.ai/free/en/papers/wang-2022-measure-improve-robustness-nlp-models/)

The taxonomy and review of generalization research in NLP takes a wider view of generalization settings. The earlier paper illustrates why the relationship between the training and evaluation sets deserves close description. The challenge sets differ from the ordinary data in how often and how systematically an overlap cue fails. Related exceptions still occur in the supervised training data. A taxonomy can distinguish this kind of reweighting and concentration of a rare pattern from evaluations whose aim is to test a pattern outside the support of task training. That distinction is central to what the removal experiments establish. [State-of-the-art Generalisation Research in NLP](https://md.research.elamur.ai/free/en/papers/hupkes-2022-state-art-generalisation-research-nlp/)

The broader work on the opportunities and risks of foundation models cites the study from a wider perspective on pretraining. The robustness experiments are relevant to that perspective because they examine a benefit often associated with a strong pretrained starting point and trace the benefit to conditions during adaptation. Their controlled removals show why the properties of the downstream dataset matter even when an encoder has already been exposed to substantial amounts of text. This connects the broad promise of pretraining to the narrower question the study can answer. The evidence for handling a particular shortcut depends on which exceptions the downstream task presents and how those exceptions are measured. [On the Opportunities and Risks of Foundation Models](https://md.research.elamur.ai/free/en/papers/bommasani-2021-opportunities-risks-foundation-models/)

## Cite

Cite as Lifu Tu, Garima Lalwani, Spandana Gella and He He. 2020. An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Models.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1162/tacl_a_00335](https://doi.org/10.1162/tacl_a_00335) · [arXiv 2007.06778](https://arxiv.org/abs/2007.06778)

```bibtex
@misc{tu2020empirical,
  title = {{An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Models}},
  author = {Lifu Tu, Garima Lalwani, Spandana Gella and He He},
  year = {2020},
  doi = {10.1162/tacl\_a\_00335},
  eprint = {2007.06778},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1162/tacl_a_00335}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
