SALSA: Sampling Adversarial Suffixes from Learned Distributions for LLM Safety Assessment

Shivank Rajput, Himanshu Singh, A. V. SubramanyamarXiv 2026

TL;DR

Finding vulnerabilities in aligned Large Language Models (LLMs) usually requires slow, brute-force optimization to craft custom "jailbreak" strings for every harmful query. SALSA flips this script by training a lightweight generative model to learn the entire underlying distribution of successful adversarial suffixes. The result is a system that generates universal jailbreaks roughly 85× faster than leading generative baselines—and transfers remarkably well to black-box models like GPT-4o, proving that LLM vulnerabilities share a deep, common structure.

What Problem Does This Paper Address?

Even after extensive safety training, LLMs can be tricked into generating harmful content by appending seemingly nonsensical token sequences—called adversarial suffixes—to user prompts. Automated attacks like Greedy Coordinate Gradient (GCG) find these suffixes by treating text generation like a discrete optimization puzzle, using model gradients to iteratively tweak tokens until the safety filter breaks.

While effective, optimization-based attacks have two major bottlenecks:

  1. They are painfully slow: Crafting a single suffix often takes hundreds of forward passes through a massive transformer, costing minutes per prompt.
  2. They overfit: Because suffixes are custom-tailored to a specific query and model, they often fail to transfer to unseen prompts or closed-source systems. Even recent generative approaches (like AmpleGCG) still condition their generators on individual harmful queries.

The authors ask a fundamental question: Are effective jailbreaks tightly coupled to specific queries, or do they belong to a broader, universal "adversarial space" that we can map out and sample from at will?

Methods

Instead of hunting for single point-solutions, SALSA (Sampling Adversarial Suffixes from Learned distributions for LLM Safety Assessment) models the probability distribution of working jailbreaks.

Figure 1: Overview of the architecture. (1) Successful adversarial suffixes are first collected from an optimization- based attack (e.g., GCG) on harmful prompts. (2) These suffixes are used to train a VAE that learns a latent distribution over adversarial strings via reconstruction and KL-divergence objectives. (3) At test time, suffixes are generated by sampling latent variables and decoding them autoregressively. The generated suffixes are appended to prompts and evaluated against victim language models as jailbreak candidates.

What is standard here is the architecture: the authors use a classic Holistic Regularization Variational Autoencoder (HR-VAE) built with a tiny two-layer LSTM encoder and decoder, using Llama-2's vocabulary.

What is novel is how and what it learns:

  • Query-Agnostic Modeling: Unlike prior generative attacks that map a specific harmful prompt to a suffix, SALSA learns an unconditional distribution over suffixes alone. At test time, you simply draw random vectors from a standard Gaussian prior, decode them into 20-token suffixes in milliseconds, and paste them onto any harmful query.
  • Cross-Family Pooling: The VAE is trained on suffixes optimized across three distinct model families (Gemma-2, Qwen-2.5, and Llama-3.1). Suffixes exploiting quirks of just one model get diluted, forcing the VAE to capture universal adversarial patterns.
  • Theoretical Grounding: The authors show mathematically that if the VAE's learned distribution stays close to the empirical distribution of optimized suffixes (measured via Total Variation distance), the expected jailbreak success rate is guaranteed to stay high.

Datasets

No new benchmarks were introduced; instead, the authors curated existing public resources to ensure strict zero-shot transfer testing:

  • Training (gcg-evaluated-data): Filtered and deduplicated down to 1,686 proven, high-harmfulness GCG suffixes generated against Gemma-2-2b-it, Qwen2.5-1.5b, and Llama-3.1-8b. Crucially, none of these source models are used as test targets.
  • Evaluation (AdvBench & MaliciousInstruct): Tested on 100 disjoint prompts from AdvBench (ensuring zero overlap with the prompts used to create the training suffixes), plus out-of-distribution testing on MaliciousInstruct.

