arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.12347cs.CL
收藏

解读大语言模型中的偏见:一种基于特征的方法

Interpreting Bias in Large Language Models: A Feature-Based Approach

Singapore University of Technology and Design(新加坡科技设计大学)

Nirmalendu Prakash, Lee Ka Wei Roy

AI总结:

该研究提出基于特征的大语言模型偏见分析方法,验证了偏见相关特征演化假设,区分了MLP与注意力头的偏见传播作用并实现针对性去偏,深化了对偏见机制的理解。

摘要:

大语言模型(LLM)如Mistral和LLaMA已在各类自然语言处理(NLP)任务中展现出卓越性能。尽管取得了成功,这些模型仍从其训练所用的多样化数据集中继承了社会偏见。本文通过一种新颖的基于特征的分析方法,探究LLM内部偏见的传播机制。受因果中介分析启发,我们提出了偏见相关特征演化的假设,并利用激活修补、归因修补等可解释性技术对其进行验证。我们的贡献有三方面:(1)提出并通过实验验证了一种用于LLM偏见分析的基于特征的方法,该方法应用于LLaMA-2-7B、LLaMA-3-8B和Mistral-7B-v0.3,使用了来自职业数据集的模板。(2)将该方法拓展至另一种形式的性别偏见,证明了其泛化性。(3)区分了多层感知机(MLP)和注意力头在偏见传播中的作用,并利用反事实数据集实现了针对性去偏。我们的发现揭示了LLM中偏见的复杂特性,强调了定制化去偏策略的必要性,为深入理解偏见机制及有效缓解路径提供了参考。

英文摘要:

Large Language Models (LLMs) such as Mistral and LLaMA have showcased remarkable performance across various natural language processing (NLP) tasks. Despite their success, these models inherit social biases from the diverse datasets on which they are trained. This paper investigates the propagation of biases within LLMs through a novel feature-based analytical approach. Drawing inspiration from causal mediation analysis, we hypothesize the evolution of bias-related features and validate them using interpretability techniques like activation and attribution patching. Our contributions are threefold: (1) We introduce and empirically validate a feature-based method for bias analysis in LLMs, applied to LLaMA-2-7B, LLaMA-3-8B, and Mistral-7B-v0.3 with templates from a professions dataset. (2) We extend our method to another form of gender bias, demonstrating its generalizability. (3) We differentiate the roles of MLPs and attention heads in bias propagation and implement targeted debiasing using a counterfactual dataset. Our findings reveal the complex nature of bias in LLMs and emphasize the necessity for tailored debiasing strategies, offering a deeper understanding of bias mechanisms and pathways for effective mitigation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