通过屏蔽驱动不公平性的注意力头来消除LLMs的偏见
Debiasing LLMs by Masking Unfairness-Driving Attention Heads
AI总结:
本文提出轻量级去偏见框架DiffHeads,通过差异激活分析识别并选择性屏蔽LLM中驱动不公平性的注意力头,在不损害模型效用的前提下显著降低偏见。
摘要:
大型语言模型(LLMs)越来越多地在那些对人口群体不公平对待是不可接受的领域中调节决策。现有工作探究了偏见输出何时出现,但对生成它们的机制提供的见解甚少,使得现有的缓解措施在很大程度上很脆弱。在本文中,我们对LLM不公平性进行了系统调查,并提出了DiffHeads,一个用于LLMs的轻量级去偏见框架。我们首先在八个代表性的开源和闭源LLMs上比较了直接回答(DA)提示与思维链(CoT)提示。DA会触发LLM的自然偏见部分,并在单轮和双轮对话中使测得的不公平性增加534.5%-391.9%。接下来,我们定义了一个token到头的贡献分数,将每个token的影响追溯回各个注意力头。这揭示了一小簇偏见头,它们在DA下激活,但在CoT下基本保持休眠,提供了提示策略与偏见出现之间的首个因果联系。最后,基于这一见解,我们提出了DiffHeads,它通过DA和CoT之间的差异激活分析来识别偏见头,并选择性地仅屏蔽这些头。DiffHeads在不损害模型效用的情况下,分别在DA和CoT下将不公平性降低了49.4%和40.3%。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。