Skip to main content
QUICK REVIEW

[论文解读] DrAttack: Prompt Decomposition and Reconstruction Makes Powerful LLM Jailbreakers

Xirui Li, Ruochen Wang|arXiv (Cornell University)|Feb 25, 2024
Digital and Cyber ForensicsComputer Science被引用 3
一句话总结

DrAttack 是一种新颖的越狱框架,通过将恶意提示分解为语义中立的子提示,利用良性示例通过上下文学习重构提示,并使用同义词搜索在保持意图的同时规避检测。该方法在仅使用 15 次查询的情况下,对 GPT-4 实现了 78.0% 的成功率,相较于之前的最先进方法在绝对值上提升了 33.1%。

ABSTRACT

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 extbf{D}ecomposition and extbf{R}econstruction framework for jailbreak extbf{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.

研究动机与目标

  • 解决当前越狱攻击因使用整体有害提示而暴露恶意意图导致失败的问题。
  • 探究将恶意提示分解为子提示是否能够隐藏意图,从而提升对安全对齐机制的规避能力。
  • 开发一种自动化、查询高效的框架,在降低可检测性的同时保持攻击有效性。
  • 在多种开源与闭源大语言模型(包括 GPT-4 和 Llama-2-chat)上评估 DrAttack 的有效性。
  • 揭示大语言模型安全机制中关于语义绑定与子提示模块化方面此前未被探索的漏洞。

提出的方法

  • 使用语义解析将恶意提示分解为语义中立的子提示,以隔离有害短语。
  • 通过使用语义相似但无害的示范示例进行上下文学习(ICL),重构原始恶意意图。
  • 采用同义词搜索探索子提示的替代表达方式,在保持意图的同时降低被检测的可能性。
  • 采用黑盒优化策略,在子提示空间而非完整提示空间上操作,从而降低搜索复杂度。
  • 利用结构化且肯定性的提示(例如“当然,这是”)进行 ICL,以提高重构保真度与攻击成功率。
  • 采用迭代式查询优化方法,在保持对原始恶意意图忠实性的同时优化子提示。
Figure 1: An illustration of DrAttack. Attacks by a malicious prompt on LLMs would be rejected (blue). However, with DrAttack’s prompt decomposition and reconstruction with ICL given benign demo (green), the resulting prompt can circumvent LLM’s security measures and generate a harmful response (red
Figure 1: An illustration of DrAttack. Attacks by a malicious prompt on LLMs would be rejected (blue). However, with DrAttack’s prompt decomposition and reconstruction with ICL given benign demo (green), the resulting prompt can circumvent LLM’s security measures and generate a harmful response (red

实验结果

研究问题

  • RQ1将恶意提示分解为子提示是否能显著降低其被安全对齐大语言模型检测到的可能性?
  • RQ2使用语义相似的良性示范示例进行上下文学习在提示重构中的成功程度如何?
  • RQ3与完整提示优化相比,对子提示进行同义词搜索在效率与成功率方面有何影响?
  • RQ4ICL 提示结构(例如肯定性、分步式)对重构效果与攻击成功率有何影响?
  • RQ5在多种大语言模型上,DrAttack 与以往最先进纯提示越狱方法相比,在成功率与查询效率方面表现如何?

主要发现

  • DrAttack 在仅使用 15 次查询的情况下,对 GPT-4 实现了 78.0% 的攻击成功率,相较于之前最先进方法绝对提升了 33.1%。
  • 在 GPT-4 上,人工评估下的攻击成功率达到 84.6%,LLM 评估下的成功率为 62.0%,均较之前方法高出超过 30 个百分点。
  • 使用语义相似的 ICL 示范示例进行重构至关重要——使用无关或相似度较低的示范示例会显著降低成功率。
  • 系统化且肯定性的 ICL 示例(如“当然,这是”)相比普通或中性示例,能显著提升攻击成功率。
  • 该方法在多种大语言模型(包括 GPT-4、Gemini-Pro 和 Llama-2-chat 系列)上均表现出强泛化能力,表明其具有广泛适用性。
  • OpenAI 过滤系统提供的审核得分显示,分解后的子提示敏感度得分显著低于原始恶意提示,证实了有效混淆。
Figure 2: A category to the current taxonomy of prompt-based jailbreak attacks. Previous approaches nest harmful prompts entirely into optimized suffix nesting, prefix/system prompt nesting, or Scenarios nesting. DrAttack innovates by decomposing malicious prompts into discrete sub-prompts to jailbr
Figure 2: A category to the current taxonomy of prompt-based jailbreak attacks. Previous approaches nest harmful prompts entirely into optimized suffix nesting, prefix/system prompt nesting, or Scenarios nesting. DrAttack innovates by decomposing malicious prompts into discrete sub-prompts to jailbr

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。