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

安全对齐不应仅停留在前几个 token 的深度

Safety Alignment Should Be Made More Than Just a Few Tokens Deep

Princeton University(普林斯顿大学);Google DeepMind(谷歌DeepMind)

Xiangyu Qi, Ashwinee Panda, Kaifeng Lyu, Xiao Ma, Subhrajit Roy, Ahmad Beirami, Prateek Mittal, Peter Henderson

AI总结:

本文提出浅层安全对齐概念,揭示当前 LLM 安全对齐主要只作用于前几个 token 而导致多种攻击漏洞,并通过加深对齐与正则化微调提升鲁棒性。

摘要:

当前大语言模型(LLMs)的安全对齐是脆弱的。相对简单的攻击,甚至良性的微调,都可能使已对齐的模型越狱。我们认为,许多此类漏洞都与一个共同的深层问题有关:安全对齐可能走捷径,即对齐主要只在模型最初输出的少数几个 token 上调整其生成分布。我们将这一问题称为浅层安全对齐。在本文中,我们通过案例研究解释浅层安全对齐为何会存在,并提供证据表明当前已对齐的 LLMs 确实存在这一问题。我们还展示了这些发现如何有助于解释近期在 LLMs 中发现的多个漏洞,包括对对抗性后缀攻击、预填充攻击、解码参数攻击和微调攻击的易感性。重要的是,我们讨论了这一关于浅层安全对齐的统一认识如何为缓解这些漏洞指明有前景的研究方向。例如,我们表明将安全对齐加深到前几个 token 之外,通常能够显著提高对某些常见攻击手段的鲁棒性。最后,我们设计了一个正则化微调目标,通过约束对初始 token 的更新,使安全对齐在面对微调攻击时更加持久。总体而言,我们主张未来的安全对齐不应仅停留在前几个 token 的深度。

英文摘要:

The safety alignment of current Large Language Models (LLMs) is vulnerable. Relatively simple attacks, or even benign fine-tuning, can jailbreak aligned models. We argue that many of these vulnerabilities are related to a shared underlying issue: safety alignment can take shortcuts, wherein the alignment adapts a model's generative distribution primarily over only its very first few output tokens. We refer to this issue as shallow safety alignment. In this paper, we present case studies to explain why shallow safety alignment can exist and provide evidence that current aligned LLMs are subject to this issue. We also show how these findings help explain multiple recently discovered vulnerabilities in LLMs, including the susceptibility to adversarial suffix attacks, prefilling attacks, decoding parameter attacks, and fine-tuning attacks. Importantly, we discuss how this consolidated notion of shallow safety alignment sheds light on promising research directions for mitigating these vulnerabilities. For instance, we show that deepening the safety alignment beyond just the first few tokens can often meaningfully improve robustness against some common exploits. Finally, we design a regularized finetuning objective that makes the safety alignment more persistent against fine-tuning attacks by constraining updates on initial tokens. Overall, we advocate that future safety alignment should be made more than just a few tokens deep.

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

↑