Perplexity filters and LLM paraphrasing stopped nearly all gradient-optimized GCG jailbreaks in gray-box settings, while approximate adversarial training left attack success rates at 95% (versus 96% undefended), flipping the standard playbook from computer vision where input filters crumble quickly and adversarial training dominates. Jain et al. attribute this reversal to the extreme cost of discrete text optimization: a single GCG suffix search takes 513,000 model evaluations, 5 to 6 orders of magnitude more than vision attacks.
- Perplexity filters catch 100% of raw GCG (Tables 1–2): Self-perplexity and 10-token windowed perplexity filters block every GCG suffix across four of five 7B models (0.00 pass rate; 0.01 basic and 0.00 windowed on ChatGLM-6B), but falsely flag 6.29% (basic) and 8.87% (windowed) of benign AlpacaEval prompts.
- White-box perplexity evasion cripples GCG (Figs. 1–3): Adding a perplexity penalty (
α_ppl = 0.1) lets 10-token triggers slip past the 10-token window 32% of the time (vs 17% for 20 tokens and 27% for 5), yet drops attack success rate (ASR) to 52% (32% for 20 tokens). - Paraphrasing drops Vicuna ASR from 79% to 5% (Table 3, Fig. 4): Rewriting inputs with
gpt-3.5-turboreturns Vicuna-7B (0.79 to 0.05) and Guanaco-7B (0.96 to 0.33) to unattacked baselines (0.05 and 0.31), at a cost of ~10% AlpacaEval quality loss on Vicuna/Alpaca and ~15% on Guanaco. - Retokenization and cheap adversarial training fall short (Tables 6–8): BPE-dropout (
p = 0.4) lowers Vicuna ASR from 0.79 to 0.52 and Guanaco from 0.95 to 0.52, but cuts Vicuna AlpacaEval from 54.41% to 47.64% and doubles Guanaco’s unattacked failure rate. Mixing 20% red-team refusal data into Alpaca fine-tuning leaves attacked ASR at 95% (vs 96%).
Why LLM threat models diverge from computer vision
Classical adversarial ML assumes small l_p-norm perturbations that stay invisible to humans, plus full white-box access to every weight and detector. Jain et al. argue both assumptions break for language models. Text inputs are rarely inspected by humans, and context windows are large enough that length bounds do not constrain attackers. Meanwhile, continuous vision attacks succeed in 1 to 5 gradient steps, whereas discrete GCG jailbreaks need hundreds of thousands of evaluations, and increasing trigger length expands the combinatorial search space rather than helping an optimizer with a fixed compute budget.
Because production APIs also hide moderation weights and base parameters, the authors argue evaluators should fix the attacker’s compute budget (here 513,000 model evaluations across two 7B models) and distinguish gray-box deployments from white-box adaptive attacks.
Detection, preprocessing, and training baselines compared
The paper benchmarks four baseline defenses across detection, input preprocessing, and robust optimization:
Perplexity filtering flags prompts whose negative log-likelihood exceeds the worst prompt (or worst 10-token window) in AdvBench. It catches 100% of raw GCG suffixes, and even white-box optimization struggles to satisfy both jailbreaking and low perplexity simultaneously. However, flagging roughly 1 in 10 benign AlpacaEval queries (especially specialized terms or code) makes hard blocking unusable on its own.
Paraphrasing with gpt-3.5-turbo strips the fragile GCG suffix and benefits doubly when the paraphraser itself refuses harmful requests (pushing Alpaca-7B ASR from 0.96 to 0.88, below its 0.95 no-attack rate). In a white-box test using LLaMA-2-7B-chat as the paraphraser, GCG successfully crafted an input that forced the paraphraser to echo all 10 adversarial tokens verbatim, proving the defense relies on gray-box secrecy.
BPE-dropout splits words into smaller subword pieces (p = 0.4 merge drop). It cuts Vicuna and Guanaco ASR to 52%, leaves Falcon-7B-Instruct unmoved (70% to 78%), increases context length, and weakens clean refusal alignment on Guanaco because safety fine-tuning saw standard tokenization.
Adversarial training could not use online GCG attacks (which took hours per batch), so the authors mixed 20% human red-team refusal prompts into Alpaca fine-tuning. Descent-only mixing failed to stop GCG (95% ASR), and adding gradient ascent on harmful completions caused models to degenerate into repeating "cannot" or "harm" even at mixing rate 0.05.
Caveats and system takeaway
Every result here targets GCG’s high-perplexity suffix optimizer. Follow-up attacks quickly exposed the ceiling of fluency-based filters: AutoDAN evolved grammatical prompts that evade perplexity checks entirely and keep 68% ASR after paraphrasing, while PAIR found black-box semantic jailbreaks in under 20 queries.
For practitioners, the paper’s enduring lesson is architectural: treat perplexity filtering as a cheap routing signal into secondary defenses (such as paraphrasing or dedicated constitutional classifiers) rather than an outright user block, and always report benign false-positive rates alongside threat-model assumptions.


