Debiasing LLMs by Masking Unfairness-Driving Attention Heads
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) increasingly mediate decisions in domains where unfair treatment of demographic groups is unacceptable. Existing work probes when biased outputs appear, but gives little insight into the mechanisms that generate them, leaving existing mitigations largely fragile. In this paper, we conduct a systematic investigation LLM unfairness and propose DiffHeads, a lightweight debiasing framework for LLMs. We first compare Direct-Answer (DA) prompting to Chain-of-Thought (CoT) prompting across eight representative open- and closed-source LLMs. DA will trigger the nature bias part of LLM and improve measured unfairness by 534.5%-391.9% in both one-turn and two-turn dialogues. Next, we define a token-to-head contribution score that traces each token's influence back to individual attention heads. This reveals a small cluster of bias heads that activate under DA but stay largely dormant with CoT, providing the first causal link between prompting strategy and bias emergence. Finally, building on this insight, we propose DiffHeads that identifies bias heads through differential activation analysis between DA and CoT, and selectively masks only those heads. DiffHeads reduces unfairness by 49.4%, and 40.3% under DA and CoT, respectively, without harming model utility.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 20 of its 38 references that are in the map. First posted on arXiv 11 Oct 2025.
Builds on
20 of 38 references.
References · 20
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Qwen Technical Reportcited by 3,344
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2021Self-Diagnosis and Self-Debiasing: A Proposal for Reducing Corpus-Based Bias in NLPcited by 337
- 2024To CoT or not to CoT? Chain-of-thought helps mainly on math and symbolic reasoningcited by 263
- 2022On Second Thought, Let's Not Think Step by Step! Bias and Toxicity in Zero-Shot Reasoningcited by 194
- 2024Bias and Unfairness in Information Retrieval Systems: New Challenges in the LLM Eracited by 98
- 2024Self-Debiasing Large Language Models: Zero-Shot Recognition and Reduction of Stereotypescited by 59
- 2024Thinking Fair and Slow: On the Efficacy of Structured Prompts for Debiasing Language Modelscited by 45
- 2024MMLU-CF: A Contamination-free Multi-task Language Understanding Benchmarkcited by 41
8 more
- 2025FairSteer: Inference Time Debiasing for LLMs with Dynamic Activation Steeringcited by 40
- 2024Prompting Techniques for Reducing Social Bias in LLMs through System 1 and System 2 Cognitive Processescited by 39
- 2024FairMT-Bench: Benchmarking Fairness for Multi-turn Dialogue in Conversational LLMscited by 36
- 2023Social Bias Probing: Fairness Benchmarking for Language Modelscited by 32
- 2024From Sparse Dependence to Sparse Attention: Unveiling How Chain-of-Thought Enhances Transformer Sample Efficiencycited by 29
- 2024Exploring Safety-Utility Trade-Offs in Personalized Language Modelscited by 27
- 2023Fairness-Aware Structured Pruning in Transformerscited by 22
- 2023Bias A-head? Analyzing Bias in Transformer-Based Language Model Attention Headscited by 14
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024A Multi-LLM Debiasing Framework
- 2025FairCoder: Probing LLM Bias in High-Stakes Decision Making via Coding Tasks
- 2025Silenced Biases: The Dark Side LLMs Learned to Refuse
- 2025BiasFilter: An Inference-Time Debiasing Framework for Large Language Models
- 2024With a Grain of SALT: Are LLMs Fair Across Social Dimensions?
- 2026CogBias: Measuring and Mitigating Cognitive Bias in Large Language Models
- 2026Mechanics of Bias and Reasoning: Interpreting the Impact of Chain-of-Thought Prompting on Gender Bias in LLMs
- 2025Dissecting Bias in LLMs: A Mechanistic Interpretability Perspective