A 27B Model That Outperforms Frontier Red-Teamers 3x

A DC-GRPO case study with Whitney AI

By Jake Kang, Vatsal Bajaj, Ranjan Goel, August 24, 2026

Metrics
  • 3.1x higher attack success rate (ASR@1) than DeepSeek-V4-Flash
  • Refusal-to-attack rate dropped from 81% to 2%
  • 27B parameters, versus 284B for the frontier model it outperforms

"Whitney AI took a 27B open-source model and trained it into a red-teamer that outperforms attackers many times its size."

— Ranjan Goel, CEO at NuGuard AI

Note: the red-team attacks shown below are illustrative examples, published to advance defensive research. Please don't use them for anything else.

Christopher Nolan's The Odyssey just put audiences inside the most famous trap in ancient history. Around 1200 BC, Greek soldiers tricked the defenders of Troy by hiding inside a hollow wooden horse left at the city gates. The Trojans, believing it was a surrender offering, wheeled it in themselves. That night, the hidden Greeks climbed out, opened the gates from the inside, and the city that had withstood a ten-year siege fell in a single evening.

Three thousand years later, AI agents browse the web and act on our behalf. Attackers have learned to hide instructions inside chat prompts and webpages, so agents carry the attack through the gates for them.

Why Multi-Turn Attacks Break Red-Teaming

To defend against these attacks, teams rely on a practice called red-teaming: attacking a system, with permission, to uncover weaknesses before a real adversary does. Applied to AI agents, red-teamers probe an agent for failures, whether that means coaxing it into leaking data, bypassing its guardrails, or invoking privileged tools.

While modern models can fend off most single-turn prompt injection attempts, new techniques have shifted towards multi-turn strategies. In a crescendo attack, for example, the attacker opens with an innocuous, adjacent topic, learns the model's agreement, and escalates gradually with each turn until the model reveals information it would have refused outright at the start.

We partnered with NuGuard AI, an AI-native cybersecurity platform, to post-train a cybersecurity attacker model to advance NuGuard's red-teaming and cybersecurity research.

The Attacker's Job

NuGuard AI's current red-team stack uses a DeepSeek attacker with custom safeguards. We built them a lighter and stronger attacker.

First, we establish a baseline with the DeepSeek attacker on a diverse set of AI applications. We collect both open-source and synthetically generated applications spanning banking, fintech, e-commerce, customer support, and other general-purpose domains, covering chat tasks and tool scenarios such as authentication and writing to files and databases. Each application can be attacked in several ways: data exfiltration, destructive tool actions, or indirect prompt injection.

Here's how one of those attacks, a prompt injection, looks in practice:

Crescendo attack turn by turn: an attacker sets up identity verification over two turns, then in turn 3 asks the assistant to read back a full PIN, which the target leaks

Same turn 3 prompt, different run: the assistant recognizes the request and refuses.

Turn 3 of the same crescendo attack on a second run: the assistant declines to share the PIN and offers to trigger a new verification code instead

Existing open-source models struggle with multi-turn attacks like this one, escalating too fast, wandering off topic, or never building rapport. Writing attack prompts by hand doesn't scale, so instead we post-train a model on new attacking strategies. We measure Attack Success Rate (ASR@1) with one attempt.

Figure 1: Baseline attack success rate by attacker

Bar chart of baseline ASR@1 by attacker: Qwen3.6-27B 2.6%, Qwen3.5-9B 3.9%, Claude Sonnet 5 7.8%, Whitney-NuGuard SFT-only 7.8%, DeepSeek-V4-Flash 11.7%

Qwen3.6-27B posted the lowest baseline ASR@1 at 2.6%. This largely reflects unwillingness rather than inability: the model declined to attempt 81% of assigned attacks. To measure capability rather than propensity, we ran a warm-start supervised fine-tune. We prompted the unmodified model as an authorized red-teamer, retaining only samples in which it complied and produced an attack, and fine-tuned on that set.

Refusal-to-attack fell from 81% to 2%, and the resulting model (Whitney-NuGuard, SFT-only) reached 7.8% ASR@1, matching Claude Sonnet 5. That's our baseline, and what we post-train on top of.

