Explaining Text Classifiers with Counterfactual Representations
Not on the map. Why?
Abstract (arXiv)
One well motivated explanation method for classifiers leverages counterfactuals which are hypothetical events identical to real observations in all aspects except for one feature. Constructing such counterfactual poses specific challenges for texts, however, as some attribute values may not necessarily align with plausible real-world events. In this paper we propose a simple method for generating counterfactuals by intervening in the space of text representations which bypasses this limitation. We argue that our interventions are minimally disruptive and that they are theoretically sound as they align with counterfactuals as defined in Pearl's causal inference framework. To validate our method, we conducted experiments first on a synthetic dataset and then on a realistic dataset of counterfactuals. This allows for a direct comparison between classifier predictions based on ground truth counterfactuals - obtained through explicit text interventions - and our counterfactuals, derived through interventions in the representation space. Eventually, we study a real world scenario where our counterfactuals can be leveraged both for explaining a classifier and for bias mitigation.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 18 of its 28 references that are in the map. First posted on arXiv 1 Feb 2024.
Builds on
18 of 28 references.
References · 18
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2016Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddingscited by 1,304
- 2017Counterfactual Fairnesscited by 802
- 2019Explaining Machine Learning Classifiers through Diverse Counterfactual Explanationscited by 612
- 2020Null It Out: Guarding Protected Attributes by Iterative Nullspace Projectioncited by 442
- 2019Learning the Difference that Makes a Difference with Counterfactually-Augmented Datacited by 428
- 2019Bias in Bios: A Case Study of Semantic Representation Bias in a High-Stakes Settingcited by 346
- 2023LEACE: Perfect linear concept erasure in closed formcited by 254
- 2018Adversarial Removal of Demographic Attributes from Text Datacited by 166
- 2018Counterfactual Fairness in Text Classification through Robustnesscited by 150
- 2017Controllable Invariance through Adversarial Feature Learningcited by 127
- 2020CausaLM: Causal Model Explanation Through Counterfactual Language Modelscited by 117
6 more
- 2020Generate Your Counterfactuals: Towards Controlled Counterfactual Generation for Textcited by 75
- 2022CEBaB: Estimating the Causal Effects of Real-World Concepts on NLP Model Behaviorcited by 54
- 2022Kernelized Concept Erasurecited by 47
- 2022DoCoGen: Domain Counterfactual Generation for Low Resource Domain Adaptationcited by 36
- 2022Gold Doesn't Always Glitter: Spectral Removal of Linear and Nonlinear Guarded Attribute Informationcited by 33
- 2023Robust Concept Erasure via Kernelized Rate-Distortion Maximizationcited by 10
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
- 2026MUtE: A Dual Framework for Concept Erasure and Counterfactual Interventions10 Sep 2026
- 2025Counterfactually Fair Conformal Prediction9 Oct 2025
- 2025Nonlinear Concept Erasure: a Density Matching Approach16 Jul 2025