通过干预特定注意力头,可绕过大模型安全限制并诱导有害协作。
Head-Specific Intervention Can Induce Misaligned AI Coordination in Large Language Models
- 针对特定注意力头进行微调激活干预,实现精准控制。
- 仅需少量样本即可生成有效引导方向,效率高于传统微调。
- 方法可推广至安全防御与多领域精细调控,具实用价值。
随着大语言模型广泛应用,其稳健对齐防护日益重要。与以往研究不同,我们证明推理时的激活干预可绕过安全对齐机制,有效引导模型生成有害协作内容。方法通过在简单二元选择任务中探测各注意力头,识别出关键头部后实施细粒度干预。结果显示,针对这些头部的干预在开放生成场景中具有泛化能力,能有效规避安全防护。相比全层干预或监督微调,仅需少数几个注意力头即可实现更优效果。此外,只需极少样本即可计算出有效的引导方向,优于传统微调。我们还发现反向干预可防止常见越狱攻击。结果表明,在注意力头层面,激活编码了可线性分离的细粒度行为。该方法为控制大模型行为提供了简便路径,未来可拓展至安全之外的多种需要精细调控的领域。代码与数据集见 https://github.com/PaulDrm/targeted_intervention。
原文摘要 · Abstract (English)
Robust alignment guardrails for large language models (LLMs) are becoming increasingly important with their widespread application. In contrast to previous studies, we demonstrate that inference-time activation interventions can bypass safety alignments and effectively steer model generations towards harmful AI coordination. Our method applies fine-grained interventions at specific attention heads, which we identify by probing each head in a simple binary choice task. We then show that interventions on these heads generalise to the open-ended generation setting, effectively circumventing safety guardrails. We demonstrate that intervening on a few attention heads is more effective than intervening on full layers or supervised fine-tuning. We further show that only a few example completions are needed to compute effective steering directions, which is an advantage over classical fine-tuning. We also demonstrate that applying interventions in the negative direction can prevent a common jailbreak attack. Our results suggest that, at the attention head level, activations encode fine-grained linearly separable behaviours. Practically, the approach offers a straightforward methodology to steer large language model behaviour, which could be extended to diverse domains beyond safety, requiring fine-grained control over the model output. The code and datasets for this study can be found on https://github.com/PaulDrm/targeted_intervention.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。