- Rating
- 3(+1)
- Confidence
- 4
- Informativeness
- 2
- Presentation
- 3
- Soundness
- 1
Read review
Paper summary
This paper proposes Self-Reflection Fine-Tuning (SRFT) to improve tool-using agents’ robustness against prompt injection. The framework constructs attacked trajectories, samples candidate actions from the agent, and uses an expert model to generate rationales contrasting these actions with the desired actions. The agent is then supervised fine-tuned to produce the rationales and correct actions. Experiments evaluate security and utility on AgentDojo and robustness against target-specific RL-Hammer attacks on InjecAgent.
The problem is important and the results are promising. However, I find the methodological distinction from rationale-augmented supervised fine-tuning insufficiently established, and the experimental coverage too limited to support the paper’s broad claims about generalization and adaptive robustness.
Critical strengths
-
The paper addresses an important and practically relevant problem: defending tool-using agents against prompt injection while preserving legitimate task performance.
-
The paper is generally clear and easy to follow. The stages of data construction, reflection generation, and fine-tuning are presented coherently.
-
The evaluation includes useful training-time and inference-time ablations, as well as an analysis of inference token usage. In particular, the comparison with training on the same attacked trajectories without reflection provides evidence that the reflection supervision contributes under the evaluated attack setting.
Critical weaknesses
-
The methodological contribution beyond supervised fine-tuning needs clearer justification. Section 4.5 uses a standard supervised objective, and the reflections are generated by an external expert model. The main contribution therefore appears to lie in constructing failure-conditioned training targets rather than introducing a distinct learning algorithm. Although the ablations support the usefulness of these targets, they do not fully establish the necessity of agent-specific failure experience compared with expert-generated safety rationales that do not depend on the agent’s sampled actions. The paper’s broad contrast between SFT and SRFT consequently seems overstated.
-
The adaptive attack evaluation is too narrow. RL-Hammer is the only adaptive attack framework evaluated, while AgentDojo uses only the default “important instructions” attack. Additional attacks that appear stronger in the literature, such as AutoInject (Chen et al., 2026), adaptive attack (Andriuschenko et al., 2024), and the evolutionary search attacks (Nasr et al., 2025), would provide stronger evidence of robustness against strong baselines. Robustness against one attacker-training procedure is insufficient to establish broad robustness against adaptive adversaries.
-
The evidence for generalization remains limited. The paper evaluates Llama-3.1-8B and Qwen3 at 4B and 8B, which provides some cross-family evidence. Nevertheless, the strongest adaptive comparison with an existing defense is concentrated on Llama-3.1-8B, while the Qwen3 adaptive experiments compare primarily against the undefended model. Broader matched comparisons across backbones and attack methods are needed to substantiate the claimed generality.
-
Some conclusions about practicality and utility are stronger than the results support. On Qwen3, both benign utility and utility under attack decrease after SRFT, despite the security improvements. The trade-off calculation is also problematic. It is computed as utility under attack + 100 - ASR, but it ignores benign utility, which people are generally more concerned about. For the same reason, a higher number in the trade-off calculation does not mean this method is more convincing. I personally find this metric confusing and would recommend removing it in future supervisions.
Questions for authors
-
What is the intended methodological distinction between SRFT and supervised fine-tuning on failure-conditioned, expert-generated rationales? Would expert-generated rationales without access to the agent’s sampled candidate actions achieve comparable results?
-
How does SRFT perform against additional target-adaptive attacks, particularly AutoInject and evolutionary search, that are designed for prompt injection? Do the relative improvements persist under comparable attack budgets?
-
Table 1 currently only has comparisons with Llama-3.1-8B. Can the authors provide performance results for additional models to show the method's applicability beyond Llama-3.1-8 B?
5 comments
Responses to Reviewer Qhw2 (Part 2/2)
W3 : Evidence for generalization is limited. The strongest comparison with an existing defense is only on Llama-3.1-8B, and the Qwen3 adaptive experiments only compare with the undefended model.
A3: Thanks for the suggestion. We evaluate SRFT on Llama-3.1-8B, Qwen3-4B and Qwen3-8B, which covers two model families and two scales, and SRFT consistently improves security under both static and adaptive attacks across them.
First, we compare SRFT and Meta-SecAlign on the same Llama-3.1-8B backbone, and AgentDojo follows the important_instructions protocol. The results are shown below:
| Defense | Benign Utility (%) ↑ | UA (%) ↑ | AgentDojo ASR (%) ↓ | RL-Hammer ASR (%) ↓ |
|---|---|---|---|---|
| Meta-SecAlign | 23.71 | 19.07 | 0.95 | 69.5 |
| SRFT | 37.11 | 29.08 | 1.26 | 17.5 |
We observe that SRFT has higher benign utility and UA with comparably low AgentDojo ASR, and much lower RL-Hammer ASR (17.5% vs. 69.5%).
Second, on Qwen3-4B, SRFT reduces AgentDojo ASR from 10.85% to 0.84%, and we further compare it with Meta-SecAlign on the same backbone. The results are shown below:
| Defense | Benign Utility (%) ↑ | ASR (%) ↓ |
|---|---|---|
| Meta-SecAlign | 42.30 | 0.70 |
| SRFT | 50.52 | 0.84 |
We observe that SRFT has 8.22 points higher benign utility with comparably low ASR. On Qwen3-8B, SRFT also reduces RL-Hammer ASR from 59.5% to 17.0%, which further supports its effectiveness across model families.
W4 : Claims about practicality are stronger than the results. Utility drops on Qwen3, and the trade-off metric ignores benign utility.
A4: Thanks for pointing this out. We agree that benign utility should be considered, so we replace the trade-off metric with Benign Utility − ASR, and still report Benign Utility, UA and ASR separately. The revised results are shown below:
| Model | Benign Utility ↑ | UA ↑ | ASR ↓ | Benign − ASR ↑ |
|---|---|---|---|---|
| Qwen3-4B | 57.73 | 50.58 | 10.85 | 46.88 |
| Meta-SecAlign-4B | 42.30 | — | 0.70 | 41.60 |
| SRFT-4B | 50.52 | 49.21 | 0.84 | 49.68 |
| Qwen3-8B | 60.82 | 50.47 | 16.97 | 43.85 |
| SRFT-8B | 51.55 | 46.68 | 1.05 | 50.50 |
Actually, the utility drop is a common problem for security alignment. On Qwen3-4B, Meta-SecAlign drops benign utility by 15.43 points, while SRFT only drops it by 7.21 points with comparably low ASR. Under the revised metric, SRFT improves the score from 46.88 to 49.68 on Qwen3-4B and from 43.85 to 50.50 on Qwen3-8B, which is also higher than 41.60 of Meta-SecAlign-4B. Moreover, on Llama-3.1-8B, SRFT improves benign utility from 27.84% to 37.11% and UA from 23.08% to 29.08%, while Meta-SecAlign lowers benign utility to 23.71%, so the utility drop does not happen on every backbone. These results further demonstrate that SRFT gets a better trade-off between utility and security than the state-of-the-art defense.
Q1 : What is the methodological distinction between SRFT and SFT on failure-conditioned expert rationales? Would expert rationales without the sampled actions work as well?
A5: As discussed in A1, the difference is that the reflections in SRFT are built on sampled candidate actions and their consequences. The without failure-action analysis variant keeps the expert rationales that find the injection and explain its risks, and only removes the analysis of candidate actions, and its RL-Hammer ASR goes from 17.0% to 65.0%. So expert rationales without the analysis of sampled actions can not reach comparable results, which shows the extra value of reflecting on candidate actions.
Q2 : How does SRFT perform against AutoInject and evolutionary search under comparable attack budgets?
A6: As discussed in A2, we evaluate PAIR adapted to indirect prompt injection with the same query budget for both targets. SRFT reduces ASR from 27.0% to 10.0% with 30 queries and from 66.0% to 23.0% with 90 queries, so the improvement still holds under a different attack framework.
Q3 : Can the authors provide results on models beyond Llama-3.1-8B?
A7: As discussed in A3, we also evaluate SRFT on Qwen3-4B and Qwen3-8B. On AgentDojo, SRFT reduces ASR from 10.85% to 0.84% on Qwen3-4B and from 16.97% to 1.05% on Qwen3-8B, and under RL-Hammer it reduces Qwen3-8B ASR from 59.5% to 17.0%. These results show that SRFT also works well beyond Llama-3.1-8B, across different model families and scales, and we will add them to Table 1 in the revised version.
Thanks again for the valuable comments. We hope our responses address your concerns, and if so, we would appreciate it if you could consider raising your rating. We are also happy to discuss any further questions.
Follow-up on Our Rebuttal
Dear Reviewer Qhw2,
Thank you again for your valuable feedback. We have added three experiments to the revised paper, with changes marked in blue:
- Clean-SFT control. Compared with clean SFT using the same trajectories and training recipe, SRFT achieves higher benign utility (37.11% vs. 28.87%) and lower RL-Hammer ASR (17.5% vs. 74.0%) (Section 5.5.1). This indicates that generic agentic fine-tuning alone does not explain SRFT’s gains.
- Additional AgentDojo attack template. Across two attack templates, SRFT reduces ASR from 12.96% to 1.48% while improving utility under attack from 23.87% to 29.29% (Appendix C.2).
- Additional adaptive attack. Under PAIR on Qwen3-8B, SRFT reduces cumulative ASR from 66.0% to 23.0% with up to 90 queries per case (Appendix C.5). This shows that the robustness gains extend beyond RL-Hammer to iterative attack refinement.
As the discussion period is ending soon, we would appreciate your feedback on our responses. If they have addressed your concerns, we would be grateful if you would consider raising your score.
Best regards,
The authors
Responses to Reviewer Qhw2 (Part 1/2)
We thank the reviewer for the patient and professional review, as well as the valuable suggestions for improvement. The changes are marked in blue in our revision. Our responses to the reviewer's questions are below:
W1 : The contribution beyond SFT needs clearer justification. SRFT uses a standard supervised objective with expert reflections, and the ablations do not fully show that agent-specific failure experience is needed compared with expert rationales that do not depend on sampled actions.
A1: We agree that SRFT uses a standard supervised loss, and our contribution is how the training targets are built. Each reflection is built on candidate actions sampled under attack, and the expert compares them with the optimal action and explains why some tool calls fail the user's goal and what will happen after them. So besides imitating the right action, the agent also learns to check its next action against the user's goal, and it does this by itself at inference time.
To figure out whether this action analysis really matters compared with expert safety rationales, we conduct an ablation on Qwen3-8B under RL-Hammer. The without failure-action analysis variant still has expert-written rationales that find the injection and explain its consequences, and it only removes the comparison between the sampled actions and the optimal action. All other settings are kept the same, eg., the attacked trajectories and the expert actions. The results are shown below:
We observe that ASR increases from 17.0% to 65.0% after removing the action analysis, which is close to training without reflection (60.0%). It shows that expert rationales without the action analysis can not reproduce the robustness of SRFT, and reflecting on concrete actions is really important. In the revised version, we will make it clear that SRFT differs from SFT in how the training targets are built.
W2 : The adaptive evaluation is too narrow. RL-Hammer is the only adaptive attack, AgentDojo only uses the default attack, and stronger attacks such as AutoInject, Andriushchenko et al. and evolutionary search are missing.
A2: Thanks for the suggestion. To further validate the robustness, we add one more AgentDojo template and one different adaptive attack.
First, we add the
tool_knowledgetemplate, so each of the 949 task–injection pairs in AgentDojo is tested under bothimportant_instructionsandtool_knowledge. A pair counts as compromised if either template succeeds, and UA is averaged across templates. The results are shown below:We observe that SRFT reduces AgentDojo ASR from 12.96% to 1.48% and improves UA from 23.87% to 29.29%, so the gains still hold beyond the single template.
Second, we adapt PAIR, an iterative attack-refinement method, to indirect prompt injection on Qwen3-8B. A Llama-3.1-8B-Instruct attacker, without fine-tuning, writes the injected tool content and keeps revising it based on the target responses and attack feedback. We use 100 InjecAgent cases with 30 parallel streams × 3 rounds, so there are up to 90 target queries per case, and both targets use temperature 0.6 with the same configuration as our Qwen RL-Hammer evaluation. A case counts as compromised if any query leads to an attacker-directed tool call. The results are shown below:
We observe that SRFT reduces ASR from 27.0% to 10.0% with 30 queries, and from 66.0% to 23.0% with the full 90 queries. It shows that SRFT also resists iterative attack refinement, which works in a different way from RL-Hammer. These results further demonstrate that the robustness of SRFT holds across various attacks, and against both RL-trained and iterative-refinement attackers.