mlsanityData to 7 Oct 2026

Beyond Pattern Matching: Seven Cross-Domain Techniques for Prompt Injection Detection

arXiv 2604.18248 ↗First posted 20 Apr 2026cs.CR cs.CLcited by 0

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

Current open-source prompt-injection detectors converge on two architectural choices: regular-expression pattern matching and fine-tuned transformer classifiers. Both share failure modes recent work has made concrete. Regular expressions miss paraphrased attacks. Fine-tuned classifiers are vulnerable to adaptive adversaries: a 2025 NAACL Findings study reported that eight published indirect-injection defenses were bypassed with greater than fifty percent attack-success rates under adaptive attacks. This work proposes seven detection techniques that each port a mechanism from a discipline outside LLM security: forensic linguistics, materials-science fatigue analysis, deception technology, local-sequence alignment from bioinformatics, mechanism design, spectral signal analysis, and taint tracking. Each produces a signal architecturally independent of both regex matching and transformer classification, so the seven compose with existing defenses rather than replacing them. Four of seven are now implemented in prompt-shield v0.7.3 (Apache 2.0): d028 sequence alignment, d027 stylometric discontinuity, materials-fatigue tracking, and d034 honeypot tool definitions (new in v4.0). A four-configuration ablation across nine benchmarks (~10,300 samples) covers deepset, NotInject, LLMail-Inject, AgentHarm, AgentDojo, and an independent evaluation against three peer-reviewed academic benchmarks (Liu USENIX 2024, Garak, InjecAgent). This revision adds Section 5.7 (composed-stack adaptive-attack partial run, evidence for the composability thesis), Section 5.8 (50-document held-out benchmark: d027 collapses 1.000 to 0.000 F1 in isolation but the composed engine recovers 0.815 F1), and Section 7 (three architectural patterns extracted from prompt-shield in Gang-of-Four format). All code, data, and reproduction scripts are released Apache 2.0.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 21 of its 48 references that are in the map. First posted on arXiv 20 Apr 2026.

Builds on

21 of 48 references.

Closest ancestors · 14

Same direction, newest first

  1. 2026ClawGuard: A Runtime Security Framework for Tool-Augmented LLM Agents Against Indirect Prompt Injection13 Apr
  2. 2026AgentWatcher: A Rule-based Prompt Injection Monitor1 Apr
  3. 2026AgentSentry: Mitigating Indirect Prompt Injection in LLM Agents via Temporal Causal Diagnostics and Context Purification26 Feb
  4. 2026WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents3 Feb
  5. 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks15 Apr
  6. 2025Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents27 Feb
  7. 2025MELON: Provable Defense Against Indirect Prompt Injection Attacks in AI Agents7 Feb
  8. 2024Hacking Back the AI-Hacker: Prompt Injection as a Defense Against LLM-driven Cyberattacks28 Oct
  9. 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
  10. 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents3 Oct
  11. 2024garak: A Framework for Security Probing Large Language Models16 Jun
  12. 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
2 more
  1. 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
  2. 2023Formalizing and Benchmarking Prompt Injection Attacks and Defenses19 Oct

Other references · 7

  1. 2025AgentSpec: Customizable Runtime Enforcement for Safe and Reliable LLM Agentscited by 196
  2. 2025Securing AI Agents with Information-Flow Controlcited by 108
  3. 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injectionscited by 108
  4. 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Mannercited by 57
  5. 2025Bypassing LLM Guardrails: An Empirical Analysis of Evasion Attacks against Prompt Injection and Jailbreak Detection Systemscited by 24
  6. 2024StyloAI: Distinguishing AI-Generated Content with Stylometric Analysiscited by 17
  7. 2024LLM Agent Honeypot: Monitoring AI Hacking Agents in the Wildcited by 12

Built on by

Not cited yet.