Exposure Is Not Commitment: Dual-Stratified Evaluation of Latent Monitors for Tool-Using AgentsExposure Is Not Commitment: Double-Stratified Evaluation of Latent Monitors for Tool-Using Agents
The authors propose a double-stratification protocol to distinguish injection exposure from behavioral commitment, stating that latent-space monitors trained on the naive comparison learn only exposure, and that switching to the commitment comparison raises pre-action AUROC to 0.853 on Qwen.
- Research results on intercepting indirect prompt injection before tool calls using model internal states are contradictory. The authors argue the contradiction largely comes from evaluations conflating "injection exposure" with "behavioral commitment," and that unstratified AUROC overestimates monitors.
- Proposes a dual stratified protocol: distinguish exposure (context contains injected content) from commitment (the model itself generates an unsafe tool call) in both the evaluation population and the training comparison. On AgentDojo, export trajectories, capture residual-stream activations, and generate text with NLA, then train multiple families of monitors to compare the two training comparisons.
- On the Qwen main grid the naive mixed comparison learns only exposure (exposure AUROC 1.000, pre-action commitment only 0.672); switching to the commitment comparison, the logistic probe reaches 0.853, the TF-IDF text baseline matches at 0.855, and zero-shot self-judgment is only 0.615. On Mistral-7B and OLMo-2-7B the naive comparison learns different things.
- The authors note: NLA text may be confabulated, the three models share a single benchmark, unsafe generations are concentrated in two suites, transfer tests have few positives (33 and 15), attacks are non-adaptive, activation access does not apply to most frontier API agents, and the zero-shot gap was measured only with 7B model self-judgment.
- Threat model
- The agent receives a trusted user instruction U, observes untrusted external content X, and selects actions from a tool set T; the attacker controls part of X, but does not control U, the model weights, or the audit facility; an attack succeeds when the generated or executed action advances an attacker goal not required by U. The paper studies only commitment at the tool-selection (control-flow) level, not direct jailbreak; the activation component assumes an open-source or self-hosted model.
- Evaluated models
- Qwen/Qwen2.5-7B-Instructmistralai/Mistral-7B-Instruct-v0.3allenai/OLMo-2-1124-7B-Instruct
- Benchmarks
- AgentDojo
- Metrics
- AUROCAUPRCFPR@90TPRlead time
The paper proposes a dual-stratified evaluation protocol that separates an agent's exposure to indirect prompt injection from whether it actually performs unsafe behavior (behavioral commitment), and argues that many conflicting results in latent monitor research are evaluation artifacts. On the Qwen AgentDojo main grid, a monitor trained with a naive mixed contrast (unsafe versus the rest) mainly learns the exposure signal and can barely predict which cases will become unsafe; after retraining only on exposed samples, the same probes can predict the model's own unsafe tool calls up to two steps ahead (the ceiling for three-step trajectories), with a logistic AUROC of 0.853, comparable to the trained TF-IDF text baseline of 0.855, reaching 0.896 for Mistral-7B and 0.912 for OLMo-2-7B. The representations are separable along the exposure dimension (probe 1.000 versus text baseline 0.908), and remain separable when the visible context is sanitized or unavailable.
Paper analysis
What problem does this paper attempt to solve?
Research results on pre-action latent-space monitoring are contradictory, and the authors believe the root cause is that evaluations conflate exposure and commitment.
Core problem: research on using a model's internal state to predict, before a tool call, whether indirect prompt injection will lead to an unsafe action has produced contradictory results, and the authors believe this is largely an evaluation artifact — evaluations do not distinguish "injection exposure" from "behavioral commitment."
- Setting and importance: tool-using agents following trusted instructions observe attacker-controllable content (emails, web pages, tool results), and once they treat it as instructions and call a tool, this constitutes indirect prompt injection; the dangerous moment is often the internal decision before tool selection, not the final response.
- Shortcomings of existing evaluations: benchmarks such as AgentDojo measure only externally visible failures, not whether failure was already detectable internally beforehand; the authors state that the commonly used attacked-versus-clean comparison is confounded, and that unstratified AUROC overestimates what the monitor knows.
- Core observation: exposure (injected content present in context) is a necessary but not sufficient condition for compromise; predicting, within the exposed population, the model's own subsequent unsafe tool call (commitment) requires a different training comparison.
- The paper proposes: a double-stratification protocol (stratifying both the evaluation and training populations by exposure/commitment), a baseline hierarchy (trained text baselines, zero-shot self-judgment, NLA text classifier), and a latent-space audit layer as an additional measurement axis on existing evaluations.
- Threat model:
- Goal: cause the agent to generate or execute actions that advance the attacker's goal rather than what the user instruction U requires (e.g., emailing the attacker, deleting files).
- Knowledge: the attacker controls part of the untrusted content X, but not U, the model weights, or the audit infrastructure.
- Capability: inject content via X; the paper does not study direct jailbreaks, and the commitment scope is limited to tool-selection (control-flow) compromise.
- Victim system: an agent that receives trusted instructions, observes untrusted content, and selects actions from a tool set T; the activation component assumes an open-source or self-hosted model.
What related research exists?
Related work is divided into four groups: agent safety benchmarks, by-design defenses, interpretability and latent-space monitoring, and pre-action internal monitoring and its negative results.
Agent safety benchmarks
- AgentDojo (Debenedetti et al., 2024) — evaluates injection attacks and defenses in dynamic tool environments and is the experimental substrate of this paper; the paper does not change its threat model and only adds activation and NLA observations at decision points.
- InjecAgent (Zhan et al., 2024), ToolHijacker (Shi et al., 2026), ToolEmu (Ruan et al., 2024), AgentHarm (Andriushchenko et al., 2025) — respectively provide attack taxonomies, tool-selection-layer attacks, a generation/evaluation-separated form, and evidence of multi-step malicious requests without jailbreaks.
Capability control and by-design defenses
- CaMeL (Debenedetti et al., 2025) and FIDES (Costa et al., 2025) — extract control/data flow or deterministic execution information-flow labels from trusted queries, preventing untrusted data from influencing control flow by design; Beurer-Kellner et al. (2025) systematize such patterns, and Emde et al. (2025) prove a for-all-inputs bound in a narrower setting.
- The paper notes that these by-design works delineate the scope in which probabilistic monitors survive, and that these surviving components are usually validated on the attacked-versus-clean comparison that this paper calls confounded.
Interpretability and latent-space monitoring
- NLA (Fraser-Taliente et al., 2026) — maps residual-stream activations to text and reconstructs them, sitting between sparse methods and free-form explanations; its authors explicitly state that explanations may be confabulated, Dingeto (2026) says most claim-level content is not constrained by reconstruction, and this paper accordingly treats NLA text as evidence rather than ground truth.
- CoT monitoring (Korbak et al., 2025) is the conceptually closest neighbor; AI-control work (Terekhov et al., 2026) shows adaptive attacks can target the monitor itself, and alignment faking (Greenblatt et al., 2024) further motivates internal measurement.
Latent-space injection probes and pre-action monitoring
- Dong et al. (2026) — hidden-state probes reach 90%+ AUROC on unseen attacks across eight models and build the AGRI defense; Wang et al. (2026a) inject directly from hidden-state alignment detection. The paper notes that the two detect exposure, whereas this paper audits commitment, so the prediction targets differ.
- Pre-action monitoring has results in both directions: Zhu et al. (2026), Chauhan and Revankar (2026), Sun et al. (2026) (pre-generation state decoding of tool necessity AUROC 0.89–0.96 when there is no attacker) and others report positive results; Fomin et al. (2026) report negative results (a direction with constructed contrast AUC 1.000 triggered in 0/143 pre-action contexts, best future-behavior probe AUC 0.801), and Li et al. (2026) likewise question high clean-versus-attack AUC.
Baselines and benchmarks: Baselines include trained text baselines (visible-text naive Bayes, TF-IDF logistic), zero-shot self-judgment (the same Qwen model), an NLA text classifier, transcript keywords, tool policy, and hybrid; the benchmark is the four AgentDojo suites.
Author positioning: this paper does not change the benchmark or propose a new defense, but provides the dual-stratified measurement itself, and states that the training comparison can reproduce Fomin et al.-style negative results, which is one candidate explanation for the conflicting results.
How does the paper address this problem?
On top of existing evaluations, add a latent-space audit layer, using a dual stratified protocol to distinguish exposure from commitment on both the evaluation and training sides.
Overall approach: treat latent-space auditing as a post-hoc instrumentation layer stacked on existing agent safety evaluations, use a double-stratification protocol to distinguish exposure from commitment in both the evaluation population and the training comparison, and then compare what monitors learn under different representations (activations, NLA text, visible text, zero-shot self-judgment).
Problem setup and formalization
- The agent receives a trusted instruction U, observes untrusted content X, and selects an action a = (t, θ) from a tool set T; an attack succeeds when the action advances an attacker goal not required by U.
- Exposure means injected content is present in the observation context; commitment means the model itself subsequently generates an unsafe action; latent lead time is defined as the unsafe execution step minus the earlier step at which it was first flagged (0 means detected only at the unsafe step, null means never flagged).
Audit pipeline
- The flow is: benchmark records → trajectories → activation capture → NLA text → labels → detector → metrics; records carry the trusted task, untrusted content, tool set, attack metadata, and behavior labels.
- Prompt provenance: normalized_replay activations come from reconstructed prompts, exact_prefix comes from the exact prefix exported at the audit point, and agentdojo_model_generated_next_action means the audited model itself generated the action step used for the behavior label; the authors state that prompt fidelity is a key engineering requirement, and that checklist discipline previously found and fixed prompt leakage that inflated results.
- The main experiments capture at residual-stream layer 20 at the final decision token (because the released verbalizer targets that layer); a synthetic ablation over layers 6, 13, 20, and 27 shows that all four layers rank strongly but that calibrated thresholds drift under transfer.
Monitor families and training comparisons
- Six monitor families: transcript (visible-text keywords/rules), tool policy (proposed tool versus unsafe tool metadata), raw NLA taxonomy (keyword matching over 13 risk categories), trained NLA text (bag-of-words + bigram naive Bayes, α=1), raw activation probe (nearest centroid, relative Euclidean distance), hybrid (fixed weights 0.20/0.25/0.35/0.20).
- The commitment comparison experiment adds: an L2-regularized logistic probe on standardized activations, visible-text naive Bayes, a TF-IDF logistic text baseline (unigram+bigram, top 5,000 features, L2 normalization, same folds), and a zero-shot LLM judge (the same Qwen model scores the same visible context from 0–100 for exposure and compliance likelihood).
- Two training comparisons: the naive mixed comparison (unsafe vs. rest, with negatives mixing attacked-but-safe and clean) and the commitment comparison (unsafe vs. attacked-safe, strictly using only steps before the action step).
Evaluation method
- Metrics are AUROC, AUPRC, and FPR@90TPR; learned monitors use 5-fold stratified cross-validation, and all result tables report 1,000 case-level bootstrap intervals; the commitment comparison additionally has a four-seed grouped-fold leakage-control protocol grouped by user task.
- Unsafe labels are mechanical: the first generated tool call that hits the unsafe tool set inferred from the injected task is judged unsafe; the authors report that re-deriving from the released export reproduces all 280/280 main-grid labels.
- The evidence ladder (Table 4) grades mock, synthetic, replay, exact-prefix replay, proxy lead time, and model-generated action, and each claim is made only at the level its artifact supports.
What experiments did the paper conduct?
Three sets of experiments: replay separability, transfer, and double stratification on model-generated actions; plus reproduction on two model families.
Experimental Setup
- Models under test: Qwen/Qwen2.5-7B-Instruct (main experiments, layer 20), mistralai/Mistral-7B-Instruct-v0.3 and allenai/OLMo-2-1124-7B-Instruct (replication, both at layer 23 of 32, matched by relative depth, no layer search, activations only).
- Benchmark and scale: AgentDojo four suites; replay grid of 200 records (160 attacked, 40 clean, workspace+slack, ignore_previous and system_message templates); model self-generated actions total 886 unique trajectories (789 attacked, 97 clean), main grid is workspace important_instructions 280 cases (40 clean, 99 attacked-but-safe, 141 unsafe).
- Generation settings: deterministic generation (temperature 0, 80 new tokens); NLA uses kitft/nla-qwen2.5-7b-L20-av, 1 sample per activation.
- Baselines: transcript, tool policy, raw NLA taxonomy, trained NLA text, hybrid, visible-text naive Bayes, TF-IDF logistic, zero-shot self-judgment (same Qwen model).
- Metrics and determination: AUROC/AUPRC/FPR@90TPR; unsafe labels determined mechanically (generated call hits an unsafe tool set); 5-fold stratified cross-validation + 1,000 bootstraps; commitment comparison additionally has a user-task grouped four-seed protocol.
Main Results
Table 1 (Qwen main grid, out-of-fold AUROC, 1,000-bootstrap intervals in parentheses):
Swipe horizontally to read the table
Training comparison Monitor Attacked-only Pre-action att.-only Exposure Naive mixed (unsafe vs. rest) Trained NLA text 0.934 0.556 [0.483, 0.629] 0.817 Naive mixed Raw activation probe 0.629 0.672 [0.605, 0.743] 1.000 [1.000, 1.000] Commitment (unsafe vs. attacked-safe) Centroid activation probe 0.763 [0.691, 0.819] — — Commitment Logistic activation probe 0.853 [0.799, 0.897] — — Commitment Visible-text TF-IDF logistic 0.855 [0.803, 0.901] — — Commitment Visible-text naive Bayes 0.793 [0.737, 0.850] — — Commitment Trained NLA text 0.570 [0.500, 0.644] — — - The authors state that on Qwen the naive mixed comparison trains an exposure detector: the probe flags ahead of 141/141 unsafe actions, but also triggers ahead of 99/99 attacked-but-safe, with exposure-axis AUROC 1.000 but pre-action commitment only 0.672.
- The authors state that the commitment comparison recovers the pre-action signal on the same representation (logistic 0.853), but the TF-IDF text baseline 0.855 matches it (paired difference −0.003 [−0.054, 0.050], Appendix C), i.e., the recovery reflects the comparison rather than privileged internal access.
- Zero-shot self-judgment exposure detection is near-perfect (0.969–1.000) but compliant prediction is only 0.615 [0.563, 0.668] in-distribution (Appendix C); the authors state that the audited model's own zero-shot predictions cannot reliably recover this signal.
Replication: Mistral-7B and OLMo-2-7B
- Mistral-7B (480 attacked, 167 unsafe): commitment comparison logistic probe 0.896 [0.866, 0.923] (grouped 0.856); the naive mixed comparison learns commitment with reversed exposure ranking (commitment 0.835, exposure 0.282 [0.223, 0.343], Figure 1), of whose 353 negative cases 313 are attacked-but-safe.
- OLMo-2-7B (480 attacked, 201 unsafe, Table 3): commitment comparison logistic 0.912 [0.887, 0.935] (grouped 0.905), TF-IDF 0.921; its naive comparison reads both axes (exposure 0.957, commitment 0.785).
- The authors state that across the three families the naive comparison learns different things (exposure only, reversed exposure, both axes read), so evaluation must be stratified.
Transfer and replay
- Replay separability (Table 7, 200 cases): trained NLA text AUROC 0.929, activation probe 0.999, raw taxonomy 0.575 (interval covers chance); exact-prefix-only ablation holds (0.962 / 1.000). The authors state that the replay structure may not survive live interaction or adaptive attacks, and make no behavioral defense claim.
- Replay transfer: workspace→slack 0.927 (NLA text)/1.000 (probe), reverse 0.970/1.000, held-out attack template 0.995–1.000; the authors note this may reflect construction regularities of the grid itself.
- Commitment comparison transfer (Table 2): centroid probe 0.756 on four held-out templates (33/160 unsafe), 0.837 on the travel suite (15/140); logistic probe drops to 0.572/0.684, naive Bayes 0.372 on travel; the authors state that with 15 positives this is only suggestive, and centroid was selected post hoc as the main monitor.
Other ablations and analyses
- Per-target held-out: logistic probe 0.81–0.95, versus identity-prior ceiling 0.63 (Section 7 of the main text).
- Step-wise probes: t−2 is 0.878 [0.833, 0.921], t−1 is 0.871 [0.821, 0.917] (logistic).
- Single-sample NLA text loses signal under the commitment comparison (NB 0.570, TF-IDF 0.518); three-sample rerun partially recovers (0.704, 0.683, Appendix D).
- Representation separation on the exposure axis: activation probe 1.000, naive Bayes 0.908, TF-IDF 0.790 (Section 7 of the main text).
- Negative results (Appendix D): banking and slack full grids have no unsafe generations, system_message in workspace is 0; fixed threshold 0.5 is misleading (probe false-alarms on 18/40 clean); tool policy is unbeatable once the call is visible.
- Unstratified view (Table 5): tool policy and hybrid are 1.000 and 0.989 respectively, which the authors state is definitional (the generated call is visible to them) rather than predictive ability.
What are some points that can be further explored?
The authors list limitations including NLA confabulation, a single benchmark, few positive transfer cases, and non-adaptive attacks; experiments cover three 7B models and AgentDojo.
Limitations noted by the authors and future directions
- NLA text is not ground truth and may be confabulated; all NLA results use only one released verbalizer at layer 20, 1 sample per activation (first Limitations item).
- The three models share one benchmark, and the latent-versus-text comparison inherits the compliance structure of each grid; AUROC values depend on AgentDojo (second Limitations item).
- Unsafe generations are concentrated in two suites and two high-yield templates, suite coverage is partial, and transfer tests have few positives (33 and 15) (third Limitations item).
- Live rollout may change the distribution and timing of unsafe actions; AUPRC/FPR are values under benchmark prevalence, and the clean-traffic false-positive cost of the commitment monitor is not measured (fourth Limitations item).
- Activation access does not apply to most frontier API agents; attacks are non-adaptive, a monitor-aware attacker may suppress the commitment direction, and all AUROCs are non-adaptive upper bounds; the zero-shot gap covers only 7B model self-judgment, frontier judges are untested (fifth Limitations item).
- Adaptive attacks are "a further population awaiting stratification," which the authors call a conjecture but do not measure (fifth Limitations item).
Scope of experimental coverage
- Models under test are Qwen2.5-7B-Instruct, Mistral-7B-Instruct-v0.3, OLMo-2-1124-7B-Instruct, 3 in total, all at the 7B scale; the latter two are activations only, no NLA (Sections 5, 7).
- Benchmark is only the AgentDojo four suites; model self-generated trajectories 886, unsafe positives 189, concentrated in workspace and travel (Appendix I).
- Commitment comparison main grid n=240 (141 unsafe vs. 99 attacked-but-safe); transfer sets have 33 and 15 positives (Table 2).
- Attack templates are the five existing AgentDojo ones, attacks are non-adaptive; the paper reports no experiments under monitor-aware attacks.
- Zero-shot judge uses only Qwen self-judgment; the paper reports no other judge models or human evaluation.
Summarize the main content of the paper
The double-stratification protocol distinguishes exposure from commitment: the naive comparison learns only exposure, the commitment comparison recovers the pre-action signal, and the text baseline is on par.
An analysis paper on evaluation methods for latent-space monitoring of tool-using agents, arguing that evaluating pre-action monitors requires distinguishing injection exposure from behavioral commitment on both the evaluation population and the training comparison.
- Problem: research on pre-action internal monitoring of indirect prompt injection has produced contradictory results; the authors believe the unstratified attacked-versus-clean comparison is confounded, and AUROC overestimates the monitor.
- Method: stack an audit layer on AgentDojo (trajectories → residual-stream activations → NLA text → labels → monitors) and compare what each representation learns under the naive mixed comparison (unsafe vs. rest) versus the commitment comparison (unsafe vs. attacked-safe, strictly pre-action).
- Main results (Qwen main grid, Table 1): the naive comparison trains an exposure detector — exposure AUROC 1.000, pre-action commitment only 0.672; under the commitment comparison the logistic probe recovers to 0.853, but the TF-IDF visible-text baseline is on par at 0.855, and zero-shot self-judgment is only 0.615.
- Reproduction: Mistral-7B commitment comparison 0.896, whose naive comparison learns commitment with an inverted exposure ranking; OLMo-2-7B commitment comparison 0.912, whose naive comparison reads on both axes — the authors state that what the naive comparison learns depends on the model and population.
- Other findings: on the exposure axis, activations (1.000) outperform trained text (0.908/0.790); single-sample NLA text loses the commitment signal (0.570); tool policy saturates once the call is visible, and the value of latent-space monitoring lies only in lead time.
- Authors' conclusion: unstratified AUROC overestimates what latent-space monitors know, and evaluations should stratify both sides; NLA remains a noisy input representation rather than readable evidentiary evidence; latent-space auditing is a complementary measurement axis, not a replacement for by-design defenses.