Gumbel Counterfactual Generation From Language Models
Ravfogel, Shauli, Svete, Anej, Snæbjarnarson, Vésteinn, Cotterell, Ryan
–arXiv.org Artificial Intelligence
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 \emph{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.
arXiv.org Artificial Intelligence
Dec-13-2024
- Country:
- Africa
- Ethiopia > Addis Ababa
- Addis Ababa (0.04)
- Middle East > Egypt
- Giza Governorate > Giza (0.04)
- Rwanda > Kigali
- Kigali (0.04)
- Ethiopia > Addis Ababa
- Asia
- Europe
- Belgium > Brussels-Capital Region
- Brussels (0.04)
- Denmark > Capital Region
- Copenhagen (0.04)
- Ireland (0.14)
- Italy (0.14)
- Netherlands > Gelderland
- Arnhem (0.04)
- Switzerland
- United Kingdom
- England
- Cambridgeshire > Cambridge (0.04)
- Oxfordshire > Oxford (0.04)
- Northern Ireland (0.04)
- England
- Belgium > Brussels-Capital Region
- North America
- Canada > Ontario
- Central America (0.04)
- Mexico (0.04)
- United States
- California > San Francisco County
- San Francisco (0.14)
- Hawaii (0.04)
- Illinois > Cook County
- Chicago (0.04)
- Maryland (0.04)
- Massachusetts > Middlesex County
- Cambridge (0.14)
- New York > New York County
- New York City (0.04)
- Wisconsin
- Dane County > Madison (0.04)
- Eau Claire County > Eau Claire (0.04)
- California > San Francisco County
- Oceania
- Australia
- Queensland (0.04)
- Tasmania (0.04)
- Victoria > Melbourne (0.04)
- Western Australia (0.04)
- New Zealand (0.04)
- Australia
- South America (0.04)
- Africa
- Genre:
- Research Report (0.83)
- Industry:
- Education (1.00)
- Government > Regional Government
- Europe Government (0.46)
- North America Government > United States Government (0.46)
- Health & Medicine > Therapeutic Area (0.67)
- Law (0.93)
- Leisure & Entertainment (1.00)
- Media (1.00)
- Technology: