arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2401.17263cs.LGcs.AIcs.CLcs.CV
收藏

鲁棒提示优化:防御语言模型免受越狱攻击

Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attacks

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Andy Zhou, Bo Li, Haohan Wang

AI总结:

提出鲁棒提示优化(RPO)算法,通过将对手纳入防御目标并优化轻量级可迁移后缀,防御LLM越狱攻击,在JailbreakBench上将GPT-4和Llama-2的ASR分别降至6%和0%。

摘要:

尽管人工智能对齐取得了进展,但大型语言模型(LLM)仍然容易受到对抗性攻击或越狱攻击的影响,其中攻击者可以修改提示以诱导模型产生不当行为。虽然已经提出了一些防御方法,但它们尚未适应新提出的攻击和更具挑战性的威胁模型。为了解决这个问题,我们提出了一种基于优化的目标,用于防御LLM免受越狱攻击,并设计了一种算法——鲁棒提示优化(RPO),以创建鲁棒的系统级防御。我们的方法直接将对手纳入防御目标,并优化一个轻量级且可迁移的后缀,使RPO能够适应最坏情况下的自适应攻击。我们的理论和实验结果表明,RPO在优化过程中见过的越狱攻击和未知越狱攻击上均表现出更强的鲁棒性,将JailbreakBench上GPT-4的攻击成功率(ASR)降低至6%,Llama-2降低至0%,达到了最先进的水平。代码可在https://github.com/lapisrocks/rpo获取。

英文摘要:

Despite advances in AI alignment, large language models (LLMs) remain vulnerable to adversarial attacks or jailbreaking, in which adversaries can modify prompts to induce unwanted behavior. While some defenses have been proposed, they have not been adapted to newly proposed attacks and more challenging threat models. To address this, we propose an optimization-based objective for defending LLMs against jailbreaking attacks and an algorithm, Robust Prompt Optimization (RPO) to create robust system-level defenses. Our approach directly incorporates the adversary into the defensive objective and optimizes a lightweight and transferable suffix, enabling RPO to adapt to worst-case adaptive attacks. Our theoretical and experimental results show improved robustness to both jailbreaks seen during optimization and unknown jailbreaks, reducing the attack success rate (ASR) on GPT-4 to 6% and Llama-2 to 0% on JailbreakBench, setting the state-of-the-art. Code can be found at https://github.com/lapisrocks/rpo

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

↑