Skip to main content
QUICK REVIEW

[Paper Review] Explaining The Efficacy of Counterfactually Augmented Data

Divyansh Kaushik, Amrith Setlur|arXiv (Cornell University)|Oct 5, 2020
Topic ModelingComputer Science64 references7 citations
TL;DR

This paper explains why counterfactually augmented data (CAD) improves model robustness and out-of-domain generalization by proposing a causal framework where noise in non-causal features improves out-of-domain performance, while noise in causal features degrades it. Empirical validation shows CAD-identified spans exhibit this behavior, suggesting they capture causal signal, unlike attention or saliency maps.

ABSTRACT

In attempts to produce ML models less reliant on spurious patterns in NLP datasets, researchers have recently proposed curating counterfactually augmented data (CAD) via a human-in-the-loop process in which given some documents and their (initial) labels, humans must revise the text to make a counterfactual label applicable. Importantly, edits that are not necessary to flip the applicable label are prohibited. Models trained on the augmented data appear, empirically, to rely less on semantically irrelevant words and to generalize better out of domain. While this work draws loosely on causal thinking, the underlying causal model (even at an abstract level) and the principles underlying the observed out-of-domain improvements remain unclear. In this paper, we introduce a toy analog based on linear Gaussian models, observing interesting relationships between causal models, measurement noise, out-of-domain generalization, and reliance on spurious signals. Our analysis provides some insights that help to explain the efficacy of CAD. Moreover, we develop the hypothesis that while adding noise to causal features should degrade both in-domain and out-of-domain performance, adding noise to non-causal features should lead to relative improvements in out-of-domain performance. This idea inspires a speculative test for determining whether a feature attribution technique has identified the causal spans. If adding noise (e.g., by random word flips) to the highlighted spans degrades both in-domain and out-of-domain performance on a battery of challenge datasets, but adding noise to the complement gives improvements out-of-domain, it suggests we have identified causal spans. We present a large-scale empirical study comparing spans edited to create CAD to those selected by attention and saliency maps. Across numerous domains and models, we find that the hypothesized phenomenon is pronounced for CAD.

Motivation & Objective

  • To explain the causal mechanisms underlying the success of counterfactually augmented data (CAD) in reducing reliance on spurious correlations.
  • To investigate whether CAD-edited features are causally relevant by testing their response to noise injection.
  • To evaluate whether feature attribution methods like attention and saliency maps identify the same causal spans as CAD.
  • To determine if noise injection on causal vs. non-causal features leads to predictable performance shifts in in-domain and out-of-domain settings.
  • To propose and test a diagnostic method for identifying causal spans using relative performance degradation under noise.

Proposed method

  • Develops a linear Gaussian causal model to simulate the effects of noise on causal and non-causal features.
  • Proposes a hypothesis: noise on causal features degrades both in-domain and out-of-domain performance, while noise on non-causal features degrades in-domain but improves out-of-domain performance.
  • Empirically tests this hypothesis by injecting random word flips (noise) on spans identified as rationales by humans, attention, or saliency maps.
  • Trains models (SVM, BiLSTM, BERT) on datasets with injected noise and evaluates performance on in-domain and out-of-domain test sets.
  • Compares the performance shifts of models trained on CAD data versus other data sources (e.g., Hu et al., Li et al.) under noise.
  • Uses TF-IDF and attention-based rationales to identify and perturb key tokens in text, measuring changes in model behavior.

Experimental results

Research questions

  • RQ1What causal structure underlies the effectiveness of counterfactually augmented data (CAD) in reducing reliance on spurious signals?
  • RQ2Does noise injection on CAD-identified spans degrade both in-domain and out-of-domain performance, as expected for causal features?
  • RQ3Does noise injection on non-CAD spans improve out-of-domain performance, as predicted for non-causal features?
  • RQ4How do attention and saliency-based feature attribution methods compare to CAD in identifying causally relevant spans?
  • RQ5Can the relative performance shift under noise serve as a diagnostic for identifying causal spans in NLP models?

Key findings

  • Models trained on CAD data show significantly reduced reliance on spurious terms like 'horror' and 'romance' in sentiment analysis, with performance on revised data improving from 51.0% to 87.3% for SVM.
  • When noise is injected into human-identified rationales (CAD spans), both in-domain and out-of-domain performance degrade, confirming their causal nature.
  • When noise is injected into non-rationales (non-CAD spans), out-of-domain performance improves relative to in-domain performance, supporting the hypothesis that non-causal features benefit from noise in out-of-domain settings.
  • The hypothesized performance shift under noise is pronounced for CAD-identified spans but not for spans selected by attention or saliency maps, indicating CAD identifies more causally relevant features.
  • BERT fine-tuned on CAD data achieves 95.1% accuracy on revised test sets, outperforming models trained on original data (88.5%) or mixed data (81.6%), demonstrating strong out-of-domain generalization.
  • In the SNLI task, injecting 100% noise into CAD-identified rationales causes a 20.3-point drop in in-sample accuracy (from 90.0 to 69.7) and a 15.4-point drop in RP (from 66.9 to 51.5), confirming their causal role.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.