通过模拟退火优化注意力头剪枝,显著降低大模型性别偏见。
Attention Pruning: Automated Fairness Repair of Language Models via Surrogate Simulated Annealing
- 用代理模型替代真实模型评估,加速搜索最优剪枝组合。
- 在不牺牲性能前提下,性别偏见最高减少40%。
- 适合关注模型公平性但无法重训练的部署场景。
本文探索将剪枝注意力头作为大语言模型(LLMs)后处理的偏见缓解方法。现代人工智能系统如大语言模型因在海量人类生成数据上训练,自然会继承并放大社会偏见。虽然修改训练数据和算法成本高昂,但通过选择性禁用预训练模型中的神经元和注意力头等后处理技术,可提供可行有效的公平性改进方案。然而,在参数量达十亿级的大模型中,识别最优剪枝参数子集面临组合爆炸难题,需高效平衡模型公平性与实用性之间的矛盾。为应对计算挑战,本文提出基于随机模拟退火的搜索式程序修复方法。由于在千亿参数模型中直接评估代价极高,我们构建了代理深度神经网络,以高效建模注意力头状态(激活/非激活)与其对应公平性/效用指标间的关系。从而可在代理模型上进行优化,而非直接在真实模型参数空间中搜索,有效识别出应被选择性剪枝的注意力头。本文提出注意力剪枝(Attention Pruning),一种基于代理模拟退火的公平性感知剪枝方法,可精准移除加剧偏见的注意力头,同时最小化对整体模型性能的影响。实验表明,该方法最多可实现40%的性别偏见降低,优于当前最先进偏见缓解策略。
原文摘要 · Abstract (English)
This paper explores pruning attention heads as a post-processing bias mitigation method for large language models (LLMs). Modern AI systems such as LLMs are expanding into sensitive social contexts where fairness concerns become especially crucial. Since LLMs develop decision-making patterns by training on massive datasets of human-generated content, they naturally encode and perpetuate societal biases. While modifying training datasets and algorithms is expensive and requires significant resources; post-processing techniques-such as selectively deactivating neurons and attention heads in pre-trained LLMs-can provide feasible and effective approaches to improve fairness. However, identifying the optimal subset of parameters to prune presents a combinatorial challenge within LLMs' immense parameter space, requiring solutions that efficiently balance competing objectives across the frontiers of model fairness and utility. To address the computational challenges, we explore a search-based program repair approach via randomized simulated annealing. Given the prohibitive evaluation costs in billion-parameter LLMs, we develop surrogate deep neural networks that efficiently model the relationship between attention head states (active/inactive) and their corresponding fairness/utility metrics. This allows us to perform optimization over the surrogate models and efficiently identify optimal subsets of attention heads for selective pruning rather than directly searching through the LLM parameter space. This paper introduces Attention Pruning, a fairness-aware surrogate simulated annealing approach to prune attention heads in LLMs that disproportionately contribute to bias while minimally impacting overall model utility. Our experiments show that Attention Pruning achieves up to $40\%$ reduction in gender bias and outperforms the state-of-the-art bias mitigation strategies.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。