AutoDAN evolves fluent, readable jailbreak prompts with a hierarchical genetic algorithm, holding a 60.77% attack success rate (ASR) on Llama 2-7B-Chat (65.58% by GPT-4 Recheck) and 97.69% on Vicuna-7B even under a perplexity defense that drops gradient-based GCG attacks to 0.00% on Llama 2. Liu et al. show that once an optimizer searches over natural-language prototypes instead of raw token gradients, detectors built around surface fluency stop catching automated jailbreaks.
- Immune to perplexity filtering (Table 3): Across 520 AdvBench harmful behaviors with an AdvBench-calibrated GPT-2 perplexity threshold, GCG collapses to 0.00% ASR on Llama 2-7B-Chat and 39.23% on Vicuna-7B, whereas AutoDAN-HGA loses zero attack strength (60.77% on Llama 2, 97.69% on Vicuna, 98.46% on Guanaco-7B).
- Near-human prompt perplexity (Table 1): AutoDAN-HGA keeps GPT-2 perplexity at 46.47 on Vicuna, 39.30 on Guanaco, and 54.38 on Llama 2 (vs 22.97 for handcrafted DAN), compared to 458.6 to 1,532.2 for GCG’s gibberish suffixes.
- Cross-model transfer and universality (Tables 2, 4, 9): Prompts evolved on Vicuna transfer to Guanaco at 70.58% ASR (vs 11.92% for GCG) and to GPT-3.5-turbo-0301 at 70.77% (vs 7.30%); reusing one prompt on the next 20 unseen AdvBench queries hits 80.96% on Vicuna (vs 30.58%).
- Resilience to paraphrasing and fine-tuning (Appendix I, Table 11): On 100 Vicuna-7B pairs, GPT-3.5 paraphrasing cuts GCG from 97% to 6% ASR, while AutoDAN-HGA retains 68% ASR; both largely bypass naive red-team adversarial training (94% and 93%).
How AutoDAN evolves fluent jailbreaks
Earlier automated attacks like GCG optimize token suffixes directly from model gradients, which produces nonsensical character strings that perplexity filters catch immediately. AutoDAN instead seeds a genetic algorithm with handcrafted “Do-Anything-Now” (DAN) jailbreak templates, diversified via GPT-4 paraphrases so every candidate begins as grammatical English.
At each step, AutoDAN scores every candidate prompt by the target model’s negative log-likelihood for starting its reply with an affirmative prefix (such as "Sure, here is how to [query]"), stopping early if no refusal phrase appears in the top output tokens. A flat paragraph-level genetic algorithm (AutoDAN-GA) stalls in local minima, so AutoDAN-HGA alternates 5 sentence-level word-swap iterations (tracking a momentum score per word to replace words with higher-fitness synonyms) for every 1 paragraph-level iteration (10% elitism, softmax roulette selection, 5-breakpoint sentence crossover at rate 0.5, and GPT-4 diversification mutation at rate 0.01).
Ablations on Llama 2-7B-Chat (Table 5) confirm every piece pulls weight: plain AutoDAN-GA reaches 27.31% ASR in 838.4s per sample; adding DAN initialization lifts it to 41.54% (766.6s); LLM-based mutation jumps it to 56.15% (722.6s, beating WordNet synonym replacement 51% vs 33% on 100 samples); and adding the hierarchy brings it to 60.77% in 715.3s (faster than GCG’s 922.0s).
Key findings: transfer, paraphrasing, and GPT-4 Recheck
Because lexical evolution avoids overfitting to model-specific token gradients, AutoDAN generalizes across both models and unseen prompts. Prompts evolved on Llama 2-7B-Chat transfer to Vicuna-7B at 72.88% ASR and Guanaco-7B at 73.08% (versus 13.65% and 11.54% for GCG), and transfer to GPT-3.5-turbo-0301 at 65.77% ASR (versus 16.54% for GCG and 0.38% for handcrafted DAN). Crucially, GPT-3.5 paraphrasing strips away GCG’s garbled suffix (97% down to 6% on Vicuna), whereas AutoDAN’s semantic instructions survive paraphrasing (68% ASR).
The authors also expose a flaw in standard keyword-based ASR checks: models often answer a harmful query while appending a disclaimer (“However, this is illegal”), causing keyword matching to misclassify successful attacks. Against a 5-person human majority vote on 50 samples, a GPT-4 semantic verifier (Recheck) achieved 0.90 decision overlap versus 0.76 for keyword matching.
Caveats and defender takeaway
AutoDAN still relies on white-box log-likelihood evaluations during optimization and runs ~12 minutes per sample on an A100, unlike purely black-box query methods such as PAIR. All Llama 2 evaluations omitted its default safety system prompt, and the authors note AutoDAN degrades sharply when a strong system prompt is present. Moreover, black-box transfer from Llama 2 failed almost completely against GPT-4-0613 (0.77% ASR for AutoDAN-HGA, 0.04% for GCG).
For engineers defending production models, the practical takeaway is clear: scoring surface perplexity or running a generic paraphraser only blocks noisy token-level attacks. Defenses must evaluate request intent and enforce downstream policy boundaries, such as streaming constitutional classifiers and strict tool-call authorization, rather than trusting text fluency.


