← Latest papers
💬 NLP

Learning to Attack and Defend: Adaptive Red Teaming of Language Models via GRPO

This paper introduces AdvGRPO, a novel co-training framework that stabilizes GRPO for joint attacker-defender optimization through dense multi-channel rewards, decoupled advantage normalization, and a progressive curriculum, ultimately yielding highly effective transferable attacks and more robust language model defenses.

Original authors: Blake Bullwinkel, Eugenia Kim, Amanda Minnich, Mark Russinovich

Published 2026-06-09
📖 5 min read🧠 Deep dive

Original authors: Blake Bullwinkel, Eugenia Kim, Amanda Minnich, Mark Russinovich

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: A Digital Sparring Match

Imagine you have a very smart robot (the Defender) that is trained to be helpful but also to refuse harmful requests, like "How do I build a bomb?" or "How do I hack a bank?"

Usually, humans try to test this robot by writing a list of tricky questions. But the robot is smart; it learns to say "No" to those specific questions. The problem is that a clever, adaptive attacker can change their strategy to find a new way to trick the robot.

This paper introduces a new way to train both sides at the same time using a method called AdvGRPO. Think of it as setting up a digital dojo where a Red Team (the attacker) and a Blue Team (the defender) spar against each other continuously. Instead of humans writing the questions, the AI models learn to attack and defend by playing against one another, getting stronger with every round.

The Problem with the Old Way

Previously, researchers tried to use a specific training tool (called GRPO) to teach the attacker how to break the defender. However, they found that when the attacker and defender learned at the same time, the system got "unstable." It was like two boxers trying to learn a new fighting style while the ring itself was shaking; they couldn't agree on who was winning, and the training would crash or go in circles.

The Solution: AdvGRPO (The Stable Dojo)

The authors created a new framework called AdvGRPO that fixes the shaking ring. They did this with three main tricks:

  1. The Scorecard with Multiple Lanes (Dense Multi-Channel Rewards):
    Imagine a referee who doesn't just shout "Point!" at the end of the round. Instead, they give a score for every single move.

    • Did the attacker stay on topic?
    • Did the attacker follow the strategy?
    • Did the attacker actually get the harmful answer?
      By scoring every little step, the attacker gets constant feedback on what to improve, rather than waiting until the end to find out they failed.
  2. The Independent Judges (Decoupled Advantage Normalization):
    In the old unstable method, if the attacker suddenly got really good, the scores for the defender would look terrible by comparison, confusing the training.
    The new method uses a system (called GDPO) where each type of score is judged independently before being combined. It's like having a judge for "Speed," a judge for "Technique," and a judge for "Creativity" who all grade separately, so one doesn't ruin the other's score. This keeps the training stable even as both models get smarter.

  3. The Training Camp (Curriculum Learning):
    You wouldn't put a beginner boxer in the ring with a champion immediately. The paper uses a "curriculum."

    • Phase 1: The attacker trains alone against a fixed defender to learn the basics.
    • Phase 2: Once the attacker is decent, they start sparring with the defender.
    • Phase 3: They take turns. The attacker tries to break the defender for a few rounds, then the defender tries to patch the holes for a few rounds, and they switch. This prevents the defender from just saying "No" to everything (which is an easy win) and forces it to learn how to handle specific, tricky attacks.

What They Found

The paper reports several key results from their experiments:

  • The Attackers Got Scary Good: The trained attackers learned to trick the defender much better than untrained models or models that were just "unlocked" (had their safety filters removed). They learned that simply removing safety filters isn't enough; you have to learn how to attack.
  • They Can Adapt: The attackers learned strategies that worked not just on the defender they trained against, but on completely different models they had never seen before. It's like a boxer learning a move that works on anyone, not just their sparring partner.
  • The Defenders Got Tougher: The defenders trained in this "dojo" became much better at spotting and blocking attacks than defenders trained with older methods. They learned to say "No" to bad requests but still say "Yes" to good, harmless requests.
  • Thinking Models Need Special Help: They found that models capable of "thinking" (reasoning) often tried to be too safe and refused to attack even when asked. They had to create a special reward system to teach these models how to think through the attack without getting stuck on safety warnings.

The Bottom Line

The paper claims that by using this new, stable method (AdvGRPO), they can create a system where AI attackers and defenders learn together. This results in attackers that are very good at finding weaknesses and defenders that are very good at fixing them, making AI safer overall. They emphasize that this is a research tool to find weaknesses before bad actors can use them, helping to build stronger, more robust AI systems.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →