[Paper Review] AutoDAN: Interpretable Gradient-Based Adversarial Attacks on Large Language Models
AutoDAN introduces a novel, interpretable, gradient-based adversarial attack on large language models that generates human-readable, high-success-rate jailbreak prompts by optimizing tokens sequentially from left to right. Unlike prior methods that produce gibberish or rely on manual crafting, AutoDAN achieves both high readability and strong transferability across black-box models, even with limited training data, while enabling automatic system prompt leakage.
Safety alignment of Large Language Models (LLMs) can be compromised with manual jailbreak attacks and (automatic) adversarial attacks. Recent studies suggest that defending against these attacks is possible: adversarial attacks generate unlimited but unreadable gibberish prompts, detectable by perplexity-based filters; manual jailbreak attacks craft readable prompts, but their limited number due to the necessity of human creativity allows for easy blocking. In this paper, we show that these solutions may be too optimistic. We introduce AutoDAN, an interpretable, gradient-based adversarial attack that merges the strengths of both attack types. Guided by the dual goals of jailbreak and readability, AutoDAN optimizes and generates tokens one by one from left to right, resulting in readable prompts that bypass perplexity filters while maintaining high attack success rates. Notably, these prompts, generated from scratch using gradients, are interpretable and diverse, with emerging strategies commonly seen in manual jailbreak attacks. They also generalize to unforeseen harmful behaviors and transfer to black-box LLMs better than their unreadable counterparts when using limited training data or a single proxy model. Furthermore, we show the versatility of AutoDAN by automatically leaking system prompts using a customized objective. Our work offers a new way to red-team LLMs and understand jailbreak mechanisms via interpretability.
Motivation & Objective
- To address the limitations of existing adversarial attacks that produce unreadable, perplexity-filter-detectable prompts.
- To bridge the gap between manual jailbreaks (readable but scarce) and automatic attacks (unreadable but scalable).
- To develop a gradient-based method that generates interpretable, transferable, and effective jailbreak prompts without prior task-specific knowledge.
- To enable automatic system prompt leakage using a customized optimization objective.
- To enhance red-teaming capabilities by generating diverse, interpretable attack strategies that mirror human-designed jailbreaks.
Proposed method
- AutoDAN generates attack prompts token-by-token from left to right, mimicking autoregressive language generation to reduce optimization complexity.
- It employs a two-step optimization process per token: a preliminary step to explore plausible candidates and a fine-tuning step to balance jailbreaking and readability.
- A weighted combination of jailbreak success and perplexity (readability) objectives guides the gradient-based optimization, adapting to varying token entropy.
- The method uses a single white-box proxy model to generate prompts that generalize well to black-box LLMs such as GPT-3.5 and GPT-4.
- For system prompt leakage, a customized objective function is applied to directly optimize for extracting hidden system instructions.
- The approach is fully automatic and does not require known jailbreak templates or human-designed strategies.
Experimental results
Research questions
- RQ1Can gradient-based optimization generate interpretable, readable adversarial prompts that bypass perplexity-based filters?
- RQ2Can an automatic attack method achieve both high attack success rate and high readability, combining the strengths of manual and automatic attacks?
- RQ3How well do AutoDAN-generated prompts transfer to black-box LLMs compared to traditional adversarial attacks?
- RQ4Can AutoDAN automatically generate prompts that leak hidden system instructions?
- RQ5Do the generated prompts exhibit diverse, interpretable strategies similar to those used in manual jailbreaks?
Key findings
- AutoDAN-generated prompts achieve high attack success rates (over 90% on Vicuna 7B) while maintaining low perplexity, clustering in the top-left corner of the success-perplexity trade-off space.
- The method outperforms GCG-reg with perplexity regularization in both readability and attack success, especially under low regularization weights.
- AutoDAN prompts generalize better to black-box models like GPT-3.5 and GPT-4 than unreadable prompts from GCG, even when trained on a single proxy model.
- The prompts generated by AutoDAN exhibit diverse, interpretable strategies—such as role-playing and instruction manipulation—commonly seen in manual jailbreaks.
- AutoDAN successfully leaks system prompts using a customized objective, demonstrating its versatility beyond standard jailbreak tasks.
- Semi-AutoDAN, which incorporates manual prefixes/suffixes, further improves prompt quality and style control without sacrificing attack effectiveness.
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.