Source-linked AI summary

DISCO: Distilling Counterfactuals with Large Language Models

Zeming Chen, Qiyue Gao, Antoine Bosselut, Ashish Sabharwal, Kyle Richardson

arXiv:2212.10534v3cs.CL

TL;DR

High-quality counterfactual data is scarce, and existing ways to produce it face limits in scale or perturbation coverage. DISCO prompts a general LLM to generate premise edits and filters them with a task-specific teacher; on NLI evaluations, its data improves robustness and counterfactual performance over baselines.

  • Problem

    Crowdsourced counterfactual data can be costly and limited in scale and diversity, while supervised generation relies on fixed perturbation types that are expensive to extend.

    Source: §1 · pp. 1–2
  • Method

    DISCO prompts a general LLM to overgenerate perturbations, filters them with a task-specific teacher, and uses the distilled data to train a smaller student.

    Source: §1 · p. 2
  • Results

    6% average improvements over WANLI and SNLI baselines on 7 NLI robustness tests; DISCO data also improves counterfactual accuracy by 8% over SNLI baselines.

    Source: §1 · p. 2
  • Takeaways & Limitations

    DISCO data improves NLI robustness and out-of-distribution generalizability, and is more effective than existing augmentation approaches for counterfactual consistency.

    Source: §1 · p. 2, §6 · p. 9

    Experiments cover English and NLI and use only one generation model, GPT-3.

    Source: §7 · p. 9

Abstract

from arXiv · show

Models trained with counterfactually augmented data learn representations of the causal structure of tasks, enabling robust generalization. However, high-quality counterfactual data is scarce for most tasks and not easily generated at scale. When crowdsourced, such data is typically limited in scale and diversity; when generated using supervised methods, it is computationally expensive to extend to new counterfactual dimensions. In this work, we introduce DISCO (DIStilled COunterfactual Data), a new method for automatically generating high quality counterfactual data at scale. DISCO engineers prompts to generate phrasal perturbations with a large general language model. Then, a task-specific teacher model filters these generations to distill high-quality counterfactual data. While task-agnostic, we apply our pipeline to the task of natural language inference (NLI) and find that on challenging evaluations such as the NLI stress test, comparatively smaller student models trained with DISCO generated counterfactuals are more robust (6% absolute) and generalize better across distributions (2%) compared to models trained without data augmentation. Furthermore, DISCO augmented models are 10% more consistent between counterfactual pairs on three evaluation sets, demonstrating that DISCO augmentation enables models to more reliably learn causal representations. Our repository is available at: https://github.com/eric11eca/disco

1 Introduction

DISCO addresses the cost and limited perturbation coverage of existing counterfactual data generation with an LLM-and-teacher distillation pipeline. The paper reports improved NLI robustness and counterfactual performance, including gains over baselines and human-written examples.

1 Introduction

  • Crowdsourcing counterfactuals can be costly and yield small, less diverse datasets, while supervised generators rely on fixed perturbation inventories that are costly to extend.The cited NLI crowdsourcing example contains 8.3k total instances with augmentation.Source: §1 · pp. 1–2
  • DISCO selects and decomposes task instances, prompts a general LLM to overgenerate perturbations, filters them with a task-specific teacher, and trains a smaller student.Source: §1 · p. 2
  • 6% average improvements over WANLI and SNLI baselines on 7 NLI robustness tests, despite DISCO data being smaller than existing augmentation approaches.The comparison reports 75k DISCO examples versus 1 million from Wu et al. (2022).Source: §1 · p. 2
  • Manual annotation found that 83% of DISCO counterfactuals correctly flipped source labels, 1% higher than human performance; the data also had greater perturbation and information richness than human CAD examples.Source: §1 · p. 2
  • DISCO improves counterfactual accuracy by 8% and context-difference sensitivity by 6% over SNLI baselines, and counterfactual accuracy by 18% when added to WANLI.Source: §1 · p. 2

2 Related Work

Prior counterfactual augmentation work includes human-written examples and generators trained for predefined perturbation types. DISCO is positioned as an LLM-based alternative that uses a task-specific teacher and local premise edits.

