TL;DR
This paper reframes large language model (LLM) jailbreaking as a test-time reasoning problem rather than a simple token optimization or heuristic search task. By using a continuous loss function as a process reward model to guide a tree search, the proposed Adversarial Reasoning framework achieves state-of-the-art attack success rates against heavily aligned models, including frontier reasoning models like OpenAI o1-preview and DeepSeek-R1.
What Problem Does This Paper Address?
As LLMs become more integrated into critical systems, understanding their vulnerabilities to "jailbreaking"—prompting a model to bypass its safety guardrails and generate harmful content—is vital.
Existing jailbreaking techniques generally fall into two categories, both of which face significant limitations:
- Token-space attacks: These use gradient-based or random searches to find token sequences that trigger harmful behavior. However, they produce semantically meaningless gibberish that is easily caught by simple perplexity filters.
- Semantic-space attacks: These generate coherent, natural language prompts (e.g., using a separate "attacker" LLM). However, they typically rely on sparse, binary feedback ("Did the jailbreak work or not?"). This lack of granularity makes it incredibly difficult to navigate the prompt space efficiently, especially against modern, adversarially trained models.
This paper bridges the gap by introducing a gradient-free semantic attack that leverages a continuous loss signal to guide structured exploration of the prompt space.
Methods
The authors introduce Adversarial Reasoning, a framework that treats jailbreaking as an iterative optimization problem over a "reasoning string" $S$ that guides an attacker LLM $A$ to generate a prompt $P = A(S)$.
Instead of binary success/failure feedback, the framework uses a continuous next-word prediction loss (cross-entropy) based on how likely the target model is to begin its response with an affirmative phrase (e.g., "Sure, here is how to..."). This loss acts as a step-wise verifier, akin to a Process Reward Model (PRM).
The algorithm proceeds through a tree-search structure with three key LLM-based modules:
- Attacker LLM: Generates candidate adversarial prompts based on the current reasoning string.
- Feedback LLM: Analyzes a batch of generated prompts (pre-sorted by their target model loss) to semantically explain why low-loss prompts perform better than high-loss ones.
- Refiner LLM: Acts like a "textual gradient" operator, updating the reasoning string to incorporate the feedback while maintaining stability.
The framework maintains a priority buffer of the best reasoning strings and utilizes backtracking when child nodes fail to improve upon the parent's score, allowing for efficient exploration and pruning of the prompt space.
Datasets
The framework was evaluated using HarmBench, a standardized evaluation framework for automated red teaming. The authors uniformly sampled 50 tasks representing standard harmful behaviors across six categories (e.g., cyber intrusion, illegal acts, harassment).
Key Insights and Ideas
- Jailbreaking as Test-Time Compute: Just as scaling test-time compute (like chain-of-thought generation and verification) helps LLMs solve complex math problems, it can also be used to systematically uncover safety vulnerabilities.
- Weaker Attackers Can Punch Above Their Weight: By optimizing test-time compute via the verifier-guided search, a weaker attacker model (Vicuna-13B) can outperform much stronger models running standard heuristic attacks.
- Reasoning Defenses are Vulnerable to Reasoning Attacks: Advanced models designed to trade inference-time compute for safety (like OpenAI o1) are still highly susceptible if the adversarial framework itself uses structured reasoning to navigate around defenses.
- Multi-Shot Transfer via Surrogate Losses: For black-box models where direct log-probabilities are unavailable, aggregating the continuous loss signals from multiple open-source surrogate models creates highly transferable attack prompts.
Key Results
The Adversarial Reasoning framework achieved state-of-the-art results across both open-source and proprietary models:
- Adversarial Robustness Overcome: On heavily defended models like
R2D2andLlama-3-8B-RR, the method achieved 100% and 44% Attack Success Rates (ASR) respectively, vastly outperforming traditional token-space methods (like GCG) which completely failed (0% and 2% ASR). - Frontier Model Vulnerabilities: Using multi-shot transfer attacks with aggregated surrogate losses, the framework achieved a 56% ASR on OpenAI o1-preview and a 100% ASR on DeepSeek-R1.
- Compute Efficiency: When using Vicuna-13B as the attacker, the framework achieved a 64% ASR on Llama-3-8B—more than triple the success rate of baseline semantic attacks like PAIR (20%) and TAP-T (18%).
Limitations and Future Work
- White-Box Dependency for Optimization: The core algorithm relies on reading the log-probability vectors of a model to calculate continuous loss. While transfer attacks mitigate this for black-box models, strict and highly specific safety filters (like Cygnet) still present a significant barrier (achieving only a 2% ASR).
- Focus on Textual LLMs: The current study focuses strictly on text-based models. The authors note that extending this adversarial reasoning framework to multimodal models and LLM-controlled physical agents (like robots or web-agents) is a crucial next step.
- Defensive Implications: The success of this method suggests that future AI alignment strategies must move beyond filtering individual prompts and instead focus on defending against entire adversarial reasoning paths.
Summary updated