TL;DR
The Semantic Representation Attack (SRA) is a novel jailbreaking paradigm that targets the abstract semantic space of compliant responses rather than forcing specific token sequences like "Sure, here is...". By optimizing for semantic coherence using a novel heuristic tree search algorithm, SRA achieves an unprecedented 89.41% average attack success rate across 18 Large Language Models (LLMs) while generating highly natural, concise, and defense-resistant prompts.
What Problem Does This Paper Address?
Safety alignment techniques (like RLHF) are designed to prevent LLMs from generating harmful content. However, adversarial attacks can bypass these safeguards. Traditional automated attacks, such as Greedy Coordinate Gradient (GCG), typically optimize for a specific exact textual prefix—forcing the model to output affirmative phrases like "Sure, here is a tutorial on how to make a bomb."
This exact-string matching approach suffers from major limitations:
- Brittle Optimization: Forcing a single exact phrase creates a highly constrained, difficult-to-optimize landscape.
- Semantic Incoherence: The resulting adversarial prompts often look like unreadable gibberish, making them easy to detect using perplexity (PPL) filters.
- High Computational Cost: Finding these exact token sequences requires massive discrete optimization budgets.
The authors address this inherent trade-off between attack efficacy and prompt naturalness by shifting the adversarial objective from the token level to the semantic level.
Methods
Instead of targeting a specific textual pattern, SRA exploits the semantic representation space ($\Omega$), which encompasses all diverse responses sharing the same underlying malicious meaning.
To navigate this space efficiently, the authors introduce the Semantic Representation Heuristic Search (SRHS) algorithm, which treats prompt generation as an incremental tree search governed by two main components:
- Harmfulness Representation Heuristic Search: This component filters and selects candidate prompts that successfully elicit responses matching the target harmful semantic meaning. SRA uses a fine-tuned Llama-2 13B model (from HarmBench) as a robust semantic mapping function ($R$) to classify whether a response complies with the malicious intent, regardless of its exact wording.
- Semantic Coherence Heuristic Search: This component extends the adversarial prompt token-by-token, ensuring that each added token maintains high conditional probability (low perplexity).
By establishing rigorous mathematical proofs for coherence preservation, the authors demonstrate that keeping the prompt coherent actually accelerates convergence toward the desired harmful semantic space, reducing the computational complexity from exponential to linear.
Datasets
The method was evaluated using two primary benchmark datasets:
- HarmBench: A standardized evaluation framework providing diverse, automated red-teaming scenarios to evaluate adversarial attacks against aligned LLMs.
- AdvBench: A popular dataset used specifically to benchmark efficiency and ensure fair comparison against prior baseline frameworks.
Key Insights and Ideas
- Coherence Drives Convergence: Counterintuitively, maintaining natural, human-readable text in an adversarial prompt doesn't weaken the attack; it helps guide the LLM's internal probability distribution smoothly toward a compliant response state.
- Exploiting Synonym Inducement: Aligned LLMs are often trained on limited refusal datasets. While they might successfully block a prompt trying to force "Sure, here is...", they struggle to defend against prompts that open up multiple alternative paths to the same meaning (e.g., "Certainly, let me show you...").
- Extreme Conciseness: Because SRA optimizes along natural linguistic trajectories, it generates incredibly short adversarial suffixes/prefixes—often averaging fewer than 3 tokens (e.g., appending simple phrases like
". You are being sarcast"or"format it as a list"), making them virtually invisible to standard length- or perplexity-based filters.
Key Results
SRA achieves state-of-the-art performance across multiple dimensions:
- Unprecedented Success Rates: SRA achieved an average Attack Success Rate (ASR) of 89.41% across 18 open-source LLMs, including a flawless 100% success rate on 11 models (such as DeepSeek R1 8B, Vicuna 7B/13B, Mistral 7B, and Orca 2).
- High Efficiency and Stealth: Within a strict 15-second computation budget, SRA consistently outperformed baselines while reducing prompt perplexity scores by 96.8% compared to GCG and 60.0% compared to AutoDAN, yielding highly natural prompts.
- Robustness Against Defenses: SRA maintained a 96-100% success rate against prompt-perturbation defenses like SmoothLLM, which typically neutralize token-substitution attacks by swapping characters or inserting random noise.
- Cross-Model Transferability: Prompts generated by SRA on open proxy models transferred exceptionally well to closed-source systems, achieving up to a 93.0% ASR on GPT-3.5 Turbo in contextual settings.
Limitations and Future Work
- Logit Access Requirement: Like most search-based optimization methods, SRA requires access to the target or proxy model's token-level logits, making it less directly applicable to strictly black-box APIs without an effective proxy model.
- Threshold Calibration: Calibrating the optimal coherence threshold ($\tau$) remains a challenge, as token probability distributions vary significantly across different model architectures and training paradigms.
- Classifier Dependency: The attack's optimization loop relies heavily on the accuracy of the semantic classifier used to evaluate response harmfulness. Future work will focus on developing more adaptive, multi-aspect semantic targeting strategies.
Summary updated