← Lab /AI/ML

Prompt injection detection performance varies by deployment regime, no single model dominates

Detection performance is highly regime-dependent and sensitive to threshold selection, with no single model outperforming others across all settings

AI/ML arXiv 26 May 2026 Measurement Simulation evidence

Published as “Prompt Injection Detection is Regime-Dependent: A Deployment-Aware Evaluation with Interpretable Structural Signals”

Why it matters

Operators must choose detection models that match the specific attack regime and low false-positive requirements, otherwise safeguards may either miss attacks or generate excessive false alarms.

Summary

Prompt injection detection performance varies dramatically across evaluation regimes; no single detector dominates. The study evaluates multiple model families (lexical TF-IDF, semantic embeddings, transformer encoders, and hybrids with an Instruction Boundary Violation Score) on a combined 6,424-prompt benchmark and finds that the best model changes between in-distribution and three out-of-distribution regimes, especially under low false-positive constraints. Evidence is strong, coming from repeated experiments across three random splits and reporting both macro-F1 and true-positive rates at 1%, 5%, and 10% false-positive budgets.

What they found 1

  1. Detection effectiveness is strongly regime-dependent, with different model families excelling in different test settings.

    “The best-performing detector changes across evaluation regimes, showing that prompt injection detection is strongly regime-dependent.”

Caveats 1

  • On the in-distribution test set, fine-tuned transformer encoders achieved the highest overall performance, with RoBERTa and the late-fusion variants reaching the strongest macro-F1 and accuracy

What’s new here 4

  • Evaluates prompt-injection detection under deployment-relevant low false-positive operating points.
  • Introduces the Instruction Boundary Violation Score (IBVS) as an interpretable structural signal.
  • Shows that detection performance is regime-dependent across multiple out-of-distribution benchmarks.
  • Compares internal models against a real-world external safeguard (LLM Guard).