Gumbel Counterfactual Generation From Language Models
Not on the map. Why?
Abstract (arXiv)
Understanding and manipulating the causal generation mechanisms in language models is essential for controlling their behavior. Previous work has primarily relied on techniques such as representation surgery -- e.g., model ablations or manipulation of linear subspaces tied to specific concepts -- to intervene on these models. To understand the impact of interventions precisely, it is useful to examine counterfactuals -- e.g., how a given sentence would have appeared had it been generated by the model following a specific intervention. We highlight that counterfactual reasoning is conceptually distinct from interventions, as articulated in Pearl's causal hierarchy. Based on this observation, we propose a framework for generating true string counterfactuals by reformulating language models as a structural equation model using the Gumbel-max trick, which we called Gumbel counterfactual generation. This reformulation allows us to model the joint distribution over original strings and their counterfactuals resulting from the same instantiation of the sampling noise. We develop an algorithm based on hindsight Gumbel sampling that allows us to infer the latent noise variables and generate counterfactuals of observed strings. Our experiments demonstrate that the approach produces meaningful counterfactuals while at the same time showing that commonly used intervention techniques have considerable undesired side effects.
Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Builds on 50 of its 79 references that are in the map. First posted on arXiv 11 Nov 2024.
Builds on
50 of 79 references.
References · 50
- 2017Attention Is All You Needcited by 60,361
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2016Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddingscited by 1,312
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,302
- 2018Hierarchical Neural Story Generationcited by 1,193
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
- 2016The Concrete Distribution: A Continuous Relaxation of Discrete Random Variablescited by 1,148
- 2022Mass-Editing Memory in a Transformercited by 1,001
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
38 more
- 2019Designing and Interpreting Probes with Control Taskscited by 640
- 2020Null It Out: Guarding Protected Attributes by Iterative Nullspace Projectioncited by 455
- 2019Bias in Bios: A Case Study of Semantic Representation Bias in a High-Stakes Settingcited by 349
- 2021Polyjuice: Generating Counterfactuals for Explaining, Evaluating, and Improving Modelscited by 222
- 2016Fine-grained Analysis of Sentence Embeddings Using Auxiliary Prediction Taskscited by 216
- 2023Attribution Patching Outperforms Automated Circuit Discoverycited by 209
- 2023Causal Abstraction: A Theoretical Foundation for Mechanistic Interpretabilitycited by 205
- 2020Causal Mediation Analysis for Interpreting Neural NLP: The Case of Gender Biascited by 191
- 2021Causal Inference in Natural Language Processing: Estimation, Prediction, Interpretation and Beyondcited by 178
- 2014A* Samplingcited by 151
- 2019Reducing Sentiment Bias in Language Models via Counterfactual Evaluationcited by 148
- 2020An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Modelscited by 134
- 2019Counterfactual Off-Policy Evaluation with Gumbel-Max Structural Causal Modelscited by 117
- 2020CausaLM: Causal Model Explanation Through Counterfactual Language Modelscited by 117
- 2024AtP*: An efficient and scalable method for localizing LLM behaviour to componentscited by 111
- 2024Model Editing Harms General Abilities of Large Language Models: Regularization to the Rescuecited by 103
- 2018Under the Hood: Using Diagnostic Classifiers to Investigate and Improve how Language Models Track Agreement Informationcited by 97
- 2019The emergence of number and syntax units in LSTM language modelscited by 94
- 2024Model Editing at Scale leads to Gradual and Catastrophic Forgettingcited by 93
- 2022Diffusion Models for Counterfactual Explanationscited by 79
- 2020Generate Your Counterfactuals: Towards Controlled Counterfactual Generation for Textcited by 75
- 2021Counterfactual Interventions Reveal the Causal Effect of Relative Clause Representations on Agreement Predictioncited by 59
- 2022CEBaB: Estimating the Causal Effects of Real-World Concepts on NLP Model Behaviorcited by 55
- 2024Representation Surgery: Theory and Practice of Affine Steeringcited by 50
- 2022Kernelized Concept Erasurecited by 48
- 2024Multi-property Steering of Large Language Models with Dynamic Activation Compositioncited by 39
- 2022A Measure-Theoretic Characterization of Tight Language Modelscited by 33
- 2021ECINN: Efficient Counterfactuals from Invertible Neural Networkscited by 26
- 2020Exploring the Linear Subspace Hypothesis in Gender Bias Mitigationcited by 25
- 2023A Geometric Notion of Causal Probingcited by 25
- 2024Missed Causes and Ambiguous Effects: Counterfactuals Pose Challenges for Interpreting Neural Networkscited by 23
- 2024Why Does New Knowledge Create Messy Ripple Effects in LLMs?cited by 18
- 2021Learning Generalized Gumbel-max Causal Mechanismscited by 16
- 2024Counterfactual Token Generation in Large Language Modelscited by 14
- 2022Counterfactual Analysis in Dynamic Latent State Modelscited by 10
- 2021Causal Modeling With Infinitely Many Variablescited by 7
- 2023Formal Aspects of Language Modelingcited by 7
- 2024On Affine Homotopy between Language Encoderscited by 3
Built on by
Citing papers per year: 2025: 5; 2026: 9.
14 papers.
Sort:
By area:
- 2025Robust Reward Modeling via Causal Rubricscited by 19
- 2026Compared to What? Baselines and Metrics for Counterfactual Promptingcited by 5
- 2025Counterfactual reasoning: an analysis of in-context emergencecited by 4
- 2025Preserving Task-Relevant Information Under Linear Concept Removalcited by 4
- 2025Abstract Counterfactuals for Language Model Agentscited by 2
- 2025Large Language Models as Nondeterministic Causal Modelscited by 2
- 2026The Homogenization Problem in LLMs: Towards Meaningful Diversity in AI Safetycited by 2
- 2026LIBERTy: A Causal Framework for Benchmarking Concept-Based Explanations of LLMs with Structural Counterfactualscited by 2
- 2026Should I Have Expressed a Different Intent? Counterfactual Generation for LLM-Based Autonomous Controlcited by 1
- 2026Better Think Thrice: Learning to Reason Causally with Double Counterfactual Consistencycited by 0
- 2026Gumbel Machine: Counterfactual Student Writing Generation via Gumbel Noise Steeringcited by 0
- 2026What Process Evaluation of Coding Agents Actually Measures: Action, Task, and Step Are Three Different Levelscited by 0
- 2026agent-risk: Risk Assessment for Changes to AI Agents12 Oct 2026
- 2026Beyond the Shadows of Plato's Cave: Evaluating False Memory in Autonomous Agents via Counterfactual Reasoning30 Sep 2026
- 2026What Process Evaluation of Coding Agents Actually Measures: Action, Task, and Step Are Three Different Levels24 Aug 2026
- 2026Gumbel Machine: Counterfactual Student Writing Generation via Gumbel Noise Steering26 May 2026
- 2026Compared to What? Baselines and Metrics for Counterfactual Prompting1 May 2026
- 2026Better Think Thrice: Learning to Reason Causally with Double Counterfactual Consistency18 Feb 2026
- 2026Should I Have Expressed a Different Intent? Counterfactual Generation for LLM-Based Autonomous Control27 Jan 2026
- 2026LIBERTy: A Causal Framework for Benchmarking Concept-Based Explanations of LLMs with Structural Counterfactuals15 Jan 2026
- 2026The Homogenization Problem in LLMs: Towards Meaningful Diversity in AI Safety3 Jan 2026
- 2025Large Language Models as Nondeterministic Causal Models26 Sep 2025
- 2025Robust Reward Modeling via Causal Rubrics19 Jun 2025
- 2025Preserving Task-Relevant Information Under Linear Concept Removal12 Jun 2025
2 more
- 2025Counterfactual reasoning: an analysis of in-context emergence5 Jun 2025
- 2025Abstract Counterfactuals for Language Model Agents3 Jun 2025
- 2025Robust Reward Modeling via Causal Rubricscited by 19
- 2025Robust Reward Modeling via Causal Rubrics19 Jun 2025
- 2026Compared to What? Baselines and Metrics for Counterfactual Promptingcited by 5
- 2025Preserving Task-Relevant Information Under Linear Concept Removalcited by 4
- 2025Large Language Models as Nondeterministic Causal Modelscited by 2
- 2026The Homogenization Problem in LLMs: Towards Meaningful Diversity in AI Safetycited by 2
- 2026LIBERTy: A Causal Framework for Benchmarking Concept-Based Explanations of LLMs with Structural Counterfactualscited by 2
- 2026Should I Have Expressed a Different Intent? Counterfactual Generation for LLM-Based Autonomous Controlcited by 1
- 2026Gumbel Machine: Counterfactual Student Writing Generation via Gumbel Noise Steeringcited by 0
- 2026Beyond the Shadows of Plato's Cave: Evaluating False Memory in Autonomous Agents via Counterfactual Reasoningcited by 0
- 2026agent-risk: Risk Assessment for Changes to AI Agentscited by 0
- 2026agent-risk: Risk Assessment for Changes to AI Agents12 Oct 2026
- 2026Beyond the Shadows of Plato's Cave: Evaluating False Memory in Autonomous Agents via Counterfactual Reasoning30 Sep 2026
- 2026Gumbel Machine: Counterfactual Student Writing Generation via Gumbel Noise Steering26 May 2026
- 2026Compared to What? Baselines and Metrics for Counterfactual Prompting1 May 2026
- 2026Should I Have Expressed a Different Intent? Counterfactual Generation for LLM-Based Autonomous Control27 Jan 2026
- 2026LIBERTy: A Causal Framework for Benchmarking Concept-Based Explanations of LLMs with Structural Counterfactuals15 Jan 2026
- 2026The Homogenization Problem in LLMs: Towards Meaningful Diversity in AI Safety3 Jan 2026
- 2025Large Language Models as Nondeterministic Causal Models26 Sep 2025
- 2025Preserving Task-Relevant Information Under Linear Concept Removal12 Jun 2025