Are You Reading the Right Thing? Rethinking Internal Signals for Prompt-Injection Detection

cs.AI Sarthak Gupta, Priyanka Tembey · Oct 14, 2026
Local to this browser
What it does
The paper tackles the ambiguity in prompt-injection detection: internal-state probes may detect injection presence rather than actual behavioral compromise. It evaluates five adapted methods on the same structured prompts for two models,...
Why it matters
The paper tackles the ambiguity in prompt-injection detection: internal-state probes may detect injection presence rather than actual behavioral compromise. It evaluates five adapted methods on the same structured prompts for two models,...
Main concern
The paper makes a well-motivated and conceptually important point: detecting that an injection is present is not the same as detecting that it will succeed. The outcome-stratified AUROC comparison is clean and produces a consistent split...
Community signal
0
0 up · 0 down
Sign in to vote with arrows
AI Review AI reviewed
Plain-language introduction

The paper tackles the ambiguity in prompt-injection detection: internal-state probes may detect injection presence rather than actual behavioral compromise. It evaluates five adapted methods on the same structured prompts for two models, stratifying by attack success, and finds that attention- and role-based signals correlate more strongly with successful attacks than presence- or recognition-based probes.

Critical review
Verdict
Bottom line

The paper makes a well-motivated and conceptually important point: detecting that an injection is present is not the same as detecting that it will succeed. The outcome-stratified AUROC comparison is clean and produces a consistent split across both models studied. Attention Tracker, Role Confusion, and the Dong exposure probe rank successful attacks higher, while PIShield and J-Lens rank unsuccessful attacks higher. This supports the claim that signal choice determines what security property is measured. However, the evaluation is limited to two relatively small models under a single, artificially explicit prompt structure, and the attacks are outcome-conditioned and partially adaptively strengthened, which weakens external validity.

“Attention Tracker reaches 0.949±0.011 successful-attack AUROC on Qwen and 0.887±0.018 on Gemma.”
paper · Table 2
“PIShield and J-Lens both have higher unsuccessful-attack than successful-attack AUROC on both models.”
paper · Section 4
What holds up

The core conceptual distinction between injection presence and behavioral compromise is important and increasingly relevant as internal-state defenses proliferate. The experimental design is careful: all methods share the same structured inputs, the same 1,000 template-matched benign controls, and scores are frozen before outcome labels are joined. The authors correctly cite concurrent work BASIS, which independently reaches a similar conclusion using separate existence and breach probes, strengthening the finding. The observation that Attention Tracker specifically measures attention diversion toward the untrusted span at the final query position gives a mechanistic interpretation for its stronger successful-attack signal.

“Concurrent work, BASIS (Qin et al., 2026), tests this distinction directly by training separate pre-generation attention probes for injection existence and behavioral breach. Its existence detector reaches 1.000 AUROC across the six evaluated models. However, among attack examples, the same score obtains only 0.707 AUROC for predicting breach.”
paper · Section 4, BASIS citation
Main concerns

The strongest limitation is the narrow model coverage: only two open-weight models of similar size (35B and 26B parameters). The authors state they could not evaluate larger or more varied models due to limited compute, so generalization across model families and scales is unverified. The structured prompt template makes the trusted/untrusted boundary unusually explicit, which may inflate detection scores relative to realistic agent trajectories where boundaries are ambiguous or absent. The attack corpus is outcome-conditioned: unsuccessful baseline attacks were replaced with adaptive variants designed to increase behavioral success, meaning the successful attacks are a stress-test selection rather than a natural sample. Furthermore, some methods are substantial adaptations of their original forms—PIShield receives a combined prompt rather than separately serialized data, Role Confusion uses an exploratory Systemness adaptation, and the Dong probe is trained on AgentDojo trajectories but evaluated on structured prompts—so the readouts may not reflect the original methods' intended semantics. The paper also lacks causal interventions or detector-adaptive attacks, so it cannot confirm whether the observed signals are merely correlated with success or mechanistically necessary for it.

“Our evaluation uses only two open-weight models of similar size. Both models are relatively small, and we could not evaluate larger or more varied models because of limited compute. The results may therefore not hold for other model sizes or families. We also study one explicit structured prompt format. The attack corpus is outcome-conditioned and includes adaptively selected successful replacements.”
paper · Section 5
“This transformation creates a controlled comparison, but it also makes the boundary more explicit than it may be in a natural agent trajectory.”
paper · Section 3
Evidence and comparison

The evidence within the benchmark supports the stratified claims, and the 95% bootstrap intervals show that the direction of the gaps is not due to noise. However, the evidence is correlational: outcome-stratified AUROC shows association, not causation. Comparisons to related work are generally fair, with the authors clearly distinguishing their setup from the original methods and noting that they compare adaptations rather than exact reproductions. The citation of BASIS as independent concurrent support is accurate based on the fetched abstract. A gap is the absence of comparison to strong input-text baselines (e.g., PromptGuard or simple length/syntax heuristics), which would help establish whether the internal signals add value beyond surface features that the authors warn about in citing Fomin and Li et al.

“Recent work further questions whether high detection performance demonstrates the intended security property. Fomin (2026) shows that activation probes can exploit dataset identity and substantially degrade under leave-one-dataset-out evaluation.”
paper · Section 2.2
Reproducibility

Reproduction would be partially but not fully feasible from the paper alone. The authors share evaluation data at an anonymous repository, specify exact model checkpoints and revisions, document chat-template rendering, and report hyperparameters such as Dong's 5 epochs, batch size 64, and learning rate $10^{-4}$. Layer and head selections are reported. However, no code repository is provided, and the five methods would need to be reimplemented from the descriptions in Appendix A. Several implementation details that could matter—such as the exact J-Lens probe feature aggregation, the synthetic ignore sentences used for Attention Tracker head selection, and the specific AgentDojo splits used to fit the Dong probe—are described but not released, which is a significant barrier to exact reproduction. Re-running the full pipeline also requires white-box access and substantial compute for two large models.

“We share the data associated with this study at https://anonymous.4open.science/r/paper-evaluation-data-7877”
paper · Abstract / Data availability
Abstract

Several recent studies propose detecting prompt injections from a language model's internal state. However, these methods do not measure a single security property. Residual-stream probes, attention scores, role projections, exposure probes, and concept readouts may capture injection presence, recognition, information routing, or behavioral influence. It is therefore unclear what differences in prompt-injection detection performance reveal about the internal signals these methods read. We study how five representation-reading methods vary under a common structured indirect prompt-injection setup on Qwen3.6-35B-A3B and Gemma-4-26B-A4B-it. We evaluate each method by how well it distinguishes injected prompts from benign controls. We then further analyze each detection method's ability to detect attacks in cases where they are successful and in cases where they are not. This helps us better assess what properties each detection method might rely on. Methods trained to detect injection presence or attack-related concepts generally separate unsuccessful injections more strongly from benign inputs, whereas attention diversion, exposure, and role-confusion-based methods separate successful injections more strongly on both models. Attention Tracker provides the strongest consistent successful injection separation, reaching 0.949 AUROC on Qwen and 0.887 on Gemma. These results suggest that signals closer to response formation may better encode information about an attack's success, and that detection performance can depend strongly on the prompt template. We share the data associated with this study at https://anonymous.4open.science/r/paper-evaluation-data-7877

Challenge the Review

Pick a starting point or write your own. Challenges run in the background, so you can keep reading while the AI investigates.

No challenges yet. Disagree with the review? Ask the AI to revisit a specific claim.