Answers are grounded in this paper and cite their sources.
Classifiers that flag prompt injections are a common first defence for LLM applications, and their reported accuracy usually comes from held-out data drawn from the same sources they were trained on. We test how well such detectors transfer. We evaluate seven detectors on five public datasets: a fixed keyword heuristic, four TF-IDF logistic-regression models each trained on one dataset, and two openly available fine-tuned DeBERTa-v3 classifiers. The datasets are deepset prompt-injections, safe-guard-prompt-injection, jailbreak-classification, SPML and Gandalf ignore-instructions. Every detector scored well on its own source, with AUROC between 0.955 and 0.999. On other sources, the TF-IDF models averaged an AUROC of 0.872 (range 0.727–0.987), and the deepset classifier fell from 0.997 on its own data to 0.666 and 0.789 on two others. Thresholds transferred worse than rankings. Thresholds set for a 1% false-positive rate on the training source gave false-positive rates of 26% or more in five of twelve cross-dataset cases (up to 79.7%), and recall fell as low as 3.5%. The ProtectAI v2 classifier was the most robust, with AUROC of at least 0.979 on three of the four labelled test sets and 100% recall on Gandalf. It still caught only 36.7% of injections in the deepset test set and flagged 12.0% of benign SPML prompts. The keyword heuristic never produced a false positive, but caught only 14–42% of injections. No detector reached 90% recall at 5% or fewer false positives on all four labelled test sets. Exact-text overlap between test and training sets was small, except that 108 safe-guard test prompts also appear in the jailbreak training set. Detector accuracy should be reported across datasets and at a fixed operating point, not only as in-distribution AUROC. Code, logs and derived data to reproduce every number are in the attached archive. Preprint, not peer-reviewed.
No takes yet. Share an insight, caveat, or question.
Akil Hassane (2026) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: