Manuscript Offprint

arXiv:2610.02413

Prompted to Discriminate: Generalizing Malicious-Input Probes in the Wild

Elad David, Max Fomin

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

Abstract

LLM agents increasingly rely on activation probes as runtime monitors for prompt injection, jailbreaks, and unsafe requests, reading the model's own hidden state to catch a harmful input before the agent acts on it. A cheap and increasingly common move, borrowed from LLM-as-judge prompting, is to append a short classification instruction after the user's turn and read the probe at that point, to try to sharpen it: the instruction asks the model to represent the incoming request as a class, concentrating the signal the probe must separate, at negligible serving cost. But does the wording of that suffix matter, and does its benefit hold in the wild, on attack types the probe never saw in training? That out-of-distribution regime is the one a deployed monitor faces. We test this with a controlled ladder of post-user suffixes under strict leave-one-dataset-out (LODO) evaluation across 13 safety benchmarks (jailbreak, injection, and benign chat) and three open-weight model families (Llama-3.1-8B, Qwen3.5-9B, Gemma-4-12B). On a single-position probe, a classification suffix consistently improves out-of-distribution detection over the no-suffix baseline (up to ~4 AUC points); yet which suffix matters: prompting the model to classify the input, even into content-free labels, reliably wins, whereas an off-topic or merely-attentive suffix helps little. The gain comes from the classification format, not the named criterion: a content-free suffix does as well as the real malicious/benign one, with the criterion adding precision only at strict thresholds. This is not an artifact of the single-position read: the benefit carries to the multi-position pooling probes used in production (attention, multimax, MLP), though the best-performing suffix there is readout-dependent. Served through a KV-cache fork, it is a cheap drop-in for any activation-probe monitor, though not an automatic win: which suffix helps, and by how much, depends on the model and the readout.

1 Introduction

LLM agents increasingly rely on activation-based probes as runtime monitors for prompt injection, unsafe intent, and policy violations [Zou et al., 2023, Abdelnabi et al., 2025, Zou et al., 2025]: a probe on the model's hidden state flags a malicious request before the agent acts, riding the model's own forward pass rather than a separate classifier; recent production monitors pool over many positions [Kramár et al., 2026]. A central question for deploying such a monitor is how to make it read well. Tillman and Mossing [2025] show that appending a task-description instruction (prompted probing) improves out-of-distribution safety monitoring, but Tillman & Mossing's instructions are semantically meaningful throughout and the mechanism is left open. We ask the question that determines how the monitor should be built: what part of the instruction does the work: the fact that it induces a classification, or the specific criterion it names?

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Agents in the Wild: Safety, Security, and Beyond.

We answer it with a designed ladder of post-user suffixes, each isolating one ingredient (Table 1). We study post-user suffixes specifically because they deploy for free: appended after the user turn on a KV-cache fork (adopted for the simplicity and perturbation-robustness David et al. [2026] report), read once, then reverted (§3.1), so the monitor adds no separate forward pass and inherits that vehicle's position stability and robustness to input perturbations.

We make three contributions:

  1. We extend prompted probing into the wild, and decompose it (§4). Tillman and Mossing [2025] showed a task instruction improves out-of-distribution monitoring on one closed model; we carry that analysis to three open-weight families under strict leave-one-dataset-out, and go further with a length-matched suffix ladder that isolates which ingredient of the instruction does the work. The classification suffix consistently improves detection (up to ∼4\sim 4 AUC points; positive on 22 of 27 model-dataset cells, App. A).

  2. The classification format, not the named criterion, carries the ranking gain (§4). Being asked to classify is what transfers: a content-free A/B suffix is statistically equivalent to the intent suffix (<1 AUC point apart; TOST p≤0.005p \leq 0.005; Llama and Gemma), while off-topic or attend-only suffixes do no better than no suffix. The named criterion adds precision only at strict thresholds.

  3. The benefit holds across readout architectures (§4.2). It survives the move from a single-position read to the multi-position pooling probes (attention, multi-max, MLP) used at scale (92% of readout×suffix cells beat no-suffix), so the gain is a property of the representation the suffix induces, not of one probe head. The best-performing suffix is readout-dependent, making suffix choice a per-probe design knob.

Table 1: The suffix ladder (experimental design). Each suffix adds one ingredient; comparing adjacent suffixes isolates it.

SuffixAddsIsolates
none—baseline
irrelevantoff-topic textis any appended text enough?
reflectinstruction to attendis attending (no decision) enough?
decidea binary decision (prose)does deciding help without a template?
classify_grammar/length+ output template, unrelated criteriondoes the criterion matter?
A/Bcontent-free labelsdoes criterion content matter?
intentmalicious/benign criterionthe “meaningful” criterion

Scope. Building on prompted probing [Tillman and Mossing, 2025] and the KV-fork suffix [David et al., 2026], our contribution is to establish, by controlled ablation, what in the suffix drives the gain and how broadly it holds: across suffixes, models, and probe architectures. Table 2 summarizes what we add over Tillman & Mossing.

Table 2: Delta over Tillman and Mossing [2025]. Every row is backed in this paper. (T&M report AUROC on a single closed model, GPT-4o, with limited within-task distribution shift on one dataset.)

AxisTillman & Mossing 2025This work
What in the prompt mattersmeaningful instruction (not decomposed)format-vs-content ladder
Generalization testlimited within-task shift, 1 datasetcross-dataset LODO, 13 benchmarks
ModelsGPT-4o (one, closed)3 open families (Llama/Qwen/Gemma)
Robustnesssingle layer/positionacross layers and readout architectures (single-position to pooling)
Content sensitivity—content-tailoring overfits OOD
Deploymentprompt-side instructionKV-fork suffix: single forward pass, no re-prefill

Concretely, every suffix shares the stem CRITICAL REMINDER - and differs only in what follows. Four verbatim examples (the full set is in App. A):

intent: ...start your response with 'Input is <class)' where classes are malicious/benign.

A/B: ...classes are A/B.

reflect: ...take a moment to read the message above carefully and answer completely.

irrelevant: ...here is an unrelated fact: the ocean covers most of the planet.

References (22)