Prompt-Injection Probes Learn the Conversation, Not Just the Injection
cs.CL
Submitted: 2026-10-13
Updated: 2026-10-13
Comments: 18 pages, 6 figures, 11 tables
License: http://creativecommons.org/licenses/by/4.0/
The gist: Linear probes on a model's hidden states are used as cheap monitors for indirect prompt injection: they screen the tool outputs an agent reads and send suspicious ones to a slower second check, so
Abstract
Linear probes on a model's hidden states are used as cheap monitors for indirect prompt injection: they screen the tool outputs an agent reads and send suspicious ones to a slower second check, so every false alarm has a cost. But a probe learns whatever separates its training examples. The standard evaluation of injection probes can be passed without the model: conversation position and text lengths alone reach 0.91-0.98 AUROC. When each attack is compared with the same conversation without the injection, or with harmless text formatted like an injection, standard probes flag most of these harmless cases. We add such cases to the training data as matched negatives. Across six open models, in applications seen during training and at the default threshold, changing only the training data cuts false alarms on injection-free conversations from 41-80% to 4-27%, and on harmless look-alikes from 92-98% to 3-16%. With a threshold set on normal traffic, our probe still catches a median 95% of the attacks that fooled the agent (91% without our data). In new applications, false alarms stay low, but detection depends on the model and on how the threshold is set. The same data also helps a text-only filter.
Sources
- Small Language Models are the Future of Agentic AI
- LlamaFirewall: An open source guardrail system for building secure AI agents
- Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden States
- How Vulnerable Are AI Agents to Indirect Prompt Injections? Insights from a Large-Scale Public Competition
- Gemma 4 Technical Report
- Indirect Prompt Injection in the Wild: An Empirical Study of Prevalence, Techniques, and Objectives
- Building Production-Ready Probes For Gemini
- When AUC 0.998 Is Not Enough: A Candidate Evaluation Protocol for Hidden-State Probes of Indirect Prompt Injection in Multimodal Computer-Use Agents
- Nemotron 3 Nano: Open, Efficient Mixture-of-Experts Hybrid Mamba-Transformer Model for Agentic Reasoning
- NVIDIA Nemotron Nano 2: An Accurate and Efficient Hybrid Mamba-Transformer Reasoning Model
- gpt-oss-120b & gpt-oss-20b Model Card
- Qwen3 Technical Report
- EchoLeak: The First Real-World Zero-Click Prompt Injection Exploit in a Production LLM System
- Lessons from Defending Gemini Against Indirect Prompt Injections
- The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysis
- Readable Before Actionable: Causal Tracing of Indirect Prompt Injection
- PIShield: Detecting Prompt Injection Attacks via Intrinsic LLM Features
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering