Introduction
Large Language Models (LLMs) are increasingly deployed with extensive safety alignments, yet they remain vulnerable to adversarial "jailbreak" prompts. These carefully crafted inputs bypass guardrails to elicit harmful content. Existing jailbreaking techniques generally fall into two flawed categories: manual heuristics (like the "DAN" persona), which lack generalizability, and discrete optimization methods (like Greedy Coordinate Gradient or GCG), which produce unnatural, easily detectable "gibberish" and require massive computational resources.
To bridge this gap, researchers have introduced the Generative Adversarial Suffix Prompter (GASP). GASP is a novel automated framework that efficiently generates human-readable jailbreak prompts in a fully black-box setting, shifting the search for adversarial suffixes from discrete token optimization to a continuous latent space.
How GASP Works
The core innovation of GASP lies in treating jailbreaking as a latent space exploration problem rather than a token-shuffling exercise.
The framework operates through several key components:
- SuffixLLM: A specialized model trained to generate adversarial suffixes.
- Latent Bayesian Optimization (LBO): Instead of tweaking individual discrete words, GASP maps potential suffixes into a continuous latent embedding space. It uses a Gaussian Process as a surrogate model to predict which areas of this latent space are most likely to yield a successful jailbreak, guiding the search toward the most promising vectors.
- GASPEval: To provide the LBO with a high-quality signal, the authors developed a structured evaluator. It uses a secondary LLM to score target responses against 21 specific binary criteria, providing a nuanced "fitness score" rather than a simple binary success/failure check.
- Iterative Refinement (ORPO): The framework uses Odds-ratio Preference Optimization (ORPO) to fine-tune the SuffixLLM. It rewards the model for generating suffixes that the LBO found successful while penalizing those that failed or lacked linguistic coherence.
Key Insights
- The Power of Continuity: By optimizing in a continuous latent space, GASP avoids the combinatorial explosion of discrete token optimization. This makes the search much more efficient and ensures the resulting text remains within the distribution of natural language.
- Readability as a Stealth Feature: Because GASP produces human-like text, its prompts have low perplexity. This allows them to bypass common defensive filters that look for the high-randomness patterns typical of older optimization-based attacks.
- "Lazy" Evaluation: The LBO approach allows the system to be highly selective. It only queries the expensive target LLM for suffixes that the surrogate model predicts will be highly effective, drastically reducing API costs and time.
Experimental Results
GASP was evaluated using standard industry benchmarks (AdvBench and HarmBench) alongside a newly introduced dataset, AdvSuffixes. The results demonstrate significant improvements over state-of-the-art baselines.
- Superior Attack Success: GASP consistently outperformed baselines like GCG, AutoDAN, PAIR, and TAP across multiple models, including Mistral-7B, Falcon-7B, and the Llama 3 family.
- High Human-Readability: In human surveys, nearly 80% of participants rated GASP-generated prompts as the easiest to read and least suspicious. It achieved an AI-based readability score of 0.94, nearly matching human-written text and vastly outperforming GCG (0.07).
- Efficiency Gains: GASP reduced training time by 1.75x compared to AdvPrompter (505.2 mins vs. 888.0 mins) and offered significantly faster inference speeds (2.1 mins) than discrete optimization methods.
- Cost-Effective Black-Box Attacks: The authors successfully jailbroke proprietary models like GPT-4o and Claude 3.5-Sonnet with a total API cost of only $5, demonstrating the high scalability of the attack.
Limitations and Future Directions
While highly efficient, interacting with black-box APIs still incurs a query cost that future iterations could reduce. Furthermore, as models become increasingly well-aligned, it remains unclear if there is a theoretical upper limit to Attack Success Rates. Ultimately, the authors suggest that GASP’s greatest value lies in "adversarial retraining"—using the framework to proactively find vulnerabilities so they can be patched, making LLMs more robust against malicious actors.
Summary updated