cs.LGOct 13, 2026

TRACER: Trace-Regularized Training Against Indirect Prompt Injection

Authors: Kshitij Mishra, Salem Lahlou, Nils Lukas

Organizations: Mohamed bin Zayed University of Artificial Intelligence Abu Dhabi, United Arab Emirates

Abstract

Indirect prompt injection uses untrusted retrieved content, tool outputs, or agent messages to override an LLM's intended behavior. We show that defense robustness is channel-conditioned: the same attack succeeds 18% of the time as a follow-up message but 53% when placed in retrieved context. We propose TRACER (Trace-Regularized Adversarial Channel Exposure with Reward-shaping), a channel-aware adversarial training method that samples presentation wrappers and combines an answer-anchored, evidence-gated reward with ATRC, which aligns attacked reasoning with clean evidence when an injection is invalid. On GSM8K with Qwen2.5-3B-Instruct, TRACER reduces RAG-framed ASR from 65.5% to 6.1% while preserving 78-82% clean accuracy. Joint RAG+tool training achieves 13.9% average ASR across framings at 3B scale, while a single epoch at 7B reaches 9.4%. These results demonstrate that robust defenses must explicitly train and evaluate across deployment channels.

Figures & tables

Appendix figures & tables18 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Defending against Adaptive Prompt Injection Attacks via Reasoning-enabled Task Alignment

    Jun 13, 2026Lipeng He, Yihan Wang, Jiawen Zhang +1Adversarial TrainingAI Agent Safety

  2. RAISED: Self-Distillation for Robustness to Prompt Injection in LLM Agents

    Oct 5, 2026Mohamed Dhouib, Clement Elliker, Alexi Canesse +5Prompt Injection DefenseLLM Agents

  3. LTBD: Learnable Trust-Boundary Delimiters for Prompt Injection Defense

    Oct 8, 2026Luman Zhao, Minghui Xu, Yue Zhang +1LLM SecurityPrompt Injection Defense