[Paper Review] AutoDefense: Multi-Agent LLM Defense against Jailbreak Attacks
AutoDefense is a response-filtering, multi-agent framework that defends LLMs against jailbreak prompts by collaboratively analyzing and filtering harmful outputs, improving robustness while preserving normal use.
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.
Motivation & Objective
- Motivate robust protection against jailbreak attacks despite varied LLM sizes and alignments.
- Propose a flexible, model-agnostic defense that uses multiple LLM agents to filter responses.
- Enable integration of additional defense components as agents within the framework.
Proposed method
- Implement a three-component defense pipeline: input agent, defense agency (multi-agent), and output agent.
- Decompose defense into intention analysis, prompt inference, and final judgment across one to three LLM agents with a coordinator.
- Use a Cot-like structured prompting approach and agent prompts to guide sub-tasks.
- Evaluate using harmful and safe prompts to measure ASR, FPR, and accuracy.
- Demonstrate scalability across models such as GPT-3.5 and open-source LLMs like LLaMA-2 variants.
- Show that adding agents reduces ASR while maintaining low impact on safe content.
Experimental results
Research questions
- RQ1Can a multi-agent defense reliably reduce jailbreak attack success rates across diverse LLMs?
- RQ2Does increasing the number of defense agents improve robustness and accuracy without inflating false positives?
- RQ3How well can the framework integrate other defense components as additional agents?
- RQ4What is the trade-off between defense strength (ASR) and side effects (FPR) for normal prompts?
Key findings
- AutoDefense significantly reduces jailbreak ASR across multiple LLMs and attack methods.
- Three-agent configurations generally outperform single-agent setups in reducing ASR and maintaining FPR.
- Using open-source, smaller LLMs (e.g., LLaMA-2-13b) achieves competitive defense performance with lower cost and faster inference.
- Adding an extra Llama Guard agent can substantially lower FPR while keeping ASR at competitive levels.
- The framework is extensible and can incorporate additional defense agents to further improve safety metrics.
- Empirical results show high defense accuracy (e.g., 92.91% in one setup) with minimal impact on normal user requests.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.