Mitigating Spurious Correlations for NLU

Counterfactual Data Augmentation

Large Model Dataset Creation

3 Counterfactual Distillation

DISCO prompts a large language model to generate premise perturbations intended to change an NLI label, then filters generations before using them as counterfactual training data. Its prompting includes masked and insertion formats, and its filtering combines automatic checks with a teacher model.

3 Counterfactual Distillation

  • DISCO perturbs a premise to produce a new premise-hypothesis input with a corresponding target label, using a large language model to overgenerate candidate edits for filtering.Source: §3 · p. 3

3.1 Prompting

  • The prompting process splits premises into spans and uses masked prompts to generate replacements; insertion prompts condition generation on surrounding text and the target label.Insertion mode is intended to use both prefix and suffix context, avoid completing the sentence without attending to the suffix, and generate more diverse outputs at lower cost without in-context examples.Source: §3.1 · pp. 3–4, Figure 2 · p. 4

3.2 Teacher Model Filtering

  • Filtering first removes generations with prompt copying, repetition, excessive lexical overlap, or negation shortcuts, then uses an NLI teacher to assess the target-label probability shift.The teacher is a DeBERTa-v2 model with state-of-the-art NLI performance.Source: §3.2 · p. 4

4 Evaluate Counterfactual Quality

This section compares DISCO with Human-CAD using automatic diversity measures and human label-flip evaluation. DISCO is more diverse on both reported dimensions and has a higher average flip rate.

4 Evaluate Counterfactual Quality

  • The evaluation compares DISCO with Human-CAD using automatic and human-based metrics.The authors motivate general-language-model generation as more efficient, cheaper, and more flexible than crowdsourcing.Source: §4 · p. 4

4.2 Human Evaluation

  • DISCO counterfactuals have a higher average label-flip rate than human-written examples in human evaluation.Table 1 reports automatic and human evaluation results for 510 DISCO instances compared with Human-CAD.Source: Table 1 · p. 5, §4.2 · p. 6

4.1 Automatic Evaluation

  • DISCO has lower Self-BLEU and higher OTDD than Human-CAD, indicating greater lexical, syntactic, and information diversity.The higher OTDD holds consistently across perturbation directions.Source: §4.1 · p. 5

4.2 Human Evaluation

  • LFR measures flips to the target label, whereas SLFR counts any label difference from the original, even if the exact target label is wrong.The authors note that SLFR can capture potentially valid counterfactuals rejected by the filter, which may be useful for other learning tasks.Source: §4.2 · p. 5
  • Human evaluation used three annotators per example, majority voting, and sentence pairs shown without the original examples.Annotators labeled a random subset using the standard NLI annotation process.Source: §4.2 · p. 5
  • DISCO has lower label-flip rates only for contradictions, while GPT-3 generates better entailment and neutral examples than Human-CAD.The authors hypothesize that contradiction-versus-neutral ambiguity and maintaining diversity make contradiction generation difficult.Source: §4.2 · p. 5

5 Experiments

The experiments compare DISCO-augmented NLI models with unaugmented baselines and prior augmentation methods on robustness, distribution shifts, and counterfactual reasoning. DISCO improves reported robustness and OOD results, while counterfactual evaluations show gains in sensitivity and accuracy.

5.1 Counterfactual Data Augmentation

  • The training setup adds counterfactual examples to selected data, optionally merges in a random base subset, removes duplicates, and trains a RoBERTa-large student.The student has 355 million parameters; models trained on base sets alone serve as baselines.Source: §5.1 · p. 6
  • Experiments select ambiguous SNLI examples with data cartography, also augment WANLI, and evaluate adversarial and stress tests plus MNLI-hard and QNLI.Comparisons include unaugmented baselines and prior methods, including Tailor, WANLI, Z-aug, and Human-CAD.Source: §5.1 · p. 6
  • 6.5 (SNLI) and 9.5 (WANLI) robustness gains were reported; OOD gains were 2.7% over the SNLI-subset baseline and 2.1% over the WANLI baseline.The paper reports better average WANLI robustness performance with augmentation (75.1) than the WANLI baseline (65.9).Source: §5.1 · p. 7, Table 4 · p. 7
  • DISCO data were smaller than WANLI and Z-aug datasets yet yielded better performance than models trained on those larger datasets across 7 datasets.Augmenting or training with DISCO also achieved the highest accuracy on 7 evaluation sets.Source: §5.1 · pp. 6–7, Table 3 · p. 7

