Cross-domain techniques raise prompt-injection detection F1 up to 0.378
Seven detection methods from other disciplines improve prompt-injection detection, achieving up to a 0.378 F1 score on deepset without extra false positives
AI/ML arXiv 20 Apr 2026 Method Prototype evidence
Published as “Beyond Pattern Matching: Seven Cross-Domain Techniques for Prompt Injection Detection”
Why it matters
These cross-domain signals can be added to existing prompt-injection defenses to close gaps against paraphrased attacks without increasing false positives on many workloads, offering a practical path to more robust LLM-integrated applications.
Summary
The local-sequence alignment detector raises deepset F1 from 0.033 to 0.378 with zero extra false positives, and the stylometric discontinuity detector pushes synthetic indirect-injection F1 from 0.889 to 1.000 also with zero false positives. A fatigue-tracking mechanism is validated by an integration test that shows a low-confidence probe is blocked after ten near-miss scans. The evidence is strong on the evaluated benchmarks but limited by false-positive regressions on NotInject, modest gains on LLMail-Inject, and the fact that the synthetic benchmark was built with knowledge of the detectors, so external validation is still needed.
What they found 3
- Local-sequence alignment improves detection on the deepset benchmark
“the d028 detector catches fourteen of sixty (F1 0.378), a thirty-four-point-six percentage-point F1 improvement, with zero additional false positives.”
- Stylometric discontinuity achieves perfect F1 on the synthetic indirect-injection benchmark
“On our synthetic indirect-injection benchmark (Section 5) the detector lifts the F1 score of a twenty-six-detector regex baseline from 0.889 to 1.000 with zero false positives on benign long-form distractors.”
- Fatigue tracker blocks a low-confidence probe after repeated near-misses
“after ten priming scans from a single source at confidence 0.65 (base threshold 0.7), the eleventh scan from the same source at confidence 0.63 - strictly below every priming score and strictly below the un-hardened threshold - is blocked.”
Caveats 7
- d028 introduces ten false positives on NotInject, raising FPR from 0.9% to 3.8%.
- On LLMail-Inject the detector adds only a 0.2 percentage-point F1 gain because the baseline already captures 97.8% of attacks.
- The synthetic indirect-injection benchmark was constructed with knowledge of d027 and d028, so the 1.000 F1 scores are not held-out validation.
- No adaptive-attack evaluation has been performed; an adaptive adversary could evade the new detectors.
- d028 introduces ten false positives on the 339 benign samples of NotInject, moving the FPR from 0.9% (three false positives in the baseline) to 3.8% (thirteen).
- LLMail-Inject saturation: the baseline regex pack already recalls 97.8% of LLMail-Inject attacks because the benchmark is dominated by direct instruction-override phrasings that the pack targets explicitly.
- The 1.000 F1 numbers on that benchmark are therefore not held-out evaluation numbers in the strict sense.
What’s new here 4
- Introduces three cross-domain detection mechanisms (stylometry, local sequence alignment, fatigue tracking) that are architecturally independent of regex or transformer classifiers.
- Implements the first two as open-source detectors in prompt-shield v0.4.1 and releases them under Apache 2.0.
- Shows that these signals can be composed with existing defenses to improve detection of paraphrased attacks without adding false positives on certain datasets.
- Provides a design blueprint for four additional techniques (honeypot tools, prediction-market ensemble, perplexity spectral analysis, runtime taint tracking).