SRFT self-reflection fine-tuning improves agents' resistance to prompt injection
Start here
On October 3, 2026, a research team from Johns Hopkins University, Washington University in St. Louis and other institutions released a paper proposing a safety training method called SRFT (self-reflection fine-tuning), which lets models learn from their own erroneous decisions to resist prompt injection. The method first has the model to be trained sample candidate actions from tool returns containing injected content, then an expert model compares them with the correct action and generates reflection text explaining the cause of the error and its potential consequences, and finally the reflection text together with the correct action is used for LoRA supervised fine-tuning. Results on the AgentDojo benchmark in the paper show that after SRFT training, the prompt injection attack success rate of Llama-3.1-8B dropped from 7.59% to 1.26%, and that of Qwen3-8B from 16.97% to 1.05%.
Generated by AI from reports · Updated 16 days ago
Related research
Cited in the reports
Papers whose work the reports mention
- The reports mention AgentDynAgentDyn: Are Your Agent Security Defenses Deployable in Real-World Dynamic Environments?Large model self-reflection fine-tuning lets agents learn to defend against unknown prompt injection
arXiv · 2026-02-03
- The reports mention Meta-SecAlignMeta-SecAlign: Training LLMs against Prompt Injection for Robust AgentsLarge model self-reflection fine-tuning lets agents learn to defend against unknown prompt injection
arXiv · 2025-07-03 · Deep reading
- The reports mention SecAlignSecAlign: Defending Against Prompt Injection with Preference OptimizationLarge model self-reflection fine-tuning lets agents learn to defend against unknown prompt injection
ACM CCS 2025 · 2024-10-07 · Deep reading
- The reports mention AgentDojoAgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM AgentsLarge model self-reflection fine-tuning lets agents learn to defend against unknown prompt injection
arXiv · 2024-06-19 · Deep reading
- The reports mention InjecAgentInjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model AgentsLarge model self-reflection fine-tuning lets agents learn to defend against unknown prompt injection
arXiv · 2024-03-05 · Deep reading
Progress timeline
- WebAI Threat Watch (aithreat.io)· Media coverageSelf-reflection fine-tuning for large models teaches agents to defend against unknown prompt injection(opens the original post in a new tab)
- Anquan NeicanLarge model self-reflection fine-tuning lets agents learn to defend against unknown prompt injection
A research team from Johns Hopkins University, Washington University in St. Louis and other institutions proposed the self-reflection fine-tuning method SRFT, which lets agents learn from their own erroneous decisions to defend against prompt injection. The method first has the model sample candidate actions in attacked contexts, has an expert model generate reflection text explaining the reasons for and consequences of the errors, and then performs LoRA supervised fine-tuning together with the correct actions. On AgentDojo, Llama-3.1-8B's attack success rate dropped from 7.59% to 1.26%, and Qwen3-8B's from 16.97% to 1.05%; against the RL-Hammer adaptive attack, the original Llama-3.1-8B model had an attack success rate of 98.5%, and after SRFT training only 17.5%.
- WeChat · Mo'anjuLarge-model self-reflection fine-tuning SRFT lets agents learn to defend against unknown prompt injection
A team from Johns Hopkins University and other institutions released a paper on October 3, 2026, proposing the SRFT (self-reflection fine-tuning) safety training method: first, the model to be trained samples its own candidate actions from tool returns containing injected content; then an expert model compares the correct action, analyzes the cause of the error and potential consequences, and uses the reflection text together with the correct action for supervised fine-tuning. On AgentDojo, Llama-3.1-8B's attack success rate dropped from 7.59% to 1.26%, and Qwen3-8B's from 16.97% to 1.05%; against the RL-Hammer adaptive attack, after 20 rounds of attack training, Llama-3.1-8B's SR-Agent attack success rate was 17.5%, lower than the original model's 98.5% and Meta-SecAlign's 69.5%. Ablation experiments showed that on Qwen3-8B, removing the error action analysis raised the attack success rate from 17.0% to 65.0%.
Related discussion
- Older than 72 hours · Not included in the 72-hour figures
- WebAI Threat Watch (aithreat.io)Self-reflection fine-tuning for large models teaches agents to defend against unknown prompt injection(opens the original post in a new tab)