TL;DR
This paper introduces AdvGRPO, a reinforcement learning framework that successfully stabilizes Group Relative Policy Optimization (GRPO) for joint attacker-defender co-training in language models. By utilizing dense multi-channel rewards, decoupled advantage normalization, and a staged curriculum, the method produces highly effective, adaptive multi-turn attackers and defenders that significantly outperform existing safety baselines.
What Problem Does This Paper Address?
Safety alignment in Large Language Models (LLMs) typically relies on static datasets of adversarial prompts. While models can be trained to resist these specific attacks, they remain highly vulnerable to adaptive attackers who dynamically shift strategies to exploit new weaknesses.
To counter this, researchers use automated "red teaming" (attackers) and "blue teaming" (defenders) to co-train models against each other in a continuous game of cat-and-mouse. While frameworks like Proximal Policy Optimization (PPO) and Direct Preference Optimization (DPO) have been used for this, prior work found Group Relative Policy Optimization (GRPO)—a highly sample-efficient RL algorithm—to be notoriously unstable in a co-training setup. This paper tackles that instability, unlocking GRPO for joint attacker-defender optimization.
Methods
The authors present AdvGRPO, which stabilizes co-training through three core innovations:
- Closed-Loop Multi-Turn Interaction: Unlike prior open-loop methods that generate an entire multi-turn attack script in one shot, AdvGRPO forces the attacker to observe the defender's response at each turn and adapt dynamically.
- Dense Multi-Channel Rewards & GDPO: To provide fine-grained control, the framework tracks multiple reward channels simultaneously. For the attacker, this includes an Attack reward (did the defender fail?), a Prompt reward (did the attacker follow the strategy?), and a Thinking-trace reward (for reasoning models). To prevent channels with lower variance from being washed out during group normalization, they use Group reward-Decoupled Policy Optimization (GDPO) to normalize each channel independently before combining them.
- Staged Training Curriculum: Training begins by freezing the defender and training the attacker on single-turn attacks, progressing to multi-turn attacks, and finally bootstrapping the full co-training phase where attacker and defender updates alternate every $N$ steps.
Datasets
- Adversarial/Harmful Objectives: A split of AdvBench (harmful behaviors) was used for training and testing, alongside the standard behaviors split of HarmBench for evaluation.
- Benign Objectives: The
vanilla_benignsubset of WildJailbreak and XSTest were utilized to ensure the defender maintains benign compliance (doesn't refuse safe prompts). - General Utility Benchmarks: To ensure safety training didn't degrade core capabilities, defenders were evaluated on MMLU (knowledge), TruthfulQA (factuality), ARC-C (reasoning), and IFBench (instruction following).
Key Insights and Ideas
- Why GRPO Fails in Vanilla Co-Training (and How to Fix It): Vanilla GRPO's group normalization couples the advantage scale to a continually shifting reward distribution as both models evolve. GDPO mitigates this by standardizing each reward channel independently, keeping the gradients well-scaled even as the attacker or defender improves.
- Unaligned $\neq$ Strategic: The authors evaluated "uncensored" or abliterated models as attackers and found they performed poorly. Simply removing safety guardrails does not inherently grant an LLM the strategic capability required to systematically bypass another model's defenses; adversarial strategy must be explicitly learned.
- Closed-Loop Superiority: Training the attacker turn-by-turn prevents it from overfitting to static training objectives, yielding significantly better out-of-distribution (OOD) generalization when transferring to unseen defenders.
Key Results
Attacker Performance
AdvGRPO yielded massive gains in Attack Success Rate (ASR). The Qwen2.5-14B multi-turn attacker achieved a 90–91% ASR against GPT-4.1. Remarkably, the reasoning-capable Qwen3.5-9B achieved a 71–79% ASR in a single turn, successfully overcoming its own internal alignment-induced self-censorship during the RL process.
Defender Performance
When evaluated on standard safety benchmarks, the co-trained defenders achieved state-of-the-art robustness. On HarmBench, the AdvGRPO-trained defender reduced the ASR to <2%, vastly outperforming the base model (18.8%), Self-RedTeam (16.8%), and AdvGame (4.7%), all while preserving or slightly improving general utility scores on tasks like MMLU and IFBench.
Limitations and Future Work
- Reduced Benign Compliance: The trained defenders showed a tendency to over-refuse safe prompts that look superficially harmful (e.g., on XSTest). The authors note that incorporating adversarial benign prompts (benign requests framed aggressively) during co-training would likely fix this.
- Prompt Entropy Collapse: Over the course of training, the attacker's prompt diversity decreased, converging on narrow phrasing strategies. Standard token-level entropy regularization failed to fix this without degrading performance, indicating a need for future work into strategy-level diversity mechanisms.
Summary updated