mlsanityData to 24 Nov 2026

Attention-based Classification for Indirect Prompt Injection

arXiv 2610.28988 ↗Submitted 20 Oct 2026cs.LGcited by 0

On the map: LLM agents and tool use → Agent threats, guardrails and governance

also in 1 more
Abstract (arXiv)

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. 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. AttnDA improves detection performance across agentic and tool-integrated benchmarks, though transfer to AgentDojo remains challenging regardless of classifier choice. A covariance ablation further shows that removing inter-head correlation structure substantially contributes to performance, with complex covariance assumptions causing significant degradation on cross-domain data. These results indicate that the attentional distraction signal underlying focus-score-based detection does not transfer reliably to agentic environments, and that learned linear classifiers over head-level attention features offer improved detection performance, provided training data from the target deployment domain is available.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 13 of its 18 references that are in the map. Submitted 20 Oct 2026.

Builds on

13 of 18 references.

Closest ancestors · 2

Same direction, newest first

  1. 2025MELON: Provable Defense Against Indirect Prompt Injection Attacks in AI Agents7 Feb
  2. 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar

Other references · 11

  1. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 2,054
  2. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,638
  3. 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 496
  4. 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 415
  5. 2024Defending Against Indirect Prompt Injection Attacks With Spotlightingcited by 319
  6. 2024Attention Tracker: Detecting Prompt Injection Attacks in LLMscited by 103
  7. 2024Get my drift? Catching LLM Task Drift with Activation Deltascited by 82
  8. 2025Can Indirect Prompt Injection Attacks Be Detected and Removed?cited by 58
  9. 2025LLMail-Inject: A Dataset from a Realistic Adaptive Prompt Injection Challengecited by 25
  10. 2025PIShield: Detecting Prompt Injection Attacks via Intrinsic LLM Featurescited by 25
  11. 2024Defending Large Language Models Against Attacks With Residual Stream Activation Analysiscited by 6

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026ICON: Indirect Prompt Injection Defense for Agents based on Inference-Time Correction
  2. 2026RouteGuard: Internal-Signal Detection of Skill Poisoning in LLM Agents
  3. 2026Detecting Malicious Agent Skills in the Wild using Attention
  4. 2025Attention is All You Need to Defend Against Indirect Prompt Injection Attacks in LLMs
  5. 2026AgentWatcher: A Rule-based Prompt Injection Monitor
  6. 2026Passing the Test You Trained On: Re-evaluating Prompt-Injection Detectors for LLM Agents
  7. 2025PromptSleuth: Detecting Prompt Injection via Semantic Intent Invariance
  8. 2026Defense Against Indirect Prompt Injection via Tool Result Parsing