Skip to content

Indirect prompt injection detection based on attention classificationAttention-based Classification for Indirect Prompt Injection

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2610.28988· Amelia Kawasaki, Stefan LeeCorvallisIndexed by this site · 2026-10-22· Originally publishedDefenses

Translation in progress — untranslated text is omitted.

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

AI summaryThe paper's authors evaluate on the AgentDojo benchmark and find that the white-box prompt injection detection method Attention Tracker performs close to random on most model families, and propose an improved method, AttnDA. Attention Tracker was proposed by Hung et al. in 2025; it identifies injection attacks by monitoring the distribution of model attention between user task tokens and data tokens, and claims to be dataset-agnostic; the evaluation shows that long structured tool outputs break the attention assumption the method relies on, and that this claim does not hold in agent environments. AttnDA replaces the scalar threshold with a Fisher linear discriminant analysis classifier based on per-head focus score vectors, improving detection performance in agent and tool-integration scenarios in a cross-dataset evaluation covering four benchmarks, but transfer to AgentDojo remains difficult. Covariance ablations show that removing inter-head correlation structure contributes significantly to performance, and that complex covariance assumptions cause notable degradation on cross-domain data.

Questions
Indirect prompt injection hides malicious instructions in external data that the agent reads. The existing white-box detection method Attention Tracker claims to be dataset-agnostic, but whether it is effective in real agent scenarios (such as AgentDojo) has never been evaluated.
Methods
The authors evaluate Attention Tracker on four benchmarks including AgentDojo and propose AttnDA: replacing the original scalar threshold with Fisher linear discriminant analysis (diagonal covariance) to weightedly classify the focus score vector of all attention heads.
Experiments and results
Attention Tracker's "dataset-agnostic" claim does not hold in agent scenarios: average AUROC on AgentDojo† is only 0.57. AttnDA trained in-domain rises to 0.94, and its cross-domain average of 0.79 beats AT's 0.75, but transfer to AgentDojo† remains difficult.
Limitations and future work
The authors note: AgentDojo† has only two suites, banking and slack, totaling 51 samples; the covariance ablation and weight analysis use only the single Qwen model; the variety of agent datasets is limited; and the benign samples of LLMail-Inject are synthetic and should not be treated as real agent data.

Related events and news

1 events · 1 news mentions

News that mentions this paper

大模型安全周报:防线开始溃于组合,智能体授权与审计系统性缺口

Related papers

Show 3 more papers
Read originalarxiv.org