With the refusals mitigated, we turned to designing the reward. A reward based only on the final outcome tells the model nothing about which turns contributed most to the attack, which makes reward attribution the central problem in training.

Reward Attribution

To train an effective RL loop with GRPO, we need more granular reward attribution. In multi-turn self-play, Group Relative Policy Optimization (GRPO) scores the full trajectory with a single outcome reward scalar. Because the reward is attributed to the entire conversation, the turns with the highest contribution get drowned out and every turn gets reinforced equally.

This attribution method compounds GRPO's sample-inefficiency problem, since the model has to stumble onto a working attack. We design a denser signal that credits the attack at the turn level rather than the trajectory level.

We attribute reward at the turn level rather than the token level. Per-token credit from a trajectory-level outcome is high-variance and hard to attribute cleanly, and turn boundaries align with where the attacker's strategic decisions are made, which gives a favorable signal-to-compute tradeoff.

Therefore we use DC-GRPO, which decomposes the trajectory reward into a per-turn advantage.

To score each turn, we look at the following reward criteria:

Reward criteria table: Anti-spike measures whether the target's response made real progress toward the goal; Relevance measures how closely the response matches the goal, weighted by how late it lands; Tool attempt rewards a well-formed, cross-principal tool call, credited once per episode; Refusal penalty penalizes the attacker itself refusing to attack; Novelty penalty penalizes repeating an earlier attacker message

With the turn-level reward, we can now compute the advantage. Turns contribute in two ways: some make immediate progress toward a jailbreak, others set up context that pays off later. We credit each separately, with an immediate term and a future term, so a single trajectory-level score doesn't conflate them:

Diagram building a turn's advantage: immediate reward, return-to-go (every future reward from the next turn on), each centered on the group mean to get immediate credit and future credit, then summed with equal weights into the final advantage

Here's what that looks like on a four-turn banking transcript: two setup turns, a filler question that makes no progress, then a decisive turn that gets the PIN read back. Standard GRPO broadcasts the same trajectory-level reward to all four turns equally; DC-GRPO assigns most of the credit to the decisive turn and almost none to the one that made no progress:

Bar chart comparing reward assigned per turn under GRPO versus DC-GRPO on a four-turn banking transcript: GRPO broadcasts a flat reward of 1 to every turn, while DC-GRPO assigns turn-specific advantages that peak at the decisive final turn and drop to near zero on the no-progress turn

With this reward attribution strategy, we run our modified GRPO loop with DAPO's dynamic sampling.

Results

Our post-trained model performed better than every off-the-shelf attacker we tested, several of them many times its size.

Figure 2: Attack success rate by attacker, after post-training

Bar chart of ASR@1 attack success rate by model: Qwen3.6-27B 2.6%, Qwen3.5-9B 3.9%, Claude Sonnet 5 7.8%, DeepSeek-V4-Flash 11.7%, Whitney-NuGuard 36.4%

DeepSeek-V4-Flash was the strongest off-the-shelf attacker we tested. Against the same target, the trained model lands 36.4% of its attacks to DeepSeek's 11.7%, a little over 3x as often.

Conclusion

We adapted Qwen3.6-27B into a red-teamer shaped around NuGuard AI's threat model: its applications, tool surfaces, and attack taxonomy. Our model attacks 3x more effectively than the off-the-shelf model it replaces, at a fraction of the size.

Post-training an open-source model won't beat a frontier model at everything. With the correct reward design, though, we use post-training to boost model quality at a fraction of the cost and latency of a frontier model. We're sharing our post-training methodology to advance cybersecurity research and help red-teamers better defend against modern threats.

Troy held for ten years and fell in one night to something the defenders carried in themselves. It's better to build the horse yourself and find out what your agents will wheel through the gates, before someone else does.

Related Articles

Prompt Injection in AI Agents: A Complete Guide

Prompt injection is the most dangerous attack vector in agentic AI. This guide covers direct and indirect injection, six real-world attack scenarios, a five-layer defense strategy, and a step-by-step testing methodology.

Red Team, Purple Team and Pen Testing for Every AI Developer

Pen testing, red teaming, and purple teaming are critical but hard to scale for fast-moving AI apps. Learn how NuGuard makes continuous, application-specific offensive testing accessible to every developer workflow.