Abstract
Large Language Models (LLMs) are increasingly susceptible to adversarial attacks, specifically "jailbreaking" via adversarial suffixes. Existing methods often produce unreadable gibberish or require white-box access to model gradients. We present GASP (Generative Adversarial Suffix Prompter), a black-box framework that leverages Latent Bayesian Optimization (LBO) and Odds-Ratio Preference Optimization (ORPO) to generate human-readable, coherent adversarial suffixes. GASP achieves significantly higher attack success rates (ASR) across diverse models, including GPT-4o and Claude 3.5, while being 1.75x faster to train than previous state-of-the-art methods.
Introduction
As Large Language Models (LLMs) become central to various applications, ensuring their safety against malicious use is paramount. Red-teaming efforts often focus on "jailbreaking"—crafting prompts that bypass safety filters to elicit harmful responses. A common technique involves appending an adversarial suffix to a harmful query. However, current techniques face three primary challenges:
- Readability: Optimization-based attacks like GCG often result in "gibberish" tokens that are easily detected by perplexity filters.
- Efficiency: Searching the discrete space of all possible tokens is computationally expensive.
- Accessibility: Many effective attacks require "white-box" access to the target model's internal gradients, which is unavailable for proprietary models.
GASP addresses these gaps by providing an automated, black-box framework that generates natural-sounding, effective suffixes.
The GASP Framework
The GASP framework operates through a three-stage pipeline designed to optimize for both effectiveness and linguistic coherence.
1. Pre-training the SuffixLLM
The process begins by training a specialized SuffixLLM using Supervised Fine-Tuning (SFT) on a new dataset, AdvSuffixes. This dataset contains 519 harmful instructions paired with coherent adversarial suffixes. This stage establishes a "prior" distribution, ensuring the model generates linguistically plausible text rather than random tokens.
2. Latent Bayesian Optimization (LBO)
To overcome the inefficiency of discrete token search, GASP maps suffixes into a continuous "latent" embedding space. It then employs Bayesian Optimization to navigate this space, identifying regions likely to produce successful jailbreaks. This continuous approach allows the optimizer to "glide" toward optimal solutions more efficiently than discrete methods.
3. Iterative Refinement with ORPO
To align the SuffixLLM with a specific target black-box model, GASP uses Odds-Ratio Preference Optimization (ORPO). By comparing successful and unsuccessful suffixes identified during the LBO phase, the model learns to prefer effective styles without requiring a separate reference model or complex RLHF pipelines.
Evaluation and Metrics
The researchers introduced GASPEval, a nuanced evaluator using a 21-point rubric to assess the harmfulness of model responses. This provides a more granular understanding of attack success than binary keyword matching. Testing was conducted on standard benchmarks (AdvBench, HarmBench) and a custom Out-of-Distribution (OOD) set of 100 harmful prompts.
Key Results
GASP demonstrates superior performance across multiple dimensions: effectiveness, readability, and efficiency.
Attack Success Rates (ASR)
GASP consistently outperforms baseline methods across various open-source models. For instance, on Llama-3-8B, GASP achieved significantly higher ASR compared to competitive methods like PAIR or TAP.
Human-Readability and Evasion
A key advantage of GASP is the production of human-like suffixes. In human surveys, 79.23% of participants rated GASP-generated prompts as the most readable, whereas only 10.24% found them suspicious. This high readability allows GASP to bypass safety filters designed to flag high-perplexity "noisy" inputs.
Efficiency and Cost
GASP is highly efficient, reducing training time by 1.75x compared to AdvPrompter. Its black-box nature also makes it cost-effective for attacking proprietary models; the authors successfully jailbroke GPT-4o with a total API cost of just $2.31.
Conclusion and Future Work
GASP represents a significant advancement in adversarial red-teaming, proving that efficient, black-box, and human-readable attacks are viable. While highly effective, the authors note that future work could further reduce the "query budget" required for successful optimization. Most importantly, the high-quality adversarial data generated by GASP can be repurposed for adversarial retraining, helping to build future LLMs that are more resilient to sophisticated, human-like manipulation.
Summary updated