Ai21 Alice Case Study
Captured source
source ↗Post-Training Nemotron to Beat GPT-6.1 on Attack Resilience
Skip to Main Menu
Skip to Main Content
Skip to Footer
Back to Blog
-->
Back to Blog
Back to Blog
-->
This blog is authored by Assaf Gerner, Guy Rephaeli, Asaf Karnieli, Guy Freund, Shaked Meirom and Joanna Kramer, in collaboration with Alice’s Liran Cohen and Dadi Atar.
Over just three weeks, our Forward-Deployed Researchers (FDRs) worked alongside Alice’s research team to post-train the recently released NVIDIA Nemotron 3.5 Super VL to improve its resilience to attacks such as indirect prompt injection and malicious requests. The results demonstrate how specialized open models can surpass frontier-level quality at a fraction of the cost:
41-point improvement on attack resilience as compared to the base model
10-point improvement as compared to GPT-6.1 Sol
25x cheaper than GPT-6.1 Sol (cost per 1M tokens)
Figure 1: Our training recipe lifted Nemotron 3.5 Super VL from comparable in quality and cost to GPT-6.1 Luna to surpassing GPT-6.1 Sol in quality at a fraction of the cost.
This post details Alice’s use case and presents the custom training recipe our FDRs developed to achieve the frontier-level results above.
Improving agent resilience to attacks with Alice
Alice , an AI safety and security company, builds RL Environments for post training that are informed by real-world intelligence on threat actor behavior (the “Rabbit Hole”) and input from 150+ staff security researchers and expert network members. They provided AI21 with a set of RL gyms to train agents to defend against security threats across their enterprise environments, including platforms, systems, tools, data, and workflows, such as Slack and GitHub. The goal is to produce agents that score highly on both resistance to attacks and task completion – so that one aspect does not come at the expense of the other. The goal is to produce agents that score highly on both resistance to attacks and task completion – so one aspect does not come at the expense of the other.
Figure 2: An example Slack task from Alice’s gym. Company and domain names are fictional.
One kind of these attacks is indirect prompt injection – malicious instructions planted in information an agent reads with tools. For example, an agent might be prompted to send a password reset reminder to employees on Slack – but the reset link is corrupted, risking exposing employee login credentials. An agent trained in Alice’s RL gyms will learn to detect that breach and prevent it, while still accomplishing its original task: notifying employees to reset their passwords (Figure 2).
As more enterprises integrate agents into their core workspaces – which entails high levels of access to sensitive information, as well as widespread access to employees – ensuring that these agents are equipped to spot and stop attacks becomes paramount. Our work post-training Nemotron 3.5 Super VL on Alice’s RL gyms proves that it’s possible for an agent to maintain high attack resilience alongside task completion.
The challenge
To successfully post-train Nemotron 3.5 Super to excel on this use case, the FDR team had to address two core challenges.
The first challenge was how to improve attack resilience without hurting task completion on regular benign tasks. To take the example from above, if the Slack agent refuses to stop working after it detects the malicious reset link, it has successfully defended the company – yet is ultimately not a very useful agent.
The second challenge was around data. Given that the training dataset included several hundred examples, the team needed to find a way to train without overfitting the model to the training data.
Our FDR team carefully designed the post-training process to resolve these challenges.
Methodology
Training the agent inside Alice’s RL gyms
Addressing both challenges meant training Nemotron 3.5 Super the way it will actually be used: as an agent acting inside a live environment, not as a model answering isolated prompts. Alice’s gyms are packaged as Harbor tasks [1], and each task comes with its own container image holding a simulated workspace, such as Slack or GitHub. For every rollout, the AI21 Training Platform launches a fresh, isolated sandbox from that image. The model then works through the task inside the sandbox: it reads messages, calls tools and takes actions. When the episode ends, the gym scores the outcome. Giving each rollout its own sandbox keeps training secure, because anything the agent does in response to an attack stays inside the sandbox. We use this same setup throughout: to generate the trajectories for SFT, to produce the live rollouts for GRPO, and to evaluate every checkpoint.
Warm-starting with near-policy SFT
Online reinforcement learning has become the standard approach for post-training language models. Because it is on-policy, the model learns from rollouts it generates during training rather than from a dataset collected in advance. Training on its own outputs improves quality and reduces the risk of catastrophic forgetting. The most widely used online RL method, GRPO, samples a group of rollouts for each prompt and compares them, so the model learns what separates better outputs from worse ones. This means GRPO learns only when the rollouts in a group receive different rewards. If every rollout in a group gets the same score, every advantage is zero, the group contributes no gradient, and nothing is learned.
Figure 3: How surprised the base model is by each model’s rollouts. We score each set of rollouts by its perplexity under the Nemotron base model. Lower perplexity means the rollouts are closer to the base model’s own distribution. Values are shown relative to the base model’s perplexity on its own rollouts (reference). Average OS Model: the mean over rollouts from open-source models whose rollouts served as SFT data. Original SFT: rollouts from the policy fine-tuned on those rollouts as-is. Rephrased SFT: rollouts from the policy fine-tuned on the rephrased versions. Error bars show 95% CIs.
However, when the FDR team ran the initial evaluation of Nemotron 3.5 Super, they found that the rewards of its rollouts rarely varied within a group. Before they could move to RL, they first ran a supervised fine-tuning (SFT) stage to raise the fraction of tasks with non-zero reward variance within a group [2]. After SFT, the share of training tasks with non-zero reward standard deviation rose from 35%...
Excerpt shown — open the source for the full document.
Notability
notability 3.0/10Case study post, low traction, routine marketing content.