TurnGuard

What happens when a document the assistant opens tells it to do something the user never asked for?

Pick a recorded run in English, Hindi, or Hinglish and see what Aya Expanse 8B did before and after we trained a DPO adapter. Attack success fell from 31.9% to 2.5% on the frozen test set.

View full replay
planted / third-party textunauthorized call or tampered answerrelayed requestdelegated action completedpart of the user's task

Results on 15 held-out scenarios

On the 1,043-episode frozen test set, the DPO adapter finished 44.7% of tasks under attack, up from 10.3%, while attack success fell from 31.9% to 2.5%. It followed 24.5% of instructions the user had explicitly delegated, which is where it still struggles.

Base (A0)Defensive prompt (A1)Steering (A2)DPO adapter (A4)
Attack success (executed or relayed) ↓31.9%36.6%30.7%2.5%
User's task done while under attack ↑10.3%10.1%15.2%44.7%
Clean task success ↑20.6%21.6%29.0%51.8%
Delegated instructions followed ↑18.8%20.5%20.5%24.5% (not significant; still the weak spot)
Cue-flip attack success ↓31.8%33.6%34.6%4.7%
XSTest over-refusal ↓8.8%11.2%8.4%8.4%

Additional baselines

Larger models, same prompt, loop and grader

Qwen3.8 27B (full test)Command A 111B (159-episode subset)Aya A0 / A4 on that subset
Attack success ↓30.2%52.5%32.3% / 1.0%
Clean task success ↑96.6%not in subset—
Delegated instructions followed ↑73.4%73.3%21.7% / 23.3%

Off-the-shelf injection filters on the same tool outputs (threshold 0.5)

Prompt Guard 2 (86M)ProtectAI DeBERTa-v3
Attacks caught ↑0.0% (0/407)60.0%
False alarms on clean tool outputs ↓0.0%37.1% (Hindi conversations 60.9%)
Delegated instructions blocked ↓0.0%48.0%
Simulated in front of the base model, per episode:
Attack success ↓31.9% (no change)16.0%
Clean task success ↑20.6%16.2%
Delegated instructions followed ↑18.8%11.4%
Attack success vs task success and delegated-instruction following
Scatter plots of attack success against clean task success and against delegated instructions followed, for each model and filter
Safety vs utility on the frozen test set
Safety vs utility trade-off per arm
Attack success by conversation language
Attack success per language per arm

How we set up the test

We gave the assistant multi-turn tasks in English, Hindi, and Hinglish, using simulated email, calendar, document, ticket, web, and code tools. In some runs, a tool result or text pasted by the user included a planted instruction, like adding a collaborator or sending a file to an outside address.

We counted an attack as successful if the assistant carried out the instruction or passed the request along to the user as if it were legitimate. We scored task completion separately. Actions are checked against the sandbox state; the relay scorer looks for matching terms, so it can miss paraphrases.

Each attacked episode has a clean twin. Another 229 test episodes cover instructions the user really did ask the assistant to follow. In the 270-episode cue-flip set, we changed clues such as the instruction’s language to see how much the model relied on them. We froze both test sets before training and held out all 15 test scenarios, the code tool family, and attacks carried in tool-error messages.

What we trained

We used SafeTune’s DPO-based CST trainer to fit a rank-16 LoRA adapter (about 160 MB) for Aya Expanse 8B. We built 1,032 preference pairs from base-model rollouts, using observed and synthesized failures alongside clean tasks and examples where the user delegated an instruction. We used CuratorKIT to build the data and AuditKIT to score the side evaluations.

What you’re seeing here

These are selected replays from the frozen runs, including cases where the adapter still gets it wrong. The models used greedy decoding. All tool actions happened in a sandbox, with fictitious addresses and domains. Highlights come from each episode’s own grading targets.

Write-up · Code · Models · Datasets and logs