Gumbel Counterfactual Generation From Language Models
Shauli Ravfogel, Anej Svete, Vésteinn Snæbjarnarson, Ryan Cotterell
摘要
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. https://github.com/shauli-ravfogel/lm-counterfactuals
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
引用它的顶会 Paper8
- Robust Reward Modeling via Causal RubricsPragya Srivastava, Harman Singh, Rahul Madhavan, Gandharv Patil 等ICLR 2026 · 20 次引用
- On the Reasoning Abilities of Masked Diffusion Language ModelsAnej Svete, Ashish SabharwalICLR 2026 · 8 次引用
- Counterfactual reasoning: an analysis of in-context emergenceMoritz Miller, Bernhard Schölkopf, Siyuan GuoNeurIPS 2025 · 5 次引用
- Preserving Task-Relevant Information Under Linear Concept RemovalFloris Holstege, Shauli Ravfogel, Bram WoutersNeurIPS 2025 · 4 次引用
- Abstract Counterfactuals for Language Model AgentsEdoardo Pona, Milad Kazemi, Yali Du, David Watson 等NeurIPS 2025 · 3 次引用
它引用的 Paper22
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 次引用
- Inference-Time Intervention: Eliciting Truthful Answers from a Language ModelKenneth Li, Oam Patel, Fernanda B. Viégas, Hanspeter Pfister 等NeurIPS 2023 · 1,549 次引用
- Reducing Sentiment Bias in Language Models via Counterfactual EvaluationPo-Sen Huang, Huan Zhang, Ray Jiang, Robert Stanforth 等EMNLP Findings 2020 · 124 次引用
相关 Paper
- Learning Generalized Gumbel-max Causal MechanismsGuy Lorberbom, Daniel D. Johnson, Chris J. Maddison, Daniel Tarlow 等NeurIPS 2021 · 25 次引用
- Counterfactual Temporal Point ProcessesKimia Noorbakhsh, Manuel Gomez-RodriguezNeurIPS 2022 · 31 次引用
- Natural Counterfactuals With Necessary BacktrackingGuang-Yuan Hao, Jiji Zhang, Biwei Huang, Hao Wang 等NeurIPS 2024 · 2 次引用
- On the Eligibility of LLMs for Counterfactual Reasoning: A Decompositional StudyShuai Yang, Qi Yang, Luoxi Tang, Yuqiao Meng 等ICLR 2026 · 9 次引用
- Counterfactual Explanations in Sequential Decision Making Under UncertaintyStratis Tsirtsis, Abir De, Manuel Gomez RodriguezNeurIPS 2021 · 59 次引用
