Lune

EMNLP2021Top-tier venue

Text Counterfactuals via Latent Optimization and Shapley-Guided Search

Xiaoli Z. Fern, Quintin Pope

Abstract

We study the problem of generating counterfactual text for a classifier as a means for understanding and debugging classification. Given a textual input and a classification model, we aim to minimally alter the text to change the model's prediction. White-box approaches have been successfully applied to similar problems in vision where one can directly optimize the continuous input. Optimization-based approaches become difficult in the language domain due to the discrete nature of text. We bypass this issue by directly optimizing in the latent space and leveraging a language model to generate candidate modifications from optimized latent representations. We additionally use Shapley values to estimate the combinatoric effect of multiple changes. We then use these estimates to guide a beam search for the final counterfactual text. We achieve favorable performance compared to recent whitebox and black-box baselines using human and automatic evaluations. Ablation studies show that both latent optimization and the use of Shapley values improve success rate and the quality of the generated counterfactuals.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Towards Model Robustness: Generating Contextual Counterfactuals for Entities in Relation ExtractionMi Zhang, Tieyun Qian, Ting Zhang, Xin MiaoWWW 2023 · 9 citations
  2. A General Search-Based Framework for Generating Textual Counterfactual ExplanationsDaniel Gilo, Shaul MarkovitchAAAI 2024 · 3 citations

Builds on3

  1. Towards Evaluating the Robustness of Neural NetworksNicholas Carlini, David A. WagnerS&P 2017 · 9,786 citations
  2. Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and EntailmentDi Jin, Zhijing Jin, Joey Tianyi Zhou, Peter SzolovitsAAAI 2020 · 1,333 citations
  3. There and Back Again: Revisiting Backpropagation Saliency MethodsSylvestre-Alvise Rebuffi, Ruth Fong, Xu Ji, Andrea VedaldiCVPR 2020

Related papers

  1. Generating Realistic Natural Language CounterfactualsMarcel Robeer, Floris Bex, Ad FeeldersEMNLP Findings 2021 · 21 citations
  2. Generative causal explanations of black-box classifiersMatthew R. O'Shaughnessy, Gregory Canal, Marissa Connor, Christopher Rozell et al.NeurIPS 2020 · 83 citations
  3. FOCUS: Flexible Optimizable Counterfactual Explanations for Tree EnsemblesAna Lucic, Harrie Oosterhuis, Hinda Haned, Maarten de RijkeAAAI 2022 · 87 citations
  4. CF-OPT: Counterfactual Explanations for Structured PredictionGermain Vivier-Ardisson, Alexandre Forel, Axel Parmentier, Thibaut VidalICML 2024 · 3 citations
  5. Ordered Counterfactual Explanation by Mixed-Integer Linear OptimizationKentaro Kanamori, Takuya Takagi, Ken Kobayashi, Yuichi Ike et al.AAAI 2021 · 135 citations
Dusk over the sea between two cliffs drawn in fine vertical lines