atlas

Research map / Label-efficient and robust learning / Recognition and long-tail

A General Search-Based Framework for Generating Textual Counterfactual Explanations

AAAI 2024 · Label-efficient and robust learning › Recognition and long-tail · approach: Post-hoc explanation analysis

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes TCE-Search, a model-agnostic, domain-agnostic anytime weighted-A* search framework that generates textual counterfactual explanations for text classifiers and adapts to changed distance functions without retraining.

Problem

Textual counterfactual explanations are usually produced by generative language models trained for a fixed loss, so changing user requirements (distance, confidence, time budget) requires costly retraining; they also often depend on differentiable black boxes.

Approach

Model the counterfactual generation as a search over texts (initial state = classified text, goal = text in target class with confidence above threshold), using MLM mask-filling, a novel differentiating-words-bank operator, optional WordNet antonym operator, a GPT-2 loss-ratio plausibility filter, and an iteratively relaxed weighted-A* anytime loop; the user distance is the cost function, so no re

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use TCE-Search instead of MiCEtextual counterfactual generation · Yelp, Amazon, Airline, and SST 256wnormalized Levenshtein distance: Yelp: 0.56 vs 0.266*; Amazon: 0.448 vs 0.32*; Airline: 0.257 vs 0.269; SST: 0.207 vs 0.256*Mixed
use TCE-Search instead of Polyjuicetextual counterfactual generation · Yelp, Amazon, Airline, SST, Science, and AGnews 1 sentencenormalized Levenshtein distance: 0.148 vs 0.692*; 0.229 vs 0.591*; 0.174 vs 0.723*; 0.085 vs 0.562*; 0.266 vs 0.678*; 0.14 vs 0.799*Helped
add differentiating words banks operator (ablation)TCE-Search · SST, Yelp, Amazon, Genre, Spam, Airline, AGnews, and Sciencenormalized Levenshtein distance: SST: 0.135* -> 0.088; Yelp: 0.510* -> 0.426; Amazon: 0.47* -> 0.398; Genre: 0.464* -> 0.269; Spam: 0.362* -> 0.261; AirlHelped
remove WordNet antonym operator (ablation)TCE-Search · eight datasetsnormalized Levenshtein distance: SST: 0.088 -> 0.086; Yelp: 0.426 -> 0.437; Amazon: 0.398 -> 0.411; Genre: 0.269 -> 0.29; Spam: 0.261 -> 0.254; Airline: No clear effect
increase allocated search resourcesTCE-Search · all eight datasetsaverage normalized distanceHelped
use LR or SVM instead of RF as the black-box classifierTCE-Search · SST, Yelp, Amazon, Genre, Spam, Airline, AGnews, and Sciencenormalized Levenshtein distance: RF: 0.088, 0.426, 0.398, 0.269, 0.261, 0.153, 0.234, 0.305; LR: 0.102, 0.525, 0.386, 0.431, 0.293, 0.214, 0.296, 0.413; Mixed
generate counterfactuals with TCE-SearchSST examples · SST plausibility human ratingsplausibility rating: 3.66; 3.33No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: Yelp Amazon SST Science Genre AGNews Airline Spam

Benchmarks: Yelp Amazon SST Science Genre AGnews Airline Spam

Metrics: normalized Levenshtein distance normalized cosine distance normalized syntactic tree distance LM loss ratio (plausibility) human plausibility rating

Baselines: MiCE Polyjuice Tailor

Builds on: weighted A* MiCE Polyjuice Tailor DistilBERT

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy