acceptodds
Under review as a conference paper at ICLR 2027

CoDeL: Co-Evolutionary Defense against Indirect Prompt Injection in LLM-based Agents

Abstract

Large language model (LLM)-based agents increasingly rely on external tools and content, exposing them to indirect prompt injection (IPI). This threat has motivated a wide range of defenses, among which training-based defenses are often regarded as most reliable. However, existing training-based defenses are typically optimized on a static distribution of explicit injections. They learn surface-form cues rather than the boundary between serving the user and obeying an injected objective, and therefore fail when malicious intent is folded into a plausible workflow and deferred for several turns. We present CoDeL, a defense that hardens agent against an attack distribution it reshapes as it trains. The defender is updated each round via LoRA-based GDPO under a decoupled reward over safety, task progress, and format compliance, so refusing injections and completing the user's task jointly define fitness. To keep supplying it with the failures worth learning from, a co-evolving prober searches over injection rounds, attack methods, and payloads for injections that still penetrate the current defender, guided jointly by attack success and attack latency so that it preferentially mines breaches the defender notices too late. Each defender update invalidates part of the attack population and forces the next round onto a new frontier, turning the defender's own failures into a moving curriculum. Extensive experiments on three IPI benchmarks, nine baselines, and two base models show that CoDeL reduces attack success rate (ASR) by 88.5% and outperforms other baselines largely (+38.0%). Codes are available.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
LLM Agents, indirect prompt injection, agent safety

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_G1bgOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes CoDeL, a training-based defense against indirect prompt injection (IPI) in tool-using LLM agents. CoDeL alternates between (i) an MCTS-based prober that searches for attacks the current defender fails to detect—giving preference to attacks with longer latency before the agent deviates from the user’s task—and (ii) defender updates using LoRA-based SFT and GDPO. The GDPO reward separately scores resistance to the injection, progress on the user’s task, and output-format compliance.

Critical strengths

1-The paper distinguishes explicit, immediately disruptive injections from attacks that preserve a plausible workflow and trigger a harmful action later. Its latency-aware attack search makes this distinction part of both attack mining and defender training, rather than relying solely on static injection examples. This is consequential because robustness to explicit attacks alone may overstate protection in multi-step agent settings.

2-Across three benchmarks and two backbones, the reported results generally pair low ASR with strong benign utility and utility under attack. The decoupled safety and progress rewards, along with the ablations, provide a plausible account of how the method seeks to avoid achieving safety merely through task abandonment.

Critical weaknesses

1-The paper reports three-run means but no confidence intervals or per-run variation. Its judges have reported accuracies of roughly 90–95% on validation samples, while some headline ASRs are near zero. Without uncertainty estimates and a clearer analysis of judge errors’ effect on ASR and utility, it is difficult to know how robust the reported differences—especially very low ASRs—are.

2-The related-work section identifies CoER and COPA as recent work on co-evolving or continually adapting IPI defenses, but neither appears among the nine baselines. The comparisons therefore support an advantage over the selected baselines, but do not yet establish how CoDeL compares with the most directly related approaches. This matters to both the paper’s empirical positioning and its claim that its particular co-evolution and reward design is consequential.

Questions for authors

1-Were CoER and COPA excluded because their methods or implementations were not available, or for another reason? Can the authors provide a direct comparison or explain how the reported results establish an advantage over these closest approaches?

2-For each benchmark and LatentDojo evaluation, what are the per-run results and uncertainty intervals? Given the judge validation results, how sensitive are the ASR and utility comparisons to plausible judge misclassification rates?

3-How were LatentDojo attacks and tasks separated from CoDeL’s training and attack-search data? In particular, were the underlying AgentDojo tasks, attacker goals, or attack templates held out, and how does the evaluation avoid overlap with the search process?

1 comment
AuthorsOpenReview ↗

Responses to Reviewer G1bg

Dear Reviewer G1bg,

As the discussion deadline approaches, we would greatly appreciate it if you could let us know whether our rebuttal has adequately addressed your concerns. If so, we would be grateful if you could reconsider your rating accordingly.

If any concerns remain, we would be happy to provide further clarification.

Thank you again for your consideration.

Best regards, Authors of Submission 32168

Reviewer_oYW9OpenReview ↗
Rating
4
Confidence
4
Informativeness
2
Presentation
3
Soundness
3
Read review
Paper summary

This paper proposes CODEL, a co-evolutionary framework for defending LLM agents against indirect prompt injection. It introduces an MCTS-based attacker that searches for successful and delayed attacks, while the defender is updated through GDPO with separate safety, task-progress, and format rewards. The authors also introduce LATENTDOJO to evaluate delayed attacks. Experiments on three benchmarks and two backbone models show improvements in attack resistance and task utility over existing defenses.

Critical strengths
  1. Interesting motivation and useful benchmark. The paper highlights that delayed attacks can be harder to detect than explicit injections. It also carefully constructs a benchmark with long-horizon tasks, making its contribution extend beyond the proposed defense method by providing a simple and reproducible dataset for future research.

  2. Strong empirical results. CODEL achieves low ASR while maintaining relatively high task utility across three benchmarks.

  3. Useful analysis. The ablation studies and evaluations against adaptive attacks provide further evidence for the effectiveness of the proposed design.

Critical weaknesses

I have one major concern regarding the methodological novelty. Co-evolutionary attacker-defender training has already been explored in closely related work, including CoER and COPA, which the authors discuss in Appendix E. The main differences appear to be latency-aware MCTS and GDPO. Could the authors provide direct comparisons with these methods? This would help establish whether the proposed framework offers a substantial improvement over existing co-evolutionary approaches.

Questions for authors

I am curious about how CODEL performs on more recent and capable backbone models. The current experiments cover Qwen2.5-7B and Llama-3.1-8B, which provide useful cross-family evidence, but both models were released in 2024 and have similar parameter scales. Evaluating a more recent backbone, such as a model from the Qwen3 series, would help clarify whether the proposed defense generalizes to more capable models.

Reviewer_v7RvOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

CoDeL trains an LLM agent to resist indirect prompt injection by letting the attack and the defense improve against each other. Each round, a search procedure finds injections that still succeed and that hide their intent for several turns, and the agent is then fine-tuned on those failures with a reward for both refusing the injection and finishing the user’s task.

Critical strengths

The paper shows empirical performance without sacrificing utility, which is very convincing. And the defense can also be generalized to unseen adaptive attack, which comprehensive experiment, analysis and ablation.

Critical weaknesses

The paper names CoER and COPA as the closest prior work but does not compare against either; since CoER reports AgentDojo results in a similar range and has released code, a direct comparison would help clarify what CoDeL adds. Attack latency conflates deferred harmful execution with late detection, since the payload itself can defer the harmful step; it can be better if the author can add a control to distinguish these two. Right now LatentDojo is fully LLM judged for both training rewards and final results, it's encouraging to add a bit human evaluation.

Questions for authors

Look above at Critical Weaknesses section

1 comment
AuthorsOpenReview ↗

Responses to Reviewer v7Rv

Dear Reviewer v7Rv,

As the discussion deadline approaches, we would greatly appreciate it if you could let us know whether our rebuttal has adequately addressed your concerns. If so, we would be grateful if you could reconsider your rating accordingly.

If any concerns remain, we would be happy to provide further clarification.

Thank you again for your consideration.

Best regards, Authors of Submission 32168

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.