5.2 Counterfactual Evaluation

  • Counterfactual evaluations use human-labeled GPT-3 perturbations of SNLI-hard and WANLI examples, plus Human-CAD; sensitivity measures prediction shift and accuracy requires both pair members correct.The WANLI-derived set was chosen to differ from DISCO’s distribution.Source: §5.2 · pp. 7–8, Table 5 · p. 8
  • On Human-CAD and SNLI-hard2→, DISCO raised WANLI-baseline sensitivity by more than 20% and accuracy by more than 30%.DISCO-only training achieved the highest counter accuracy, while SNLI-subset augmentation achieved the highest counterfactual sensitivity; gains on WANLI2→ were marginal, likely due to distribution mismatch.Source: §5.2 · p. 8, Table 5 · p. 8

6 Conclusion

The conclusion reports that DISCO counterfactuals improve robustness, out-of-distribution generalizability, counterfactual accuracy, and sensitivity to contextual changes. It also identifies extending the method beyond NLI and exploring alternatives to teacher filtering as future directions.

6 Conclusion

  • Despite smaller data size, DISCO data outperform baselines on evaluation sets and improve robustness and out-of-distribution generalizability.The conclusion also reports improved counterfactual accuracy and greater sensitivity to context changes between original and counterfactual examples.Source: §6 · p. 9
  • DISCO augmentation improves counterfactual accuracy and sensitivity to context changes between original and counterfactual examples.Source: §6 · p. 9
  • Reported experiments are limited to NLI, while future work could extend the pipeline to other tasks or languages with task-specific filters and prompt modifications.The authors also suggest alternative teacher-filtering strategies and semisupervised learning over unfiltered LLM output.Source: §6 · p. 9

7 Limitations

The reported experiments cover English NLI and use a single LLM, GPT-3. High prompting costs also limited pipeline ablations, while human evaluation covered around 500 random instances.

7 Limitations

  • Experiments cover English NLI only, and extending the pipeline to other languages may pose challenges such as finding span-selection tools.Source: §7 · p. 9
  • Data generation experiments used only one LLM, the publicly available GPT-3 model first reported in Brown et al. (2020).Source: §7 · p. 9
  • High prompting costs prevented ablations of all pipeline components, and human evaluation was limited to around 500 random instances with three annotators each.The authors note that pipeline variations could affect results and augmentation quality.Source: §7 · p. 9

A Hyper-parameters and Implementation

The implementation uses GPT-3 for perturbation overgeneration and a DeBERTa-v2 NLI teacher for filtering. Student models are tuned and selected using validation accuracy, with shared implementation choices for augmentation comparisons.

A Hyper-parameters and Implementation

  • GPT-3 text-DaVinci-002 generated perturbations at temperature 0.8, with frequency and presence penalties both set to 0.8.The 1.3-billion-parameter DeBERTa-v2 teacher was trained on SNLI, MultiNLI, FEVER, and ANLI.Source: A Hyper-parameters and Implementation · p. 12
  • Student models were tuned by random search over learning rate, batch size, warmup ratio, and epochs, with validation accuracy guiding model selection.The generally effective configuration was learning rate 3e−5, 3 epochs, batch size 64, and warmup ratio 0.1; main tables report the best of five random-seed runs except for the first three rows, which report the best single run.Source: A Hyper-parameters and Implementation · p. 12
  • Comparisons with other augmentation methods used the same code base to reduce implementation differences, and experiments ran on an NVIDIA RTX A6000 GPU.Source: A Hyper-parameters and Implementation · p. 12

B Human Annotation Details

Human annotators evaluated generated counterfactuals and annotated two counterfactual-consistency evaluation sets. The study used qualified Mechanical Turk workers, three annotations per problem, and majority voting.

B Human Annotation Details

Loading 2212.10534v3…