TL;DR
Linear probes—simple classifiers trained on the internal "brain states" of LLMs—appear to detect malicious intent with near-perfect accuracy. However, this paper reveals that these probes are actually "Clever Hans" artifacts: they rely on surface-level keywords (like "ignore" or "system") rather than genuine semantic understanding. By introducing Contrastive Intent Probing (CIP), the authors demonstrate a path toward more robust safety detection that looks past vocabulary and focuses on actual intent.
What Problem Does This Paper Address?
As LLMs evolve into autonomous agents capable of executing code and calling APIs, detecting adversarial intent (like prompt injections or jailbreaks) is a high-stakes safety requirement.
Recent research suggested that we could detect these threats by "probing" the model's internal hidden states. Because these probes often achieved a perfect 1.0 AUROC (Area Under the Receiver Operating Characteristic curve), many researchers concluded that LLMs internally represent "malicious intent" as a distinct, linearly separable concept.
The authors of this paper challenge that "Illusion of Intent." They ask: Is the probe actually understanding the meaning of a threat, or is it just acting as a glorified keyword counter? If the latter is true, these safety systems are fragile and easily bypassed by attackers who simply change their vocabulary.
Methods
The researchers employed a three-step "failure analysis" followed by a new training proposal:
- Lexical Ablation: They identified the top 50 most predictive keywords (e.g., bypass, instruction, disregard) using a simple TF-IDF baseline. They then redacted these tokens from the datasets to see if the probes could still function.
- Layer-wise Analysis: They performed "leave-one-layer-out" testing to see if any specific transformer layer held a unique "intent signal."
- Contrastive Intent Probing (CIP): To fix the "keyword shortcut" problem, they proposed a new training framework. Instead of training on random benign and malicious examples, they used paired prompts. These pairs share nearly identical vocabulary and grammar but differ in intent (e.g., a benign request to summarize a file vs. a malicious request to summarize a file and then exfiltrate data). They trained a 2-layer Multi-Layer Perceptron (MLP) using a specialized loss function that penalizes the probe if it can't distinguish between these subtle differences.
Datasets
The study utilized several prominent LLM safety benchmarks:
- InjecAgent: 2,108 prompt-injection attacks targeting tool-use.
- AdvBench: 520 harmful instructions used in jailbreak research.
- AgentDojo: 200 agent-task injection prompts used as a held-out test set.
- Paired Adversarial Dataset (New): The authors constructed 1,120 prompts (560 pairs) where each pair shares identical vocabulary but differs in semantic intent.
Key Insights and Ideas
- The Clever Hans Effect: Much like the famous horse that "counted" by watching its trainer's facial expressions, linear probes "detect intent" by spotting specific tokens. When the top 50 keywords are removed, the probe doesn't just get slightly worse—it collapses entirely.
- Negative Correlation: Surprisingly, after lexical ablation, AUROC scores dropped below 0.10. This means the probes became anti-correlated with the truth, consistently misclassifying malicious prompts as benign once their favorite "red flag" words were gone.
- No "Intent Layer": The layer-wise analysis showed that no single layer is responsible for the detection. The "signal" is essentially a ghost created by the presence of specific tokens across the entire model.
- Structure over Surface: The paper argues that for a safety probe to be "real," it must be able to distinguish between two sentences that use the same words but have different goals.
Key Results
- The Collapse: On standard benchmarks, all models (Llama-3.2, Mistral, Qwen, etc.) achieved a perfect 1.0 AUROC. After redacting the top 50 keywords, performance plummeted to below 0.10 across the board.
- Standard Probes Fail at Logic: When tested on the new "paired" dataset (where keywords can't be used as a shortcut), a standard linear probe achieved only 0.566 AUROC—barely better than a coin flip.
- CIP Success: The proposed Contrastive Intent Probing (CIP) significantly improved performance on these difficult pairs, raising the AUROC to 0.721 and increasing the recall from a negligible 0.005 to 0.483.
Limitations and Future Work
The authors are transparent about the preliminary nature of their solution:
- Scale: The paired adversarial test set is relatively small (120 prompts).
- Scope: The CIP framework was primarily validated on Mistral-7B; its generalizability across all architectures remains to be proven.
- Synthetic Nature: The paired dataset is synthetically constructed and may not capture the full complexity of "in-the-wild" adversarial attacks.
- Future Directions: The authors suggest that the safety community must move toward stricter lexical controls and contrastive evaluation protocols to ensure that "intent detection" isn't just an illusion.
Summary updated