arXiv:2508.20766cs.CLcs.AI2025-08被引 7

通过微小权重调整增强大模型拒绝有害请求的能力

Turning the Spell Around: Lightweight Alignment Amplification via Rank-One Safety Injection

  • 在残差流中注入单一安全方向,永久引导模型拒绝有害指令
  • 对Llama Guard 3测试显示拒绝率显著提升,且不影响模型通用能力
  • 无需微调即可修复未受控模型,适合最后阶段安全加固

大型语言模型的安全对齐通常依赖于内部表示的干预以拒绝有害请求。近期研究发现,通过删除特定表示方向可绕过这些安全机制。本文提出反向方法:秩一安全注入(ROSI),一种白盒方法,通过永久性地将模型激活值导向拒绝中介子空间来增强安全对齐。ROSI是一种简单的、无需微调的秩一权重修改,应用于所有残差流写入矩阵。所需安全方向可由少量有害与无害指令对计算得出。实验表明,ROSI在保持模型在MMLU、HellaSwag、Arc等基准上性能的同时,显著提升了其在Llama Guard 3评估下的拒绝率。此外,该方法还可通过放大‘未受控’模型自身的潜在安全方向实现重新对齐,证明其作为最后一道安全防线的有效性。结果表明,针对性且可解释的权重引导是一种低成本而高效的改进大模型安全性的机制,可补充更耗资源的微调范式。

原文摘要 · Abstract (English)

Safety alignment in Large Language Models (LLMs) often involves mediating internal representations to refuse harmful requests. Recent research has demonstrated that these safety mechanisms can be bypassed by ablating or removing specific representational directions within the model. In this paper, we propose the opposite approach: Rank-One Safety Injection (ROSI), a white-box method that amplifies a model's safety alignment by permanently steering its activations toward the refusal-mediating subspace. ROSI operates as a simple, fine-tuning-free rank-one weight modification applied to all residual stream write matrices. The required safety direction can be computed from a small set of harmful and harmless instruction pairs. We show that ROSI consistently increases safety refusal rates - as evaluated by Llama Guard 3 - while preserving the utility of the model on standard benchmarks such as MMLU, HellaSwag, and Arc. Furthermore, we show that ROSI can also re-align 'uncensored' models by amplifying their own latent safety directions, demonstrating its utility as an effective last-mile safety procedure. Our results suggest that targeted, interpretable weight steering is a cheap and potent mechanism to improve LLM safety, complementing more resource-intensive fine-tuning paradigms.

模型安全权重注入轻量级

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