arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2506.12880cs.CR
收藏

通用劫持后缀是强大的注意力劫持者

Universal Jailbreak Suffixes Are Strong Attention Hijackers

Blavatnik School of Computer Science and AI, Tel Aviv University(特拉维夫大学布拉瓦特尼克计算机科学与人工智能学院)

Matan Ben-Tov, Mor Geva, Mahmood Sharif

AI总结:

本文研究了基于后缀的劫持攻击,发现通用后缀能更有效地劫持LLM的上下文化过程,并提出通过提升后缀普遍性来增强攻击效果,同时提供缓解方法。

摘要:

我们研究基于后缀的劫持攻击——一种针对大型语言模型(LLMs)的强大攻击家族,通过优化对抗性后缀来绕过安全对齐。聚焦于广泛使用的基础GCG攻击,我们发现后缀在效果上存在差异:一些后缀明显更具普遍性——能够泛化到许多未见过的有害指令——而另一些则不然。我们首先证明,一个浅层但关键的机制驱动了GCG的有效性。该机制基于对抗性后缀到最终聊天模板令牌在生成前的信息流。量化该机制在生成过程中的主导地位,我们发现GCG不规则且激进地劫持了上下文化过程。关键的是,我们将劫持与普遍性现象联系起来,更普遍的后缀是更强的劫持者。随后,我们展示这些见解具有实际意义:GCG的普遍性可以高效提升(在某些情况下可达×5),且无需额外计算成本,也可以被外科手术式地缓解,至少将攻击的成功率减半,同时造成最小的实用性损失。我们发布代码和数据在http://github.com/matanbt/interp-jailbreak。

英文摘要:

We study suffix-based jailbreaks$\unicode{x2013}$a powerful family of attacks against large language models (LLMs) that optimize adversarial suffixes to circumvent safety alignment. Focusing on the widely used foundational GCG attack, we observe that suffixes vary in efficacy: some are markedly more universal$\unicode{x2013}$generalizing to many unseen harmful instructions$\unicode{x2013}$than others. We first show that a shallow, critical mechanism drives GCG's effectiveness. This mechanism builds on the information flow from the adversarial suffix to the final chat template tokens before generation. Quantifying the dominance of this mechanism during generation, we find GCG irregularly and aggressively hijacks the contextualization process. Crucially, we tie hijacking to the universality phenomenon, with more universal suffixes being stronger hijackers. Subsequently, we show that these insights have practical implications: GCG's universality can be efficiently enhanced (up to $\times$5 in some cases) at no additional computational cost, and can also be surgically mitigated, at least halving the attack's success with minimal utility loss. We release our code and data at http://github.com/matanbt/interp-jailbreak.

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

↑