Aligning Language Models Towards Counterfactual Invariance
Basar Demir, Emily Shen, Ksheeraj Sai Vepuri, Sourabh Kulkarni, Harihar Subramanyam, Ankit Jain, Nan Jiang, Chirag Nagpal
Abstract
Small variations in prompt characteristics can meaningfully alter the semantics, tone, and contextual assumptions of large language model outputs. Such characteristics can involve group variables such as demographics or other sensitive latent attributes. Sensitivity to such input variables is undesirable when demographic information is causally irrelevant to the task, but might still be relevant for generation of semantically coherent responses. This makes the task of enforcing counterfactual invariance while preserving model utility difficult. To study this problem, we first show that standard model alignment recipes (such as reinforcement learning) increase differences in response quality across demographics, while improving overall response quality, ultimately amplifying what is known as counterfactual bias. To address this, we develop a policy gradient technique involving a group-level reward function that operates on matched pairs of counterfactual prompts. For completeness, we build a dataset of controlled counterfactual prompt pairs and design an evaluation that separately measures cases where demographic information is causally relevant to the answer. Finally, we validate our findings on several fairness benchmarks. We demonstrate that our methods reduce counterfactual differences while preserving overall response quality and that the models continue to adapt appropriately when such sensitive information is relevant.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.LG
Related papers
What If Chinese Were Latinized? A Counterfactual Study of Input Representation, Tokenization, and Language Modeling
Shared title terminologycs.CLZijie Zheng, Ej Zhou
Towards Figurative Language Understanding in Moroccan Darija: An Evaluation of Large Language Models
Shared title terminologycs.CLJihad R'baiti, Youssef Hmamouche, Emmanuele Chersoni et al.
Aligning Cultural Behaviors in Arabic Language Models via Preferences
Shared title terminologycs.CLJunhong Liang, Daniil Orel, Saeed Almheiri et al.
What Shapes Brain Alignment of Large Language Models during Dialogue? Insights from Language Production and Comprehension
Shared title terminologycs.CLYuko Nakagi, Yuya Chiba, Yasue Kishino
ASCENT: A Benchmark for Evaluating and Advancing Stepwise Diagnostic Reasoning in Large Language Models on Common Clinical Scenarios
Shared title terminologycs.CLYera Choi, Yeong Hwa Kim, Jaedeok Lee et al.
Social Bias Neurons in Multilingual Language Models: A Mechanistic Interpretability Analysis
Shared title terminologycs.CLLance Calvin Lim Gamboa, Yue Feng, Mark Lee