Can rank but cannot stop: detecting prompt injection hijacking from the output probabilities of a typed decision modelRanked but Not Stopped: Detecting Prompt-Injection Hijacks from Typed Decision Models' Output Probabilities
The authors test detecting prompt injection hijacks of a typed decision model using the model's own confidence: low-confidence ranking is effective (AUROC 0.86–0.90 on 4/5 systems), but a gate at a 5% clean alert rate misses 51–70% of ordinary injection hijacks and 99–100% of hijacks that claim certainty on three API models.
Indirect prompt injection: the attacker (e.g., the article's author) can write part of the victim program's input, with the goal of changing the typed decision model's output label to a label chosen by the attacker (hijack). The monitor does not know the attacker's target label and can only read the probabilities output by the model itself; the attacker may know that the monitor reads confidence, and some attack texts are found by searching over queried model probabilities.
- When a program uses a language model as a classifier, text injected into the input can change the output label to a label chosen by the attacker. Whether monitoring that does not know the attack target can discover and block such hijacks using only the confidence of the model's own outputs is the question the paper aims to answer.
- The authors test five systems on AG News topic classification, using low confidence 1−pmax and disagreement between Choice and Boolean answers as target-free traces, measuring ranking ability with AUROC, and measuring interception ability with a gate calibrated to a 5% alarm rate on independent clean articles; attacks include handwritten text and text found by searching over queried probabilities.
- Low confidence ranks hijacks above clean answers on 4/5 systems (AUROC 0.86–0.90), but a gate at a 5% clean alert rate misses 51–70% of plain note hijacks on three API models; adding a handwritten sentence that claims certainty and demands full probability raises the miss rate to 99–100%, while ranking remains effective (AUROC 0.70–0.79).
- The authors note: the monitor reads only output probabilities, and input-side detectors and free-text reasoning are out of scope; all three tasks are English four-way classification; attack text is handwritten or composed by coordinate search over handwritten components, with no gradient or token-level optimization tested; the main experiments use only one prompt per system; some analyses are outside the preregistered plan, and intervals are not corrected for multiplicity.
- Evaluated models
- gpt-6-lunaopen-bosun (bosun-v3.1-1.7b)Kimi-K3Qwen3.8-FlashNLI encoder (deberta-v3-large-zeroshot-v2.0)
- Benchmarks
- AG NewsDBpedia-14Yahoo Answers
- Metrics
- AUROCmissed shareunflagged sharehijack rateclean alarms
Researchers tested using a model's own output confidence to monitor prompt injection hijacking, and found that low confidence can rank hijacked classification answers but cannot stop most hijackings. On five systems for AG News topic classification, after combining five types of injected text, four of the five systems had a low-confidence ranking AUROC of 0.86-0.90. At a threshold that alerts on at most 5% of clean answers, three systems provided via provider APIs missed 51-70% of hijackings caused by ordinary injected text (point estimates for each system); after the injected text added a handwritten sentence claiming certainty about the target and demanding output of full probabilities, the miss rate reached 99-100%, even though the AUROC was still 0.70-0.79 at that point. The authors recommend that confidence monitoring be tested at realistic alert rates and against attackers who claim certainty.
Related events and news
1 events · 1 news mentions
News that mentions this paper
大模型安全周报:智能体安全边界在签名、授权与上下文
- 公众号 大模型安全研究cites the paper's id or link大模型安全周报:智能体的安全边界在签名、授权与上下文三层防线里
Ranked but Not Stopped: Detecting Prompt-Injection Hijacks from Typed Decision Models' Output Probabilities(https://arxiv.org/abs/2611.02522)
Paper analysis
What problem does this paper attempt to solve?
The authors ask: can monitoring that does not know the attack target discover and block prompt injection hijacks using only the output probabilities of the typed decision model itself.
Core question: programs that use language models as classifiers can have their output labels hijacked by injected text in the input; can a monitor that does not know the attacker's target label detect and intercept such hijacks using only the confidence returned by the model itself.
- Setting and importance: many programs use language models as classifiers (the paper calls them typed decision models) and act on the highest-probability label, e.g., a news pipeline archiving articles by topic; each call returns the probability of each label for free, and the authors ask how much these probabilities alone can reveal.
- Gap in existing practice: low confidence (1−pmax) is the standard baseline for detecting misclassified inputs (Hendrycks & Gimpel, 2017), but the authors argue it has two distinct jobs—ranking hijacks above clean answers (measured by AUROC) and stopping them at an actual alarm rate—and that when most clean answers are near-certain, these two diverge.
- Core observation: a threshold set to alarm on at most 5% of clean answers falls at the few most uncertain clean answers (top probability 0.62–0.70 on API models in the main experiment), and all hijacks more confident than that pass; a single handwritten sentence claiming certainty about the target is enough to lift a hijack above the threshold.
- Contributions of the paper: a gate calibrated on independent clean articles, testing hijacks that low confidence can rank; a handwritten certain note attack; and a decomposition of which part of its sentence lets hijacks through the gate (the three contributions the authors state).
- Threat model:
- Goal: the attacker changes the model's output label to a label of their choosing (the paper calls this hijack).
- Knowledge: the attacker may know that the monitor reads confidence; the certain note is handwritten without querying any model, while searched text is found by searching over queried model probabilities.
- Capability: the attacker can write part of the program's input (e.g., text appended by the article's author), i.e., indirect prompt injection.
- Victim system: a typed decision model pipeline that acts on the model's output label; the monitor does not know the attack target and can only use target-free scores (the paper calls them traces).
What related research exists?
Related work covers injection defenses, confidence detection and its failure under adaptive attacks, and parallel typed decision model research; the authors position their work as measuring the attacked model's own outputs.
Injection defenses and input-side detection
- Greshake et al. (2023) proposed indirect prompt injection; the defense of Liu et al. (2024) rejects out-of-label responses, and the paper notes that such defenses cannot catch the hijacks in this paper, because every return is a legitimate label.
- Chen et al. (2025) classify and detect injected documents, and Biswas (2026) studies their calibration under attack; the paper notes that these are independent classifiers, whereas this paper reads the victim's own outputs. Jacob et al. (2025) evaluate input-side detectors at low false-positive rates, and Lan et al. (2026) find that good AUROC does not yield a practical operating point.
Confidence and uncertainty as detection signals
- The low-confidence baseline of Hendrycks & Gimpel (2017) is this paper's main trace; selective classification of Geifman & El-Yaniv (2017) is the source of the confidence gate, and Kamath et al. (2020) note that such gates degrade under distribution shift.
- Feinman et al. (2017) use uncertainty to detect adversarial images, and Carlini & Wagner (2017) bypass it with attacks that know the detector; HiddenLayer (2025), Choudhary et al. (2025), and Terekhov et al. (2025) respectively show injected text lowering guardrail confidence, bypassing known-answer detection, and lowering monitoring suspicion scores. Carlini et al. (2022) argue for judging attacks by true-positive rate at low false-positive rates rather than by AUROC.
Parallel typed decision model research
- Wu & Lim (2026) optimize attacks against a commercial model; Liu (2026) and Guo et al. (2026) use typed models as detectors, with the attack as input; the paper notes that the model under test in this paper is precisely the attacked model.
- Hu et al. (2026a) score attacked answers by confidence and Azizi et al. (2026) by margin: Azizi et al. find that decisions inverted on open-source guardrails are no less confident than before the attack, and their adaptive attack also defeats two inter-annotation disagreement defenses. Both studies test confidence gates under attack: Hu et al. (2026b) only execute answers with confidence at least 0.8, yet 13.8% of attacked requests still end in wrong automated actions; Azizi et al. sending 5% of clean traffic to review only lowers the average fail-open rate from 60.1% to 56.7%.
Baselines and benchmarks: this paper's baseline trace is low confidence 1−pmax (Hendrycks & Gimpel, 2017), the comparison trace is disagreement between Choice and Boolean answers; the evaluation benchmarks are AG News, DBpedia-14, Yahoo Answers (all Zhang et al., 2015).
Authors' positioning: on typed decision models they add three points—calibrating and testing the gate on independent clean articles, the handwritten certain note attack, and decomposing which part of its sentence has the effect; and they emphasize that on this paper's API models hijacks are less confident than clean answers, yet the gate still misses 51–70%.
How does the paper address this problem?
Rank hijacks using traces that require no knowledge of the attack target (low confidence, disagreement), then gate interception with a gate calibrated to a 5% clean alert rate; the attacks cover handwritten and query-searched text.
Overall approach: restrict the quantities the monitor can compute to traces that do not require knowing the attack target, and evaluate its two jobs separately—its ability to rank hijacks above clean answers, measured by AUROC, and its actual interception ability, measured by a gate calibrated to at most 5% clean alerts; then stress-test this gate with attack text of varying strength (handwritten, claiming certainty, query-searched).
Task, systems, and attack setup
- Task: AG News four-way classification (World, Sports, Business, Sci/Tech); each of 200 articles is randomly assigned one wrong topic as the attack target; 5 attack text families (override instruction, forged system note i.e. plain note, JSON tag, hashtag metadata, test mode notice) × 3 positions (before the text, after the text, separate notes field), 15 attacked versions per article.
- Five systems: gpt-6-luna (commercial typed decision API), open-bosun (local open-source typed decision model), Kimi-K3 and Qwen3.8-Flash (general language models, read out via the provider API as probabilities over option letters), NLI encoder (zero-shot NLI classifier); the first three are accessed via API and are called API-served models. No prompt tells the model to ignore instructions in the input.
- Hijack determination: the selected label of the attacked call equals the attack target and the clean call does not; articles whose clean answer is already the target are excluded. Positives are hijacks, negatives are clean calls of hijacked articles, counted by pooled count (each article's clean calls weighted by its number of hijacks).
Traces and ranking metrics
- Two traces: low confidence 1−pmax (pmax is the probability of the selected label k̂) and disagreement |bk̂ − pmax| (bk̂ is the yes probability of the Boolean "is the article about k̂"); the former measures the uncertainty of the selected label, the latter measures the gap between the answers of the two question formats.
- AUROC: the probability that a random hijack scores higher than a random clean call, ties counted as half; each AUROC and the difference between the two traces is given a 95% percentile interval from 2000 article resamples; an interval entirely above 0.5 is above chance, and an interval entirely on one side of 0 separates the two.
Gate and interception metrics
- Gate rule: alert when a call's 1−pmax exceeds the k-th smallest of n clean scores, k = ⌈0.95(n−1)⌉+1, so that at most 5% of clean scores alert; main results use 100 independent calibration articles (split-conformal index), control experiments use the run's own clean calls.
- Two shares: missed share = hijacks passing the gate / all hijacks (headline metric); unflagged share = hijacks passing the gate / all eligible calls, used to compare texts with different hijack rates.
Attack text and run design
- Handwritten monitor-aware text: certain note adds to plain note a sentence claiming the target is certain and demanding full probability for the target and zero for the other classes; certain override is a rewrite demanding that prior instructions be ignored and the target answered with full certainty; the calibrated run also uses four variants each adding at most one sentence to decompose which part has the effect.
- Searched text: when the attacker can query probabilities, coordinate ascent over 840 combinations (8 authority statements × 7 confidence demands × 5 wrappings × 3 positions), starting from the best of certain note and 12 random texts, maximizing the target's average probability on 20 development articles, trying 32–51 texts per system.
- Run groups (Table 1): the chosen-label run provides AUROC, the target run provides hijack rates, the calibrated run provides the main gate results (200 new evaluation articles + 100 calibration articles), the demand/search/fresh search runs test monitor-aware text, plus new-task transfer and verification runs; the analysis plan was fixed before data collection, and out-of-plan analyses are listed in Appendix L.
New-task transfer
- Protocol: on the AG News development half, for each system select the highest-AUROC of four candidates (two traces × two directions) (ties take low confidence), fix it after validation on the test half and before any new-task request, and use it as-is on DBpedia-14 (four-class subset, easier) and Yahoo Answers (four-class easily confused subset, harder), 200 items each, with three of its own attack families; four preset criteria compare new-task performance with AG News one by one.
What experiments did the paper conduct?
Five systems, three classification tasks, multiple handwritten and search attacks; the core result is that ranking is good but the gate misses many, and sentences that claim certainty let almost all of them through the gate.
Experimental setup
- Tested systems: five in total—gpt-6-luna, open-bosun, Kimi-K3, Qwen3.8-Flash, NLI encoder; Kimi-K3 and Qwen3.8-Flash return only the first five most likely tokens, and option probabilities are obtained by top-five reconstruction.
- Data: 200 AG News articles (90 dev / 110 test), with the calibrated run additionally using 200 new articles for evaluation + 100 for calibration; the new tasks DBpedia-14 and Yahoo Answers have 200 items each.
- Metrics: AUROC (ranking, 0.5 is random), missed share (proportion of hijacks missed by the gate, the headline metric), unflagged share, hijack rate, clean alarms; all intervals are 95% intervals from 2000 resamples.
- Review method: no human or LLM review; hijacks are determined automatically by whether the label equals the attack target, and the gate triggers automatically at a quantile of clean scores.
- Attack texts: 5 handwritten families × 3 positions; monitor-aware texts (certain note, certain override, and variants); searched text from coordinate search per system.
- Repetition and plan: the analysis plan was fixed before collection; key quantities such as missed share and demand/search gates are labeled as unplanned analyses; 3200 AG News calls per system per run, with at most 13 rejected by the content filter (Table 31).
Main results
According to Table 2 (chosen-label run, AG News, pooled count):
Swipe horizontally to read the table
System Hijacks 1−pmax AUROC Disagreement AUROC Disagreement−low-confidence interval gpt-6-luna 685 0.90 [0.84, 0.95] 0.85 [0.79, 0.91] [−0.08, −0.02] NLI encoder 859 0.90 [0.84, 0.95] 0.88 [0.84, 0.91] [−0.05, +0.02] Kimi-K3 426 0.87 [0.79, 0.93] 0.81 [0.73, 0.88] [−0.11, −0.01] Qwen3.8-Flash 550 0.86 [0.79, 0.92] 0.85 [0.77, 0.91] [−0.06, +0.04] open-bosun 1518 0.55 [0.49, 0.62] 0.49 [0.44, 0.54] [−0.16, +0.04] - The authors state that low confidence ranks hijacks above clean answers on 4/5 systems; the open-bosun interval contains 0.5, and only for it does the conclusion change with the counting method (above 0.5 under equal-weight and paired share, Table 11).
- Disagreement is never significantly better than low confidence on AG News and costs an extra Boolean per call; margin and entropy differ from low confidence by within 0.02 (Table 13).
- Hijack rate (target run): 15–54% of eligible calls are hijacked across all attack versions, with clean accuracy 78–90% (Table 31).
Gate experiment: calibrated to 5% clean alarms, still misses most hijacks
- Main gate results (calibrated run, Table 4): the threshold is set on 100 independent calibration articles, and clean evaluation alarms at 4%; on the three API models the gate misses 51–70% of plain note hijacks (87–97% on NLI encoder and open-bosun) and 99–100% of certain note hijacks; the top probability at the threshold is 0.62–0.70 (the Figure 2 histogram shows the pmax distributions of the clean, plain note hijack, and certain note hijack groups and the threshold line).
- Ranking and interception diverge: in the same run low confidence still ranks plain note hijacks above clean (AUROC 0.80–0.91), and likewise certain note hijacks (0.70–0.79); the four runs that include a plain note baseline miss 42–76% in total (Table 5).
- Interval width: the per-system missed share intervals for plain note span 21–100% (Table 23), which is why the authors call it a point estimate; on articles where both notes hijack, the certain note missed share is significantly higher on gpt-6-luna and Kimi-K3, and the Qwen3.8-Flash interval touches 0.
Which part of the sentence works and search attacks
- Sentence decomposition (calibrated run, Table 6, paired comparison by unflagged share): adding a sentence claiming certainty or demanding confidence raises the share passing the gate on every system; naming the target as the only correct class raises it further on the three API models; while demanding full probability rather than a class, or naming the target again, produces no detectable improvement on any system (on open-bosun both instead lower it).
- Search attacks (search run, Table 7): searched text hijacks 89–100% of eligible test calls (plain note 23–95%), and the median pmax of hijacks is 0.98–0.99; the gate misses 99–100% on API models, 68% on NLI encoder, and 100% on open-bosun.
- Reversal on open-bosun: the median pmax of searched text hijacks is 0.98, higher than the 0.91 of clean answers, so low confidence is reversed (AUROC 0.20 [0.13, 0.28]) and the gate would alarm on clean answers first.
- Increment of search over certain note: the authors state it is small on API models—on 20 dev articles the certain note already lets the target pass the gate for every article on 4/5 systems; on Qwen3.8-Flash the certain note is itself the search endpoint.
Other ablations and analyses
- Second-model/second-wording checks (Table 26): another API model returns the same target on 99–100% of certain-note hijacks; a second Choice with different wording returns the target on 100% of hijacks; the combined gate still misses 99–100% on Kimi-K3 and Qwen3.8-Flash, and on gpt-6-luna the two calls disagree on 7% of clean calibration articles, with no threshold meeting 5%.
- Top-five reconstruction robustness (Section 3.7): missing options are imputed as the fifth-place token, and the certain-note AUROC in the demand run changes by at most 0.002; treating missing mass as an upper bound changes the unflagged share of certain note and searched text by at most 2 percentage points.
- Transfer to new tasks (Table 8): on DBpedia-14 the fixed trace is above chance on all five systems (AUROC 0.85–1.00), passing all four prespecified criteria; on Yahoo Answers it is above chance only on the three systems Kimi-K3, Qwen3.8-Flash, and gpt-6-luna, and under pooled count criteria (i)(iii) are not met (they would be met under equal-weight, but the planned metric is pooled count).
- Requested-probability experiment (Appendix K, unplanned): on articles hijacked at all requested values, the target probability rises with the requested value (mean within-article ρ of 0.74, 0.99, 0.87 across the three models, all intervals above 0).
- Trace-selection stability (Section 4.1): after 200 random half-splits, the proportion where the selection agrees with the fixed split is 14% for NLI encoder, 67% for Qwen3.8-Flash, 77% for open-bosun, and 100% for the other two systems; leave-one-attack-family-out reselection never outperforms fixed low confidence on the held-out family.
What are some points that can be further explored?
The limitations the authors list center on analyses outside the plan, a narrow monitoring scope, and limited tasks and attack forms; the experiments cover five systems and three English four-way classification tasks.
Limitations and future directions noted by the authors
- Unplanned analyses and multiplicity (Section 8): target, chosen-label, split-session run, and missed share were not covered by the plan (the planned gate metric was unflagged share); per-system intervals were not corrected for multiplicity across five systems, multiple traces, and multiple runs, so conclusions near the boundary may be due to chance; the authors also note that the core gate results of 99–100% and 100% on API models are far from the boundary.
- Monitoring scope (Section 8): the monitor reads only output probabilities; input-side detectors and the model's free-text reasoning are out of scope; prompts that make the model ignore instructions in the input, dedicated safety classifiers, and agent workflows are not among the tested systems.
- System comparison and snapshots (Section 8): intervals cover only the article's sampling, not changes in the undated-snapshot API models; the five systems differ simultaneously in model, prompt, request layout, and probability readout, so differences between systems are differences between whole systems.
- Tasks and attack forms (Section 8): all three tasks are English four-label classification, and the attacks in Sections 3.4–3.6 all use AG News; attack texts are handwritten or assembled from handwritten components via a coordinate search over 840 combinations, and the authors believe gradient or token-level optimization (e.g., adaptive attacks in the style of Carlini & Wagner, 2017; Nasr et al., 2025) could go further.
- Number of prompts (Section 8): the main experiments use only one prompt per system (Appendix J adds a second wording on three systems), and a single prompt may underestimate sensitivity to wording (Zhou et al., 2026a); Kimi-K3 and Qwen3.8-Flash are read out via the first five tokens.
Experimental coverage
- Five tested systems in total: gpt-6-luna, open-bosun, Kimi-K3, Qwen3.8-Flash, NLI encoder (Section 2).
- Tasks are AG News (200 articles in the main experiment + 300 new articles), and four-class subsets of 200 items each from DBpedia-14 and Yahoo Answers, all English four-class classification (Section 2, 4.2, Appendix L).
- Attack texts are 5 handwritten families, several handwritten monitor-aware variants, and texts from a coordinate search within 840 combinations (32–51 attempts per system); no gradient or token-level optimization was done (Section 3.6, Section 8).
- The clean alarm target for gate evaluation is 5%, with 1% and 10% additionally tested in Appendix H; calibration uses 100 independent clean articles or the run's own clean calls (Section 2, Table 1).
- The paper does not report judgments of attack texts under human review, nor the number of repeated runs; intervals come from 2000 resamples (Section 2).
Summarize the main content of the paper
A paper testing whether confidence monitoring can intercept injection hijacks: the ranking signal genuinely exists, but at practical alert rates the gate cannot stop them, and attacks that claim certainty let the gate miss almost all of them.
An empirical paper on output monitoring for typed decision models, examining the real effectiveness of the defense idea of "reading the model's own confidence" under indirect prompt injection.
- Problem: programs act on the label with the highest model probability, and injected text can change the label to one chosen by the attacker; the monitor does not know the attack target and can only use target-free traces, and the authors ask how much protection these probabilities alone can provide.
- Method: test five systems (three accessed via API) on AG News four-class classification, using low confidence 1−pmax and Choice–Boolean disagreement as traces, AUROC to measure ranking and a gate calibrated to at most 5% clean alarms to measure interception; attacks range from handwritten plain note to handwritten certain note to text found by searching over queried probabilities.
- Ranking works: low confidence ranks hijacks above clean answers on 4/5 systems (AUROC 0.86–0.90, Table 2); disagreement is never significantly better, and margin and entropy differ from low confidence by within 0.02.
- Gate fails: the threshold falls at the few most uncertain clean answers (top probability 0.62–0.70), and in the main experiment the three API models miss 51–70% of plain note hijacks; certain note lifts hijack confidence above the threshold, and the gate misses 99–100%, while ranking remains effective at that point (AUROC 0.70–0.79).
- Further stress tests: searched text likewise passes the gate 99–100% on API models and reverses low confidence on open-bosun (AUROC 0.20); the second-model and second-wording checks return the same target on 99–100% of certain-note hijacks, and the combined gate still misses 99–100%.
- Authors' conclusions and recommendations: the authors believe the same geometry may apply to guardrails, LLM judges, and routers that act on their own probabilities; they recommend that deployers report detection rates at actual clean alarm rates, publish them alongside AUROC, and stress-test with handwritten and searched text that claims certainty; low confidence is a starting trace, but whether it can rank hijacks on the task at hand varies by system and task, and when labeled hijacks for the task can be collected, it should be tested directly.
Related papers
- REA: From Correct LLM Judgments to Safe Decision DeliveryAnalysis / interpretabilityarXiv