arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.28153cs.CRcs.AI
收藏

越狱攻击下的鲁棒有害特征:来自大型语言模型中注意力头特化的机制证据

Robust Harmful Features Under Jailbreak Attacks: Mechanistic Evidence from Attention Head Specialization in Large Language Models

Yanchen Yin, Dongqi Han, Linghui Li

AI总结:

通过分析注意力头特化,发现越狱攻击通过抑制早期层的对抗妥协头(ACHs)绕过安全对齐,而中间层的安全对齐头(SAHs)保持鲁棒激活,揭示了鲁棒有害特征现象,并利用这些持久激活实现无需训练的检测。

摘要:

越狱攻击绕过LLM的安全对齐,但其机制仍不清楚。我们提供证据表明,攻击并非全面消除安全特征,而是选择性地抑制特定的注意力头。我们识别出两种功能分化的类型:集中在早期层的对抗妥协头(ACHs)在攻击下被抑制,以及中间层的安全对齐头(SAHs)即使在攻击成功时也保持鲁棒激活。消融研究支持ACHs的因果作用和SAHs对鲁棒激活的贡献:抑制少量ACHs足以在正常拒绝的输入上诱导类似越狱的行为,而移除SAHs则显著削弱中间层的安全激活。令牌级归因进一步表明,ACH抑制是由攻击模板令牌驱动的,这提供了机制解释,说明为何攻击可以通过ACH抑制绕过拒绝决策,同时由SAHs维持的内部安全信号仍然存在——我们将此现象称为鲁棒有害特征。为了验证这种鲁棒性的实际意义,我们表明,仅读取这些持久激活(无需任何训练)即可获得具有强对抗鲁棒性的竞争性聚合检测性能。

英文摘要:

Jailbreak attacks bypass LLM safety alignment, yet their mechanisms remain poorly understood. We provide evidence that attacks do not comprehensively eliminate safety features, but instead selectively suppress specific attention heads. We identify two functionally differentiated types: Adversarially Compromised Heads (ACHs) concentrated in early layers, which are suppressed under attacks, and Safety-Aligned Heads (SAHs) in mid-layers, which maintain robust activations even when attacks succeed. Ablation studies support the causal role of ACHs and the contribution of SAHs to robust activations: suppressing a small number of ACHs is sufficient to induce jailbreak-like behavior on normally refused inputs, while removing SAHs substantially weakens mid-layer safety activations. Token-level attribution further shows that ACH suppression is driven specifically by attack-template tokens, providing a mechanistic account of why attacks can bypass refusal decisions through ACH suppression while leaving internal safety signals sustained by SAHs -- a phenomenon we term Robust Harmful Features. To validate the practical significance of this robustness, we show that simply reading these persistent activations -- without any training -- yields competitive aggregate detection performance with strong adversarial robustness.

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

↑