CORE: A Retrieve-then-Edit Framework for Counterfactual Data Generation

Tanay Dixit, Bhargavi Paranjape, Hannaneh Hajishirzi, Luke Zettlemoyer
10/10/2022
cs.CL

Official code: tanay2001/CORE (7 stars, Python, last commit 2022-10-29).

Abstract

Counterfactual data augmentation (CDA) -- i.e., adding minimally perturbed inputs during training -- helps reduce model reliance on spurious correlations and improves generalization to out-of-distribution (OOD) data. Prior work on generating counterfactuals only considered restricted classes of perturbations, limiting their effectiveness.

Show full abstract

We present COunterfactual Generation via Retrieval and Editing (CORE), a retrieval-augmented generation framework for creating diverse counterfactual perturbations for CDA. For each training example, CORE first performs a dense retrieval over a task-related unlabeled text corpus using a learned bi-encoder and extracts relevant counterfactual excerpts. CORE then incorporates these into prompts to a large language model with few-shot learning capabilities, for counterfactual editing. Conditioning language model edits on naturally occurring data results in diverse perturbations. Experiments on natural language inference and sentiment analysis benchmarks show that CORE counterfactuals are more effective at improving generalization to OOD data compared to other DA approaches. We also show that the CORE retrieval framework can be used to encourage diversity in manually authored perturbations

View on arXivView PDF

Code Implementations(1)

tanay2001/COREOfficial100%

CORE: A Retrieve-then-Edit Framework for Counterfactual Data Generation, Findings EMNLP 2022

70Python, ShellOct 7, 20224 years ago

Similar Papers

Cite this paper

@article{dixit2022core,
  title  = {CORE: A Retrieve-then-Edit Framework for Counterfactual Data Generation},
  author = {Tanay Dixit and Bhargavi Paranjape and Hannaneh Hajishirzi and Luke Zettlemoyer},
  year   = {2022},
  eprint = {2210.04873},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.04873}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.04873.svg)](https://codeofpaper.com/paper/2210.04873)

Discussion