Skip to main content
QUICK REVIEW

[论文解读] EasyJailbreak: A Unified Framework for Jailbreaking Large Language Models

Weikang Zhou, Xiao Wang|arXiv (Cornell University)|Mar 18, 2024
Digital and Cyber ForensicsComputer Science被引用 6
一句话总结

EasyJailbreak 引入了一个具有四个组件(Selector、Mutator、Constraint、Evaluator)的模块化框架,用以构建和评估针对大语言模型的越狱攻击,并报告在10个模型和11种方法中普遍存在的漏洞。

ABSTRACT

Jailbreak attacks are crucial for identifying and mitigating the security vulnerabilities of Large Language Models (LLMs). They are designed to bypass safeguards and elicit prohibited outputs. However, due to significant differences among various jailbreak methods, there is no standard implementation framework available for the community, which limits comprehensive security evaluations. This paper introduces EasyJailbreak, a unified framework simplifying the construction and evaluation of jailbreak attacks against LLMs. It builds jailbreak attacks using four components: Selector, Mutator, Constraint, and Evaluator. This modular framework enables researchers to easily construct attacks from combinations of novel and existing components. So far, EasyJailbreak supports 11 distinct jailbreak methods and facilitates the security validation of a broad spectrum of LLMs. Our validation across 10 distinct LLMs reveals a significant vulnerability, with an average breach probability of 60% under various jailbreaking attacks. Notably, even advanced models like GPT-3.5-Turbo and GPT-4 exhibit average Attack Success Rates (ASR) of 57% and 33%, respectively. We have released a wealth of resources for researchers, including a web platform, PyPI published package, screencast video, and experimental outputs.

研究动机与目标

  • 促使建立一个标准化、可扩展的框架,在不同模型上评估LLM越狱方法。
  • 提供一个模块化架构(Selector、Mutator、Constraint、Evaluator),实现攻击的复用和快速组合。
  • 基于实证评估多种LLM对一套越狱方法的安全性,并量化违规概率。
  • 提供工具(网页平台、PyPI包、实验)以帮助研究人员对LLM进行安全性验证。

提出的方法

  • 将越狱方法分解为四个组件:Selector 选择有前景的种子,Mutator 细化提示,Constraint 过滤无效输入,Evaluator 判断是否成功。
  • 在统一框架中实现的11种越狱方法,作为组件的组合来实现。
  • 在10个LLM(开源和闭源)及多种攻击上进行基准测试,以计算攻击成功率(ASR)。
  • 提供一个报告机制,详细说明ASR、提示、模型回复和评估结果。
  • 与 HuggingFace transformers 集成,以实现对广泛模型的兼容性,并包含一个网页平台和实验仓库。

实验结果

研究问题

  • RQ1在多样化的LLM集合中,越狱漏洞的普遍性和规模如何?
  • RQ2统一的、模块化框架是否能够实现对越狱攻击的标准化基准测试和比较?
  • RQ3不同越狱方法在各模型上的成功率和效率表现如何?
  • RQ4哪些工具对于研究人员在跨模型复现和扩展越狱评估时更为有效?

主要发现

  • 在10个模型和11种攻击中的平均违规概率为60%(在某些分析中为63%)。
  • 如 GPT-3.5-Turbo 和 GPT-4 等高级模型在聚合攻击下的ASR分别为57%和33%。
  • 闭源模型(如 GPT-3.5-Turbo、GPT-4)在评估中表现出比开源模型更低的平均ASR。
  • 模型大小并非统一提升安全性;对于某些族群,13B 变体有时比 7B 变体表现出更高的 ASR。
  • EasyJailbreak 在其框架中支持12种越狱攻击,并展示了广泛的模型兼容性(开源和闭源)。
  • 评估方法各异;在评估者中 GPT-4 实现最高的准确率/TPR/F1,但延迟较高。

阅读本论文

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

在 Nubint 中阅读本论文

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