[Paper Review] AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
AutoDAN automatically generates semantically meaningful jailbreak prompts using a hierarchical genetic algorithm, achieving higher attack strength and stealthiness than baselines while transferring to black-box models.
The aligned Large Language Models (LLMs) are powerful language understanding and decision-making tools that are created through extensive alignment with human feedback. However, these large models remain susceptible to jailbreak attacks, where adversaries manipulate prompts to elicit malicious outputs that should not be given by aligned LLMs. Investigating jailbreak prompts can lead us to delve into the limitations of LLMs and further guide us to secure them. Unfortunately, existing jailbreak techniques suffer from either (1) scalability issues, where attacks heavily rely on manual crafting of prompts, or (2) stealthiness problems, as attacks depend on token-based algorithms to generate prompts that are often semantically meaningless, making them susceptible to detection through basic perplexity testing. In light of these challenges, we intend to answer this question: Can we develop an approach that can automatically generate stealthy jailbreak prompts? In this paper, we introduce AutoDAN, a novel jailbreak attack against aligned LLMs. AutoDAN can automatically generate stealthy jailbreak prompts by the carefully designed hierarchical genetic algorithm. Extensive evaluations demonstrate that AutoDAN not only automates the process while preserving semantic meaningfulness, but also demonstrates superior attack strength in cross-model transferability, and cross-sample universality compared with the baseline. Moreover, we also compare AutoDAN with perplexity-based defense methods and show that AutoDAN can bypass them effectively.
Motivation & Objective
- Assess limitations of existing jailbreak methods (scalability and stealthiness).
- Propose an automated method to generate stealthy jailbreak prompts.
- Leverage handcrafted prompts as initialization to guide genetic search.
- Develop a hierarchical genetic algorithm tailored to structured discrete text data.
- Evaluate transferability, universality, and defense evasion against perplexity-based defenses.
Proposed method
- Initialize search with handcrafted jailbreak prompts to form a diverse starting population.
- Define a fitness function using the negative log-likelihood of the target jailbreak responses.
- Use a hierarchical genetic algorithm (AutoDAN-HGA) with sentence-level and paragraph-level crossover/mutation.
- Incorporate LLM-based mutation to diversify prompts while preserving semantics.
- Employ momentum-based word scoring to guide fine-grained word substitutions.
- Terminate based on iterations or detection of refusal signals in model responses.
Experimental results
Research questions
- RQ1Can an automated method generate stealthy jailbreak prompts that preserve semantic meaning?
- RQ2Does a hierarchical genetic algorithm improve convergence and escape local optima for text prompts?
- RQ3How does AutoDAN perform in cross-model transferability and cross-sample universality compared with baselines?
- RQ4Can AutoDAN bypass perplexity-based defenses targeting token-level jailbreaks?
- RQ5What is the impact of initialization with handcrafted prompts on scalability and effectiveness?
Key findings
- AutoDAN achieves higher attack success rates than baselines across open-source LLMs (Vicuna-7b, Guanaco-7b, Llama2-7b-chat) and GPT-3.5-turbo in cross-model settings.
- AutoDAN-HGA (hierarchical GA) converges better and avoids local minima compared to AutoDAN-GA.
- AutoDAN prompts maintain lower perplexity than GCG, indicating stronger stealthiness, and comparable to handcrafted prompts.
- AutoDAN exhibits superior transferability to black-box models and good cross-sample universality.
- Perplexity defenses significantly reduce token-level jailbreaks (GCG) but are less effective against semantically meaningful prompts from AutoDAN and handcrafted DAN.
- Ablations show DAN initialization, LLM-based mutation, and hierarchical GA each improve performance and speed.
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.