TL;DR
Most automated "red teaming"—probing AI models to uncover safety failures—treats jailbreaking like throwing darts blindfolded: one isolated prompt at a time. This paper reframes red teaming as a game of chess, using Hierarchical Reinforcement Learning (HRL) to split the attacker into a long-term strategist and a tactical wordsmith. By planning across multi-turn conversations, this dual-level agent uncovers subtle vulnerabilities in frontier LLMs that single-turn approaches miss entirely.
What Problem Does This Paper Address?
Securing Large Language Models (LLMs) requires finding their blind spots before bad actors do. Because manual testing doesn't scale, researchers use "automated red teaming"—training adversarial AIs to trick target models into saying harmful things.
However, most existing methods suffer from amnesia. Even when refining prompts over multiple rounds, each attempt is usually treated as a fresh start. Worse, many evaluations omit the conversation history when querying the target model. In the real world, human adversaries coerce models gradually across long dialogues, while defenders have the full chat history to spot trouble.
Why haven't we just used sequential Reinforcement Learning (RL) to train multi-turn attackers? Because dialogue is a nightmare for standard RL: the action space (every possible sentence) is infinite, horizons are long, and rewards are sparse—you only find out if your strategy worked at the very end of the chat, leaving you guessing which specific words did the heavy lifting.
Methods
To make multi-turn RL tractable, the authors formalize the conversation as a Markov Decision Process (MDP) and divide the labor using Hierarchical Reinforcement Learning (HRL), optimized via standard PPO:
- The Strategist (High-Level Policy): Looks at the overarching goal (e.g., getting instructions for a fake ID) and the chat history, then outputs a strategic "guide" (like "roleplay a tourist"). The authors test both a template-picking version and a fully generative LLM version (
LLM-HL). - The Tactician (Low-Level Policy): Takes that guide and generates the actual prompt token-by-token.
What’s genuinely novel here is how they design the rewards using an off-the-shelf safety classifier (like LlamaGuard):
- Stealth Reward: Both levels are rewarded for maximizing the harmfulness of the target's response while minimizing the toxicity of their own prompt—teaching the agent to be sneaky rather than overtly aggressive.
- Token-Level Credit Assignment: To tell the low-level policy which words worked, they mask out tokens (and pairs of high-attention tokens) after the fact to measure how much each word contributed to breaking the target. For example, in "Mutiny the pirate and steal his ship," masking both "Mutiny" and "steal" reveals their joint adversarial punch.
Overview of the HRL red teaming architecture (Correction: let's look closely at the architecture diagram below)
Datasets
The authors do not introduce new datasets, relying instead on established safety benchmarks:
- Training: Fine-tuned on HarmBench prompts (using
Llama-3-8B-Instructwith LoRA adapters as the base attacker). - Evaluation: Tested on HarmBench (validation set), JailbreakBench, and WildBench to measure out-of-distribution generalization.
Key Insights and Ideas
- Memory helps defenders, hurting naive attackers: When target models are given full conversation history ("context-aware") rather than just the latest message ("myopic"), the success rates of prior red-teaming baselines plummet. Giving defenders realistic context makes red teaming much harder—and proves why sequential planning matters.
- Stealth isn't learned for free: Ablations show that if you only reward the attacker for eliciting bad outputs without penalizing its own toxicity, it never learns to disguise its intent.
- Better guards breed better attackers: Training the HRL agent against stronger safety classifiers (e.g., LlamaGuard 3 8B vs. ShieldGemma 2B) produces significantly stronger attackers, hinting at a natural arms race where better defense models directly fuel better red-teaming agents.
- Exploration yields organic diversity: Without any explicit diversity reward, the RL agent naturally discovers a wider variety of attack styles than search-and-mutate baselines.
Key Results
Measuring Attack Success Rate within $n$ dialogue turns (ASR@n), the HRL agent trained only against an 8B open-source model transfers remarkably well to giant and closed-source frontier models.
In a tough 5-turn, context-aware setting (ASR@5) on HarmBench:
- Against
Llama-3.1-8B-Instruct,LLM-HLachieves 62.5% ASR (in 3.8 turns on average), beating the next best multi-turn baseline, X-Teaming (41.0%). - Against the reasoning model
GPT-5.4-mini, most baselines hit 0.0% ASR, whereasLLM-HLachieves 41.0% ASR—actually performing better with full conversation context than in the myopic setting (35.0%).
In a longer 30-turn context-aware setup (ASR@30), LLM-HL hits 95.0% on Llama-3.1-8B, 86.5% on Llama-3.1-70B, and 55.0% on GPT-4o (compared to 35.3% for the runner-up APRT), while achieving the fastest average turns-to-success (4.1 turns) and highest attack diversity (0.92). Removing the hierarchy (Low-level Only) crashes GPT-4o performance down to 12.5%.
Limitations and Future Work
- Reliance on a clear score: The framework assumes a well-defined sequence-level harmfulness score (provided by a guard model). Extending this HRL setup to general agentic tasks—where success is fuzzier than "safe vs. unsafe"—remains an open problem.
- Text-only (for now): Experiments are strictly text-based, though the authors note the MDP formulation could naturally extend to multimodal red teaming (images, audio).
- Co-evolution: Because stronger guard models yield stronger attackers, the authors suggest future work should iteratively train harm-detection and harm-elicitation models in tandem.
Summary updated