inferwire
/
AI·2 min read

SafeEvolve Trains Agents and Their Safety Rules Together

SafeEvolve turns lessons from an agent's own runs into updated safety prompts and skills, then trains the model to use them. A 4B model's attack success rate on AgentDojo fell threefold.

TL;DR

  • SafeEvolve improves AI agent safety by evolving the harness around the model, such as its safety prompt and skills, together with the model's own behavior [^1].
  • On the AgentDojo benchmark, it cut the attack success rate against Qwen3.5-4B threefold while raising its success on harmless tasks from 59.79 to 61.86 percent [^1].

Background

An agent's behavior depends on its base model and its harness, editable components such as instructions, skills and memory that mediate how it acts [^1]. Safety can fail in the final answer or along the way, through unsafe tool calls or plans that follow injected instructions [^1]. Existing methods tend to update either the harness or the model. The authors argue harness-only changes can demand more than the model reliably follows, while model-only training transfers poorly and misses new kinds of failure [^1].

What happened

Researchers from the Shanghai AI Laboratory, Shanghai Jiao Tong University, Fudan University, HKUST and Zhejiang University built SafeEvolve, which learns from the safety evidence in an agent's completed runs and feeds it into a continuing loop [^1]. On the harness side, it turns that evidence into bounded updates to individual components, the safety prompt and a hierarchy of skills, producing changes that can be audited and reversed [^1]. On the model side, it first fine-tunes the agent to actively use the evolved harness components, then uses reinforcement learning with rewards split up by verifiers to shape safe behavior over multi-step tasks [^1].

On agentic safety benchmarks, SafeEvolve achieved a better balance of safety and usefulness than existing baselines [^1]. For Qwen3.5-4B on AgentDojo, attack success fell threefold while benign utility rose from 59.79 to 61.86 percent [^1].

Why it matters

Safety measures for agents often cost usefulness: a model that refuses more is also less helpful. A method that cuts successful attacks threefold without losing benign performance suggests the trade-off is not fixed. That the harness changes are auditable and reversible also matters for deployment, where teams need to know what changed and why [^1].

Practical example

Say an email agent once followed a malicious instruction hidden in a message and forwarded private files. Under SafeEvolve, that run becomes evidence: the safety prompt gains a bounded rule about instructions found in content, a skill for handling such cases is updated, and the model is trained to apply both, so the next injected instruction is less likely to work [^1].

Related gear

We recommend this book because it explores fundamental principles for aligning autonomous systems with human intent and safe operational boundaries.

AdvertisementAmazon

Human Compatible: Artificial Intelligence and the Problem of Control

Sources

  1. [1]arXiv — SafeEvolve: Harness-Policy Co-Evolution from Agent Experience for Safety Alignment