Skip to main content
QUICK REVIEW

[论文解读] Jailbreak Attacks and Defenses Against Large Language Models: A Survey

Sibo Yi, Yule Liu|arXiv (Cornell University)|Jul 5, 2024
Hate Speech and Cyberbullying DetectionComputer Science被引用 7
一句话总结

对LLMs的越狱攻击与防御方法的全面分类法,详述白盒/黑盒攻击、提示/模型防御,以及评估方法,并提供对攻击-防御关系和基准的见解。

ABSTRACT

Large Language Models (LLMs) have performed exceptionally in various text-generative tasks, including question answering, translation, code completion, etc. However, the over-assistance of LLMs has raised the challenge of "jailbreaking", which induces the model to generate malicious responses against the usage policy and society by designing adversarial prompts. With the emergence of jailbreak attack methods exploiting different vulnerabilities in LLMs, the corresponding safety alignment measures are also evolving. In this paper, we propose a comprehensive and detailed taxonomy of jailbreak attack and defense methods. For instance, the attack methods are divided into black-box and white-box attacks based on the transparency of the target model. Meanwhile, we classify defense methods into prompt-level and model-level defenses. Additionally, we further subdivide these attack and defense methods into distinct sub-classes and present a coherent diagram illustrating their relationships. We also conduct an investigation into the current evaluation methods and compare them from different perspectives. Our findings aim to inspire future research and practical implementations in safeguarding LLMs against adversarial attacks. Above all, although jailbreak remains a significant concern within the community, we believe that our work enhances the understanding of this domain and provides a foundation for developing more secure LLMs.

研究动机与目标

  • 提供一个系统性的越狱攻击方法分类(白盒和黑盒)以及防御方法(提示级和模型级)。
  • 将攻击和防御技术之间的关系映射,并识别防御的跨应用性。
  • 总结当前在越狱研究中使用的评估指标、基准和数据集。
  • 突出脆弱性和未来方向,以提升LLM的安全性与保安。

提出的方法

  • 将攻击方法分类为白盒(梯度基、 logits基、微调基)和黑盒(模板完成、提示改写、LLM基的生成)。
  • 将防御分类为提示级(检测、扰动、系统提示)和模型级(有监督微调、RLHF、梯度/对数分析、代理防御)。
  • 提供一个连贯的关系图(图1)和一个越狱攻击的分类法(图2)。
  • 调查各种子类,并给出代表性研究及其核心思想与结果。
  • 总结在越狱研究中使用的评估方法、指标和基准。
Figure 1 : The taxonomy and relationship of attack and defense methods.
Figure 1 : The taxonomy and relationship of attack and defense methods.

实验结果

研究问题

  • RQ1LLMs 越狱攻击方法的主要类别及子类别是什么?
  • RQ2提示级和模型级有哪些防御,它们与特定攻击之间的关系如何?
  • RQ3当前的评估方法如何评估越狱的有效性和安全鲁棒性?
  • RQ4各攻击类型的关键脆弱性有哪些,防御如何在不同攻击中泛化?
  • RQ5未来方向能否加强LLM对越狱的安全性?

主要发现

  • 越狱方法有效地分为白盒和黑盒两大类,涵盖梯度、对数、微调、模板完成、提示改写,以及LLM驱动生成等多个子类。
  • 防御在提示级(检测、扰动、系统提示)和模型级(有监督微调、RLHF、梯度/对数分析、代理防御)运作,且具有跨攻击的有效性。
  • 更新的攻击强调可读性强且高效的对抗性提示(AutoDAN、ARCA),并利用解码、多语言和代码相关漏洞绕过防护。
  • 基于微调的攻击在恶意数据相对较少的情况下对安全对齐的影响很大,给防御带来紧迫需求。
  • 情境与上下文越狱(情景嵌套、在-context 攻击)以及代码注入方法展示了超越直接提示操作的演变攻击面。
  • 密码和其他非自然语言提示格式(ASCII艺术、基于加密的提示)暴露了当前对非英语或编码输入的安全对齐的空白。
Figure 3 : A schematic diagram of gradient-based attack.
Figure 3 : A schematic diagram of gradient-based attack.

阅读本论文

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

在 Nubint 中阅读本论文

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