mlsanityData to 7 Oct 2026

When Benchmarks Lie: Evaluating Malicious Prompt Classifiers Under True Distribution Shift

arXiv 2602.14161 ↗First posted 15 Feb 2026cs.LGcited by 8

On the map: LLM agents and tool use → Agent threats, guardrails and governance

also in 1 more
Abstract (arXiv)

Detecting prompt injection, jailbreak attacks, and harmful requests is critical for deploying LLM-based agents safely, yet current evaluation practices in this literature overestimate generalization. We train activation-based classifiers (linear probes on LLM hidden states) on a benchmark of 18 datasets (prompt attacks plus benign sources) and propose Leave-One-Dataset-Out (LODO) evaluation, where the held-out dataset is never seen during training. Across four LLMs from three families (Llama-3.1-8B, Gemma-3-27B, Qwen-3.5-2B/4B), standard cross-validation reports a pooled AUC 8.0-16.5 points higher than LODO; per-dataset held-out-test-vs-LODO accuracy gaps span 1-25 points. To understand the gap, we analyze the LODO stability of a linear probe's per-feature classifier coefficients, defining a retention metric for sparse-autoencoder (SAE) features that flags dataset-dependent shortcuts. 28-44% of top SAE features are shortcuts across models, a dataset-identity classifier reaches 96.6%, and the dataset-identifying and safety-relevant subspaces partially overlap. Standard domain-generalization fixes such as adversarial training, subspace projection, sample reweighting, and class balancing do not close the gap. Finally, we show LODO-weighted SAE attributions filter dataset artifacts for more reliable per-prompt explanations. We release our framework at https://github.com/maxf-zn/prompt-mining so future prompt-attack classifiers can be evaluated under LODO alongside CV.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 30 of its 40 references that are in the map. First posted on arXiv 15 Feb 2026.

Builds on

30 of 40 references.

Closest ancestors · 3

Same direction, newest first

  1. 2025PromptArmor: Simple yet Effective Prompt Injection Defenses21 Jul
  2. 2025LlamaFirewall: An open source guardrail system for building secure AI agents6 May
  3. 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar

Other references · 27

  1. 2020Shortcut Learning in Deep Neural Networkscited by 1,928
  2. 2025Gemma 3 Technical Reportcited by 1,686
  3. 2020WILDS: A Benchmark of in-the-Wild Distribution Shiftscited by 1,366
  4. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
  5. 2019Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalizationcited by 1,232
  6. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
  7. 2020In Search of Lost Domain Generalizationcited by 1,042
  8. 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 864
  9. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  10. 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 673
  11. 2021Just Train Twice: Improving Group Robustness without Training Group Informationcited by 522
  12. 2024Gemma Scope: Open Sparse Autoencoders Everywhere All At Once on Gemma 2cited by 381
15 more
  1. 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 328
  2. 2024Improving Alignment and Robustness with Circuit Breakerscited by 302
  3. 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Modelscited by 237
  4. 2025Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teamingcited by 172
  5. 2025Are Sparse Autoencoders Useful? A Case Study in Sparse Probingcited by 109
  6. 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injectionscited by 108
  7. 2024Get my drift? Catching LLM Task Drift with Activation Deltascited by 61
  8. 2025PromptShield: Deployable Detection for Prompt Injection Attackscited by 43
  9. 2026Constitutional Classifiers++: Efficient Production-Grade Defenses against Universal Jailbreakscited by 36
  10. 2025LLMail-Inject: A Dataset from a Realistic Adaptive Prompt Injection Challengecited by 20
  11. 2025Sparse Autoencoder Features for Classifications and Transferabilitycited by 19
  12. 2025Large Language Models Encode Semantics and Alignment in Linearly Separable Representationscited by 14
  13. 2026AlignSentinel: Alignment-Aware Detection of Prompt Injection Attackscited by 4
  14. 2025Unveiling Decision-Making in LLMs for Text Classification : Extraction of influential and interpretable concepts with Sparse Autoencoderscited by 3
  15. 2026AISA: Awakening Intrinsic Safety Awareness in Large Language Models against Jailbreak Attackscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 8.

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Analysis of LLMs Against Prompt Injection and Jailbreak Attacks
  2. 2026Assessing Automated Prompt Injection Attacks in Agentic Environments
  3. 2026Prompted to Discriminate: Generalizing Malicious-Input Probes in the Wild
  4. 2024JAILJUDGE: A Comprehensive Jailbreak Judge Benchmark with Multi-Agent Enhanced Explanation Evaluation Framework
  5. 2026The Art of the Jailbreak: Formulating Jailbreak Attacks for LLM Security Beyond Binary Scoring
  6. 2026Defense Against Indirect Prompt Injection via Tool Result Parsing
  7. 2026Dynamic Deep Prompt Optimization for Defending Against Jailbreak Attacks on LLMs
  8. 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents