arXiv:2508.09019cs.AI2025-08

通过操控模型内部激活,实时消除性别、种族等偏见。

Activation Steering for Bias Mitigation: An Interpretable Approach to Safer LLMs

  • 用线性探测器识别模型深层中的偏见表征。
  • 在GPT2-large上实现近完美偏见检测,且偏见在后期层最显著。
  • 生成时添加调节向量,可实时抑制刻板内容输出。

随着大语言模型(LLMs)深入社会系统,其放大和传播有害偏见的风险日益成为关键安全问题。传统方法依赖数据过滤或事后输出修正,将模型视为黑箱。本文提出一个端到端系统,结合机制可解释性技术,直接在模型内部识别并主动缓解偏见。首先,在 exttt{gpt2-large} 上训练线性探测器,分析模型内部激活,发现性别、种族、年龄等偏见的潜在表征。实验表明,这些探测器近乎完美地识别了偏见内容,且偏见信号在模型后期层最为显著。其次,基于此发现,通过对比有偏与中性语句的激活模式,计算出“调节向量”。推理时叠加该向量,可实时引导生成过程远离刻板或有害内容。实验证明该方法能有效将偏见输出转向更中性的替代表达。本工作提供了一套可复现、可解释的方案,推动更安全、可问责的LLM发展。

原文摘要 · Abstract (English)

As large language models (LLMs) become more integrated into societal systems, the risk of them perpetuating and amplifying harmful biases becomes a critical safety concern. Traditional methods for mitigating bias often rely on data filtering or post-hoc output moderation, which treat the model as an opaque black box. In this work, we introduce a complete, end-to-end system that uses techniques from mechanistic interpretability to both identify and actively mitigate bias directly within a model's internal workings. Our method involves two primary stages. First, we train linear "probes" on the internal activations of a model to detect the latent representations of various biases (e.g., gender, race, age). Our experiments on \texttt{gpt2-large} demonstrate that these probes can identify biased content with near-perfect accuracy, revealing that bias representations become most salient in the model's later layers. Second, we leverage these findings to compute "steering vectors" by contrasting the model's activation patterns for biased and neutral statements. By adding these vectors during inference, we can actively steer the model's generative process away from producing harmful, stereotypical, or biased content in real-time. We demonstrate the efficacy of this activation steering technique, showing that it successfully alters biased completions toward more neutral alternatives. We present our work as a robust and reproducible system that offers a more direct and interpretable approach to building safer and more accountable LLMs.

偏见缓解可解释性生成控制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。