Attention-based Classification for Indirect Prompt Injection
Indirect prompt injection (IPI) attacks, in which adversarial instructions are embedded in external data processed by a language model, pose a significant threat to the integrity of deployed LLM agents.
ProofPaper ↗
Key points
- Attention Tracker (Hung et al., 2025) is a recently proposed white-box detection method that identifies prompt injection attacks by monitoring how a model's attention is distributed between user task tokens and data tokens, claiming dataset-agnostic detection via a scalar focus score threshold.
- In this paper, we provide the first evaluation of Attention Tracker in a realistic agentic IPI setting using the AgentDojo benchmark, finding that the dataset agnosticism claim does not hold.
- We find that in agentic environments, long structured tool outputs subvert the fundamental assumptions Attention Tracker makes about attention that the method depends on and produces near-chance detection on AgentDojo across most model families.
- We propose AttnDA, an extension replacing the scalar threshold with a Fisher Linear Discriminant Analysis classifier over the per-head focus score vector, and evaluate both methods in a cross-dataset setting spanning four benchmarks.
Sources (1)
- [1]Attention-based Classification for Indirect Prompt InjectionarXiv (AI, ML, NLP, CV, robotics, multi-agent) · Oct 20, 11:31 PM
Indirect prompt injection (IPI) attacks, in which adversarial instructions are embedded in external data processed by a language model, pose a significant threat to the integrity of deployed LLM agents.
Attention Tracker (Hung et al., 2025) is a recently proposed white-box detection method that identifies prompt injection attacks by monitoring how a model's attention is distributed between user task tokens and data tokens, claiming dataset-agnostic detection via a scalar focus score threshold.
Extractive summary: sentences quoted from the sources.
Before this
- Oct 20, 2026Combining Long-Term Memory and LLMs Comes at a High Cost: From Prompt Injection to Persistent Compromise
- Oct 20, 2026After the Attacker Leaves: Benchmarking Carryover Attacks on LLM Agents
- Oct 20, 2026Voxtral 3
- Oct 20, 2026CovNav: Conformal Prediction-Guided Adaptive Inference for Object Goal Navigation
- Oct 19, 2026RealControlBench: A Benchmark for Interpretability-Informed Fine-Grained Control of LLMs and Agents
- Oct 19, 2026You Are the Trigger: Speaker-Activated Backdoors