arXiv(opens in a new tab)cs.CROct 2026Cited by 4 papers on PaperVantage

Manuscript Offprint

arXiv:2610.20907

From Detection to Decision: Calibration and Deferral for Prompt-Injection Detection

Qianlong Lan, Anuj Kaul, Vinothini Pandurangan, Indranil Sanyal

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Prompt-injection defenses are commonly evaluated as binary detectors, but deployed systems must decide whether to allow, block, or escalate an input. Recent decision models claim to provide probabilities suitable for making these decisions automatically. We examine whether these probabilities lead to better security decisions. We compare Jev, a native probabilistic decision model, with Llama Prompt Guard 2 classifiers (22M and 86M parameters) and a frontier LLM judge. Our evaluation uses 47,611 held-out confirmatory examples covering human-written direct attacks, indirect injections, hard-benign prompts, obfuscation, and distribution shift. Prompt and calibration choices are determined on separate development and calibration splits and fixed before confirmatory evaluation. The LLM judge achieves the highest overall discrimination (AUROC 0.897), followed by Jev (0.871), Prompt Guard 2 86M (0.757), and Prompt Guard 2 22M (0.714). Jev's native probabilities are not consistently better calibrated than temperature-scaled classifier scores: Jev obtains ECE 0.541, Brier 0.440, and NLL 1.432, compared with 0.571, 0.439, and 1.104 for calibrated Prompt Guard 2 86M. On the frozen confirmatory cohort, the empirical deferral curves satisfy FNR ≤ 1% only when more than 91.8% of inputs are escalated, with substantial false-positive rates. This crossing is a descriptive confirmatory statistic, not a deployment threshold chosen using test labels. These results indicate that training for calibrated outputs alone does not ensure reliable security decisions under distribution shift. Discrimination, calibration, reviewer behavior, and policy utility need to be evaluated jointly.

Keywords Prompt Injection Detection · Probability Calibration · Selective Prediction · Uncertainty Estimation · Distribution Shift · Large Language Models

1 Introduction

Prompt injection turns untrusted text into instructions that redirect an LLM application. A detector can assign a label, but a deployed system must make a decision: allow a low-risk input, block a high-risk one, or defer an uncertain case to a more capable reviewer. This decision depends on what the detector's score represents. A probability of 0.9 is useful only if high scores reliably indicate attacks and remain meaningful as attacks, domains, or benign prompts change.

Prior work has introduced a range of prompt-injection benchmarks. TensorTrust contains human-authored adversarial prompts [8]; BIPIA targets indirect injection through external content [9]; NotInject measures over-defense on benign prompts containing attack-like terms [5]; and PIDS-Bench evaluates robustness to obfuscation and distribution shift [7]. Recent work has also examined detector calibration under attack shift [2]. In parallel, TypeSafe describes Jev as a typed decision model trained with Reinforcement Learning for Calibrated Decisions (RLCD) to produce probabilities that software can use for routing and escalation [1]. These developments motivate a direct question: does a model trained for calibrated decisions make better security decisions than a specialized classifier with conventional post-hoc calibration?

We study three research questions. RQ1 compares the detection performance of Jev, Prompt Guard 2, and an LLM judge. RQ2 examines whether the native probabilities of an off-the-shelf decision model are more reliable on the target workload than raw classifier scores or classifier scores adjusted with conventional post-hoc calibration, particularly under distribution shift. RQ3 examines how uncertainty at the gate translates into ALLOW-BLOCK-DEFER decisions when paired with a frozen imperfect reviewer. We measure this behavior by the empirical confirmatory escalation rate required to achieve system FNR ≤ 1%.

A. Development and calibration (no confirmatory labels)

Figure

FROZEN BEFORE CONFIRMATORY EVALUATION

B. Confirmatory evaluation (frozen system, no tuning)

(n=47,611 examples)(n = 47,611 \text{ examples})

Figure

Figure 1: Evaluation design and decision pipeline. (A) Prompts, models, calibration parameters, and the gate policy are selected using development and calibration data only and then frozen. (B) Each confirmatory input is scored by a frozen security gate, and a fixed policy maps the resulting attack probability to ALLOW, DEFER, or BLOCK. Only deferred inputs are sent to the frozen LLM reviewer, which produces the final decision. The confirmatory cohort is evaluated without further tuning.

We make three contributions. We provide a leakage-controlled comparison of a native decision model, two specialized classifiers, and a verbalized-probability LLM judge on 47,611 confirmatory examples. We jointly evaluate discrimination, probability calibration, confident false negatives, latency, and operational security-deferral behavior. Our results show that native decision probabilities do not consistently outperform target-calibrated classifier probabilities across calibration metrics, and that the evaluated gate-reviewer systems reach a strict 1% FNR target only at very high confirmatory escalation rates.

References (6)