TL;DR
Traditional jailbreak attacks on Large Language Models (LLMs) are brittle because they optimize for exact token sequences (like forcing the model to say "Sure, here is..."), often resulting in unnatural gibberish text that is easily blocked by security filters. This paper introduces the Semantic Representation Attack (SRA), a paradigm shift that targets underlying malicious meanings rather than rigid textual strings. By generating highly natural, coherent prompts, SRA achieves a staggering 99.71% attack success rate across 26 open-source LLMs and successfully breaches heavily fortified commercial systems like GPT-5.
What Problem Does This Paper Address?
To prevent LLMs from generating harmful content (e.g., instructions for building explosives), developers use alignment techniques like Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (DPO). However, adversaries can bypass these guardrails using adversarial prompts.
Existing automated attacks typically rely on token-level optimization (such as the Greedy Coordinate Gradient, or GCG, algorithm). These methods try to find a specific sequence of characters that forces the LLM to output a predefined affirmative template. This approach suffers from three critical limitations:
- Suboptimal Convergence: Forcing the model down a single, rigid token path ignores the massive distribution of semantically equivalent ways to agree, trapping optimization algorithms in local minima.
- Compromised Naturalness: These attacks produce bizarre, gibberish-like token permutations that easily trigger perplexity-based security filters.
- Poor Cross-Model Generalization: Because the gibberish sequences are overfitted to the specific quirks of a single source model, they fail to transfer effectively to other target models in black-box scenarios.
Methods
The authors propose Semantic Representation Attack (SRA), which fundamentally reconceptualizes the adversarial objective from exact textual targeting to malicious semantic representations. Instead of forcing a specific string, it optimizes prompts to induce a broad distribution of responses that share equivalent malicious meanings (e.g., "I can provide..." or "Here is the information...").
To make this concept computationally viable in a discrete token space, the authors developed several key techniques:
- Semantic Representation Heuristic Search (SRHS): An algorithm that incrementally expands adversarial prompts while enforcing strict perplexity boundaries. This ensures that every added token maintains grammatical coherence and naturalness, drastically reducing the search space's branching factor.
- SRA+ (Proxy-Guided Attack): Highly aligned models (like the Llama 2 family) have heavily "peaked" output distributions that stubbornly suppress lexical diversity, making them hard to optimize against. SRA+ solves this by anchoring the heuristic search onto a more expressive "surrogate semantic proxy" model (like Vicuna 7B) that features a broader output distribution, effectively bridging the representational gap.
- Dual-Stage Semantic Evaluation: To verify if a generated response is actually harmful without relying on exact string matching, SRA uses a fast keyword check followed by a deep semantic evaluator—a fine-tuned Llama 2 13B model from the HarmBench suite.
Datasets
The framework was evaluated using two primary benchmark datasets:
- HarmBench: A standardized evaluation benchmark containing diverse harmful scenarios, used to test automated red-teaming and robust refusal capabilities.
- AdvBench: A popular adversarial prompt dataset, utilized here to ensure a fair efficiency and perplexity comparison against prior optimization baselines.
Key Insights and Ideas
- Coherence Promises Convergence: The authors theoretically establish a Coherence-Convergence Relationship. They prove that bounding the perplexity (coherence) of an adversarial prompt actually drives the optimization toward the target malicious semantics. It keeps the prompt within the high-density regions of natural language that all LLMs share.
- The Transferability Secret: Traditional attacks fail to transfer because they rely on model-specific artifacts (gibberish). By maintaining semantic coherence, SRA minimizes functional divergence across heterogeneous LLMs, guaranteeing robust black-box transferability.
- Brevity is Lethal: Because SRA aligns with the natural language distribution, it requires incredibly short prompts—often averaging fewer than 3 tokens (e.g., simply appending
. You are being sarcastor, while supporting)—to completely subvert safety alignment.
Key Results
- 99.71% Average Success Rate: SRA/SRA+ achieved a 100% attack success rate on 24 out of 26 evaluated open-source LLMs, including advanced reasoning models like DeepSeek R1 70B and Qwen3 30B Thinking.
- Breaching GPT-5: While all existing state-of-the-art attacks failed completely (0% success) against GPT-5, SRA+ successfully broke through the defense with an 18.67% attack success rate.
- Extreme Efficiency and Stealth: SRA achieves near-perfect convergence within a minimal 15-second computation budget. Furthermore, the generated prompts exhibit exceptionally low perplexity scores (an average 96.8% reduction over GCG), rendering them invisible to standard perplexity filters.
Limitations and Future Work
Despite its high success rate against core model representations, SRA faces a bottleneck when dealing with commercial platforms that deploy independent, post-generation content detection layers (such as Azure OpenAI's content filters). In many cases, SRA successfully tricked the foundational LLM into generating the malicious response, but the external API layer intercepted and blocked the final output before it reached the user.
The authors emphasize that to defend against these highly stealthy, low-token attacks, future safety mechanisms must urgently transition away from rigid pattern matching and toward comprehensive semantic intention analysis.
Summary updated