Saved in:
Bibliographic Details
Main Authors: Han, Tingxu, Song, Wei, Ding, Ziqi, Li, Ziming, Fang, Chunrong, Li, Yuekang, Liu, Dongfang, Chen, Zhenyu, Wang, Zhenting
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2510.10142
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914129545003008
author Han, Tingxu
Song, Wei
Ding, Ziqi
Li, Ziming
Fang, Chunrong
Li, Yuekang
Liu, Dongfang
Chen, Zhenyu
Wang, Zhenting
author_facet Han, Tingxu
Song, Wei
Ding, Ziqi
Li, Ziming
Fang, Chunrong
Li, Yuekang
Liu, Dongfang
Chen, Zhenyu
Wang, Zhenting
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2510_10142
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Debiasing LLMs by Masking Unfairness-Driving Attention Heads
Han, Tingxu
Song, Wei
Ding, Ziqi
Li, Ziming
Fang, Chunrong
Li, Yuekang
Liu, Dongfang
Chen, Zhenyu
Wang, Zhenting
Computation and Language
Artificial Intelligence
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.
title Debiasing LLMs by Masking Unfairness-Driving Attention Heads
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2510.10142