Key Insights and Ideas

  • Jailbreaks live on a shared manifold: The fact that query-agnostic suffixes trained on small open-source models can break GPT-4o proves that adversarial suffixes aren't just isolated bugs—they exploit structural vulnerabilities shared across vastly different alignment pipelines.
  • Simpler is dramatically faster: Because SALSA doesn't read the user's prompt to generate a suffix, it doesn't need a heavy transformer at inference time. A tiny two-layer LSTM does the job orders of magnitude faster.
  • Binary "Attack Success" metrics lie: Automated safety judges often flag a jailbreak as "successful" simply because the LLM didn't explicitly refuse, even if its actual answer is watered-down or useless. Human evaluation revealed that SALSA elicits genuinely actionable, relevant details where baselines often produce empty compliance.

Key Results

Using an strict LLM safety classifier (gpt-oss-safeguard-20b) with a budget of $N=100$ sampled suffixes per query, SALSA matches or beats baselines under much harder transfer conditions:

  • Open-Source Transfer: SALSA hits 100% Attack Success Rate (ASR) on Vicuna-7b and Mistral-7b, and 96% on Llama-2-13b-chat—matching AmpleGCG-Plus without ever training on a Llama-2 model.
  • Black-Box Proprietary Transfer: SALSA achieves 99% ASR on GPT-3.5-Turbo and 45% ASR on the much harder GPT-4o, more than doubling the strongest AmpleGCG-Plus configuration (22%).
Attack success rate transferring from open-source corpora to closed-source GPT models.
  • Blistering Speed: On Llama-2-13b-chat, GCG takes 366.85s per prompt, and AmpleGCG-Plus takes 3.46s. SALSA takes just 0.041s—an ~85× speedup over the fastest generative baseline.
  • Higher Attack Quality: Across 40 blind-rated successful jailbreaks, human researchers scored SALSA substantially higher than AmpleGCG-Plus on Relevance (4.62 vs. 3.62), Harmfulness (4.26 vs. 3.79), and Fluency (4.26 vs. 3.65) on a 5-point scale.

Limitations and Future Work

  • Corpus Boundaries: A VAE can only interpolate within the patterns it sees. SALSA is bounded by its relatively small (1,686 suffixes) and imbalanced training set (roughly three-quarters came from a single model).
  • Moving Targets & Sampling Budgets: As safety alignment evolves, the suffix distribution will shift, requiring periodic retraining. Also, SALSA relies on sampling volume—performance is rock-solid at $N \in [75, 100]$ samples per prompt, but drops off with smaller budgets.
  • Future Work: The authors envision flipping SALSA into a closed-loop defense engine: rapidly sampling thousands of diverse attacks to automatically red-team, filter, and safety-tune future LLMs without expensive human prompt engineering.

Summary updated

Abstract

Large language models (LLMs) remain vulnerable to jailbreak attacks, where adversaries append optimized suffixes to otherwise benign looking prompts to bypass safety alignment. Existing optimization-based GCG-style attacks can be effective, but they are expensive at inference time, and suffer from poor transfer. We present, SALSA, a generative framework that learns a distribution over jailbreak suffixes from optimization-derived attack corpora. Once trained, the model supports efficient sampling-based attacks. On open-source targets, it achieves attack success rates comparable to state-of-the-art optimization baselines, while reducing generation time from 3.46s to 0.04s per prompt. In black-box transfer, it remains highly effective against proprietary systems, including 99% ASR on GPT-3.5-Turbo, and reaches 45% ASR on the substantially harder GPT-4o, more than doubling the strongest baseline at an equal sampling budget. We further offer an intuition for why generative sampling can preserve high attack success, when the learned suffix distribution is close to the distribution of optimization outputs. Overall, our results show that learning adversarial suffix distributions yields a scalable, and practically efficient foundation for continuous LLM vulnerability discovery.
BibTeX
@misc{rajput2026salsa,
  author = {Shivank Rajput and Himanshu Singh and A. V. Subramanyam},
  title = {{SALSA: Sampling Adversarial Suffixes from Learned Distributions for LLM Safety Assessment}},
  year = {2026},
  eprint = {2611.33030},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33030},
}
Figure