Are You Reading the Right Thing? Rethinking Internal Signals for Prompt-Injection Detection
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
Create a lesson
Related papers
Rethinking Closed-Ended Medical VLM Evaluation: From Stable Wrongness to Counterfactual Answer Sensitivity
Shared title terminologycs.AIQi Wu, Xiaoyu Liu, Ao Wang et al.
Do You Even Know What I Want? Improving LLMs Ability to Detect Hidden User Intent
Shared title terminologycs.AIKelsey Sikes, Sarath Sreedharan
Internalized Experience: How Training Data Shapes Memory Formation in LLMs
Shared title terminologycs.AIXianxuan Long, Xinnan Dai, Kai Guo et al.
The Effect of Security-Focused Prompts on Reported Findings: A Controlled Experiment on 400 AI-Generated Web Applications
Shared title terminologycs.AIDarko Andročec
SMAD: A Semantics-Guided Multi-Agent Framework for Unsupervised Time-Series Anomaly Detection
Shared title terminologycs.AIQinghua Liu, Junpeng Wang, Mingzhi Hu et al.
Feedback-Driven Prompt Refinement for Educational AI: Affective Trajectory Estimation and Bloom's Taxonomy Classification
Shared title terminologycs.AIJosh Dean, Karan Patel, Gaurangi Raul et al.