Debiasing LLMs by Masking Unfairness-Driving Attention Heads

Tingxu Han, Wei Song, Ziqi Ding, Ziming Li, Chunrong Fang, Yuekang Li, Dongfang Liu, Zhenyu Chen, Zhenting Wang


Abstract
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 of 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 component of the LLM and reduce measured unfairness by 391.9%- 534.5% in both one- 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, which identify bias heads through differential activation analysis between DA and CoT and selectively mask only those heads. DiffHeads reduces unfairness by 49.4%, and 40.3% under DA and CoT, respectively, without harming model utility.
Anthology ID:
2026.findings-acl.1893
Volume:
Findings of the Association for Computational Linguistics: ACL 2026
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
37980–37992
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1893/
DOI:
Bibkey:
Cite (ACL):
Tingxu Han, Wei Song, Ziqi Ding, Ziming Li, Chunrong Fang, Yuekang Li, Dongfang Liu, Zhenyu Chen, and Zhenting Wang. 2026. Debiasing LLMs by Masking Unfairness-Driving Attention Heads. In Findings of the Association for Computational Linguistics: ACL 2026, pages 37980–37992, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
Debiasing LLMs by Masking Unfairness-Driving Attention Heads (Han et al., Findings 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1893.pdf
Checklist:
 2026.findings-acl.1893.checklist.pdf