DrAttack: Prompt Decomposition and Reconstruction Makes Powerful LLM Jailbreakers
作者: Xirui Li, Ruochen Wang, Minhao Cheng, Tianyi Zhou, Cho-Jui Hsieh
分类: cs.CR, cs.AI, cs.CL
发布日期: 2024-02-25 (更新: 2024-11-11)
🔗 代码/项目: GITHUB
💡 一句话要点
提出DrAttack以解决大型语言模型的监狱突破问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 监狱突破 提示分解 对抗性攻击 安全性测试
📋 核心要点
- 现有的监狱突破方法难以有效隐藏恶意意图,容易被检测和拒绝。
- 论文提出通过将恶意提示分解为多个子提示来模糊其意图,并使用同义词搜索增强攻击效果。
- 实验表明,DrAttack在多个LLMs上显著提高了成功率,尤其在GPT-4上表现突出。
📝 摘要(中文)
大型语言模型(LLMs)的安全对齐容易受到手动和自动化的监狱突破攻击,这些攻击会诱导LLMs输出有害内容。然而,现有的监狱突破方法通过嵌套整个有害提示,难以有效隐藏恶意意图,容易被良好对齐的LLMs识别和拒绝。本文发现,将恶意提示分解为独立的子提示可以有效模糊其潜在的恶意意图。我们提出了一种自动提示分解与重构框架(DrAttack),其包含三个关键组件:原始提示的分解、通过上下文学习隐式重构子提示,以及对子提示的同义词搜索。广泛的实证研究表明,DrAttack在多个开源和闭源LLMs上显著提高了成功率,尤其在仅使用15个查询时,GPT-4的成功率达到78.0%,比之前的研究提高了33.1%。
🔬 方法详解
问题定义:论文要解决的问题是现有监狱突破方法无法有效隐藏恶意意图,导致容易被检测和拒绝。现有方法通常将整个恶意提示嵌套在一起,缺乏灵活性和隐蔽性。
核心思路:论文的核心解决思路是将恶意提示分解为多个子提示,以呈现出更为分散且不易被检测的形式,从而模糊其恶意意图。通过这种方式,攻击者可以更有效地诱导LLMs输出有害内容。
技术框架:DrAttack的整体架构包括三个主要模块:首先是对原始提示的分解,将其拆分为多个子提示;其次是通过上下文学习隐式重构这些子提示,使用语义相似但无害的示例进行重组;最后是对子提示进行同义词搜索,以找到保持原意的同义词,从而增强攻击效果。
关键创新:最重要的技术创新点在于提示的分解与重构策略,这与现有方法的本质区别在于,DrAttack通过分散提示内容来降低被检测的风险,而不是简单地嵌套恶意提示。
关键设计:在设计中,DrAttack使用了特定的参数设置和损失函数,以确保重构的子提示在语义上与原始提示一致,同时又不易被检测。网络结构方面,采用了上下文学习机制,以便在重构过程中保持语义的连贯性。
🖼️ 关键图片
📊 实验亮点
实验结果显示,DrAttack在仅使用15个查询的情况下,成功率达到78.0%,相比之前的研究提高了33.1%。这一显著提升表明,DrAttack在有效性和效率上均优于现有的提示攻击方法。
🎯 应用场景
该研究的潜在应用领域包括安全性测试、对抗性攻击研究以及大型语言模型的安全防护。通过提升对抗攻击的成功率,DrAttack可以帮助研究人员更好地理解和改进LLMs的安全性,进而推动更安全的AI系统的开发与应用。
📄 摘要(原文)
The safety alignment of Large Language Models (LLMs) is vulnerable to both manual and automated jailbreak attacks, which adversarially trigger LLMs to output harmful content. However, current methods for jailbreaking LLMs, which nest entire harmful prompts, are not effective at concealing malicious intent and can be easily identified and rejected by well-aligned LLMs. This paper discovers that decomposing a malicious prompt into separated sub-prompts can effectively obscure its underlying malicious intent by presenting it in a fragmented, less detectable form, thereby addressing these limitations. We introduce an automatic prompt \textbf{D}ecomposition and \textbf{R}econstruction framework for jailbreak \textbf{Attack} (DrAttack). DrAttack includes three key components: (a)
Decomposition' of the original prompt into sub-prompts, (b)Reconstruction' of these sub-prompts implicitly by in-context learning with semantically similar but harmless reassembling demo, and (c) a `Synonym Search' of sub-prompts, aiming to find sub-prompts' synonyms that maintain the original intent while jailbreaking LLMs. An extensive empirical study across multiple open-source and closed-source LLMs demonstrates that, with a significantly reduced number of queries, DrAttack obtains a substantial gain of success rate over prior SOTA prompt-only attackers. Notably, the success rate of 78.0\% on GPT-4 with merely 15 queries surpassed previous art by 33.1\%. The project is available at https://github.com/xirui-li/DrAttack.