[论文解读] AutoDefense: Multi-Agent LLM Defense against Jailbreak Attacks
AutoDefense 是一个响应过滤的多代理框架,通过协同分析和过滤有害输出来防御 LLMs 免受 jailbreak 提示的攻击,从而在提高鲁棒性的同时保留正常使用。
Despite extensive pre-training in moral alignment to prevent generating harmful information, large language models (LLMs) remain vulnerable to jailbreak attacks. In this paper, we propose AutoDefense, a multi-agent defense framework that filters harmful responses from LLMs. With the response-filtering mechanism, our framework is robust against different jailbreak attack prompts, and can be used to defend different victim models. AutoDefense assigns different roles to LLM agents and employs them to complete the defense task collaboratively. The division in tasks enhances the overall instruction-following of LLMs and enables the integration of other defense components as tools. With AutoDefense, small open-source LMs can serve as agents and defend larger models against jailbreak attacks. Our experiments show that AutoDefense can effectively defense against different jailbreak attacks, while maintaining the performance at normal user request. For example, we reduce the attack success rate on GPT-3.5 from 55.74% to 7.95% using LLaMA-2-13b with a 3-agent system. Our code and data are publicly available at https://github.com/XHMY/AutoDefense.
研究动机与目标
- 在不同 LLM 尺度和对齐方式下,推动对 jailbreak 攻击的强鲁棒保护。
- 提出一种灵活的、与模型无关的防御,使用多个 LLM 代理来过滤响应。
- 使将更多防御组件集成为框架内的代理成为可能。
提出的方法
- 实现一个三组件防御管线:输入代理、防御机构(多代理)和输出代理。
- 将防御分解为意图分析、提示推断和最终判断,跨越一个到三个 LLM 代理,并由协调器协调。
- 使用类似 Cot 的结构化提示方法和代理提示来引导子任务。
- 使用有害提示和安全提示进行评估,以衡量 ASR、FPR 和准确度。
- 展示跨越模型的可扩展性,如 GPT-3.5 以及像 LLaMA-2 变体这样的开源 LLM。
- 证明增加代理可以降低 ASR,同时对安全内容的影响保持在较低水平。
实验结果
研究问题
- RQ1多代理防御能否在不同的 LLMs 间可靠地降低 jailbreak 攻击的成功率?
- RQ2增加防御代理数量是否在不扩大误报的前提下提升鲁棒性和准确性?
- RQ3该框架在作为额外代理集成其他防御组件方面的能力如何?
- RQ4对正常提示而言,防御强度(ASR)与副作用(FPR)之间的权衡是什么?
主要发现
- AutoDefense 在多种 LLMs 和攻击方法下显著降低 jailbreak 的 ASR。
- 三代理配置通常在降低 ASR 和保持 FPR 方面优于单代理设置。
- 使用开源、较小的 LLM(如 LLaMA-2-13b)在成本较低、推理更快的情况下实现了具有竞争力的防御性能。
- 再添加一个额外的 Llama Guard 代理可以显著降低 FPR,同时将 ASR 维持在具有竞争力的水平。
- 该框架具可扩展性,可以并入额外的防御代理以进一步提高安全指标。
- 经验结果显示高防御准确率(例如在某个设置中为 92.91%),对正常用户请求的影响很少。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。