Skip to content

Policy-verified self-training: learning agent compliance from verifiable policy rewardsPolicy-Verified Self-Training: Learning Agent Compliance from Verifiable Policy Rewards

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2610.19372· Min-Young YuCorners Co., Ltd.Indexed by this site · 2026-10-15· Originally publishedSelected DefensesSelectedAttention39

Quick read

Defenses

Based on the paper PDF (generated by Gemini); refer to the original

The authors use policy-gate verdicts to self-train the agent, reducing Qwen3-8B's violation trajectory rate on AgentDojo from 37.2% to 10.3%.

Threat modelIn a prompt injection environment, the attacker injects malicious instructions through tool-returned results (observed_text), with the goal of inducing the agent to perform tool calls prohibited by the safety policy (such as unauthorized transfers or sending emails) to achieve the injected goal; the victim system is a tool-calling language model agent (Qwen3-8B, Qwen3-4B-Instruct-2507). The paper does not formalize attacker knowledge.

Questions
Tool-calling agents are vulnerable to prompt injection inducing them to perform prohibited tool calls. Existing runtime gates can block violations, but each call incurs additional latency and utility overhead, and the model itself is unchanged, so it will repeatedly attempt the prohibited calls.
Methods
Proposes Policy-Verified Self-Training (PVST), which reuses a deterministic gate compiled from text policy to replay agent interaction trajectories: compliant successful trajectories serve as positive examples for rejection-sampling fine-tuning (RFT), and trajectories truncated at the first rejected call serve as negative examples for DPO preference optimization.
Experiments and results
On AgentDojo, DPO-gate reduces Qwen3-8B's violation trajectory rate from 37.2% to 10.3% (Table 1), and the gating intervention rate from 39.2% to 8.8% (Table 9), with gains transferring to unseen attack templates and unseen task suites.
Limitations and future work
The evaluation covers only the Qwen3 model family; some compliance gains stem from avoiding guarded tools, causing utility degradation on the travel suite; some compiled rules deviate from the original clauses; and generalization to injection tasks and adaptive attacks were not tested.
Experimental setupQwen3-8B、Qwen3-4B-Instruct-2507 · AgentDojo (banking, travel, workspace)、τ2-bench airline · Utility %、ASR % et al.
Evaluated models
Qwen3-8BQwen3-4B-Instruct-2507
Benchmarks
AgentDojo (banking, travel, workspace)τ2-bench airline
Metrics
Utility %ASR %Violating traj. %utilw %utilr %Gate interventions %pass^1
AI summaryand selection rationaleThe paper proposes Policy-Verified Self-Training (PVST), which reuses a runtime policy verifier's judgments on each agent tool call as verifiable rewards, using rejected trajectories as negative examples for preference optimization, without needing a stronger teacher model, human preference labels, or attack labels. After training with Qwen3-8B on AgentDojo, violation trajectories drop from 37.2% to 10.3% (three seeds), attack success rate drops from 12.4% to 0.5%, and task utility stays flat or higher, though travel-suite utility decreases. At deployment, the original verifier is retained, with its intervention rate dropping from 39.2% to 8.8%, and compliance effects also transfer to attack templates unseen in training (37.7% to 11.0%) and to rule sets and tasks not used in training (34.8% to 16.7%). The authors note that when task success already implies compliance, or when controlled actions do not appear in both allowed and forbidden contexts, verifier judgments carry limited information, with τ2-bench airline being such a boundary case.

The paper proposes Policy-Verified Self-Training (PVST), which reuses a runtime policy verifier's judgments on each agent tool call as verifiable rewards, using rejected trajectories as negative examples for preference optimization, without needing a stronger teacher model, human preference labels, or attack labels. After training with Qwen3-8B on AgentDojo, violation trajectories drop from 37.2% to 10.3% (three seeds), attack success rate drops from 12.4% to 0.5%, and task utility stays flat or higher, though travel-suite utility decreases. At deployment, the original verifier is retained, with its intervention rate dropping from 39.2% to 8.8%, and compliance effects also transfer to attack templates unseen in training (37.7% to 11.0%) and to rule sets and tasks not used in training (34.8% to 16.7%). The authors note that when task success already implies compliance, or when controlled actions do not appear in both allowed and forbidden contexts, verifier judgments carry limited information, with τ2-bench airline being such a boundary case.

Why it was selectedThe paper reuses the runtime policy verifier's judgments as training rewards, letting guardrails also serve as teachers; teams deploying agents can use this to reduce reliance on runtime interception.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors attempt to address the problems of tool-calling agents being prone to violations and the high overhead of runtime gating, proposing to convert gating decisions into self-training supervision signals.

    Tool-calling agents are prone to behavior that violates safety policies when executing tasks, and existing runtime gate defenses incur fixed overhead and cannot change the model itself.

    • Problem scenario and importance: Language-model-based tool-calling agents deployed in scenarios such as airline booking and bank transfers must follow written policies; open-source small models often perform unauthorized operations (such as transferring funds) when facing prompt injection, causing real harm (Section 1).
    • Shortcomings of existing defenses: Existing runtime gates incur fixed latency and utility overhead on every tool call; after the gate blocks a prohibited call, the verdict is discarded, the model weights are unchanged, and the model will repeatedly attempt the same prohibited call (Section 1).
    • Threat model:
      • Attacker goal: Induce the agent in the victim environment to perform tool calls prohibited by the safety policy (such as unauthorized transfers or sending emails) to achieve the injected goal (Section 1, Section 4).
      • Attacker knowledge: The paper does not formalize the attacker's knowledge of model weights or defense architecture (Section 4).
      • Attacker capability: The attacker injects malicious prompts (such as the important_instructions template) through tool-returned results (observed_text), but injected content cannot enter the user input channel to satisfy user-authorization predicates (Section 3.1).
      • Victim system: Tool-using language model agents (such as Qwen3-8B and Qwen3-4B-Instruct-2507) deployed in environments monitored by a compiled policy gate (Section 4, Section 5.6).
    • Core observation: Verdicts from a deterministic gate compiled from policy text are deterministic, require no human annotation, and are traceable; the verdict information can be converted into trajectory-level supervision signals for rejection-sampling fine-tuning and preference optimization (Section 1).
    • Proposed approach: Proposes Policy-Verified Self-Training (PVST), in which the agent self-trains using its own interaction trajectories and the verdicts of a replayed gate, internalizing compliant behavior into the model weights and turning the runtime gate into a low-frequency safety backstop (Section 1).
  2. What related research exists?

    The paper discusses four categories of related work: agent runtime guardrails, prompt-injection training, verifiable-reward self-training, and business policy agents.

    The paper reviews related work from four directions: runtime guardrails, prompt-injection training, verifiable-reward self-training, and business policy agents:

    Runtime guardrails for agents

    • AgentDojo (Debenedetti et al., 2024) — proposes a dynamic benchmark for evaluating tool-calling agents under prompt injection, and provides defenses such as tool filtering and spotlighting.
    • Runtime enforcement layers (Debenedetti et al., 2025; Shi et al., 2025; Wang et al., 2026) — restrict the operations an agent can perform at runtime through permissions, capabilities, or rules.
    • NOMOS (Yu et al., 2026) — compiles policy documents into predicate guard rules and enforces them in the tool executor; this paper directly reuses that gate and treats its verdicts as training data.

    Prompt-injection training

    • StruQ (Chen et al., 2025a), SecAlign (Chen et al., 2025b), Meta SecAlign (Chen et al., 2025c), and instruction hierarchy (Wallace et al., 2024) — defend against injection through structured queries, constructing preference pairs from injected prompts, or training models to distinguish system and tool text privileges. The authors note that these works all manually construct attack samples for training, whereas the negative examples in this paper come from calls rejected by the policy checker.

    Verifiable rewards and self-training

    • RFT (Yuan et al., 2023), ReST (Gulcehre et al., 2023), DPO (Rafailov et al., 2023), and GRPO (Shao et al., 2024) — use deterministic checkers in math or code domains to provide verifiable rewards for self-training. This paper transfers offline methods to evaluating policy compliance rather than answer correctness.
    • AgentLTL (Elkoussy & Perez, 2026) and RLVP (Li & Shi, 2026) — also study checker-rewarded agents, but the authors note that neither compiles checkers from policy text nor considers injected inputs.

    Business policy agents and benchmark comparisons

    • τ-bench and τ2-bench (Yao et al., 2024; Barres et al., 2025) — evaluate agent adherence to domain policies in simulated user environments; this paper uses the τ2-bench airline as a boundary-case test.
    • Baseline methods and evaluation benchmarks: Baselines include the Base un-finetuned model, rejection sampling filtered only by success (RFT-succ), preference optimization without verified gate filtering of negatives (DPO-ctrl-any, DPO-ctrl-clean), and attack-oracle supervision (DPO-oracle); evaluation benchmarks are AgentDojo (including banking, travel, and workspace suites) and τ2-bench airline.

    The authors state that prior work on agent policy compliance lacked checkers compiled from policy text that can score trajectories under injected inputs; this paper directly converts an existing runtime guardrail into a self-training supervision source for the same agent (Section 1, Section 2).

  3. How does the paper address this problem?

    PVST reuses the compiled gate to adjudicate self-generated trajectories offline, using compliant successes as positives and rejected cut points as negatives for two-stage RFT and DPO training.

    The overall idea is to use a deterministic gate compiled from policy text to perform offline replay evaluation of trajectories generated by the agent itself, constructing preference pairs from compliant successful trajectories and trajectories truncated at violating calls, and transferring safety constraints into the model through Policy-Verified Self-Training (PVST).

    Compiled Gate and Fact Storage

    The gate reuses the rule set compiled offline by Yu et al. (2026), where each rule contains an identifier, type (forbidden or precondition), constrained tool, predicate, and corresponding policy clause (Section 3.1). Before each tool call, the gate reconstructs the fact store based on the full conversation history, distinguishing sources such as user input (user_text), tool return text (observed_text), and transaction parties in account records; tool return text cannot be elevated to user authorization, thus preventing injected text from directly satisfying authorization predicates.

    Reward Formalization and Preference Relation

    For a trajectory τ containing executed tool calls, the scalar reward is defined as: r(τ) = u(τ) − λ v(τ) In this formula, u(τ) ∈ {0, 1} denotes the benchmark's task success flag, v(τ) is the number of tool calls rejected by the gate during replay, and λ is the penalty coefficient (Section 3.2). PVST does not directly optimize the scalar r, but binarizes it into an acceptance relation (u=1 ∧ v=0) and a preference relation within the same task (v=0 is better than v>0), so λ is not tuned.

    Two-Stage Self-Training Pipeline

    The training pipeline consists of two stages: filtered rejection sampling and preference optimization.

    1. Gate-filtered rejection sampling (RFT-gate): The agent generates k trajectories on training tasks with sampling temperature 1.0, filters trajectories with u=1 and v=0 as positives (up to 8 randomly sampled per task), and trains a LoRA adapter on all projection matrices (rank 16, learning rate 10−4, 2 epochs, only assistant token loss) (Section 3.3, Section 4).
    2. Gate-annotated preference optimization (DPO-gate): Constructs preference pairs within the same task, with positives being compliant successful trajectories and negatives being trajectories with v>0, truncated immediately after the assistant turn containing the first rejected call, precisely localizing negative feedback to the violating action. Continue training from the RFT-gate adapter for 1 epoch, with DPO coefficient β=0.1, and add a supervised fine-tuning loss term with weight 0.3 on the positive side; the reference policy is the RFT-gate adapter (Section 3.4).

    Control Groups and Truncation Position Design

    To isolate the effects of negative selection criteria and truncation position, the authors design strictly controlled comparison groups (Section 3.5):

    • DPO-ctrl-any: Negatives are any task failure trajectories (u=0), truncated at random assistant turns.
    • DPO-ctrl-clean: Only trajectories filtered by the gate to exclude violations (u=0 ∧ v=0), negatives contain no violation signals, truncated at random turns.
    • DPO-oracle: Negatives are determined by the benchmark's attack oracle (injection goal achieved), truncated at random turns.
    • Truncation ablation group: Includes DPO-gate negatives truncated at random turns (DPO-gate, random cut) and DPO-oracle negatives truncated after the first write operation (DPO-oracle, write cut).
  4. What experiments did the paper conduct?

    On AgentDojo, DPO-gate reduces Qwen3-8B's violation rate to 10.3%, and the gains transfer to unseen templates and suites.

    Experimental Setup

    • Models under test: The primary model under test is Qwen3-8B (vLLM, bf16, thinking disabled, Hermes tool parser); generalization and reproduction experiments include a second model Qwen3-4B-Instruct-2507 (Section 4, Section 5.6).
    • Dataset and task split: AgentDojo benchmark, covering banking (v1.1.1, 16 user tasks × 9 injection tasks), travel (v1.2, 20 × 7), and workspace (v1.2.1, 40 × 14); 30% of user tasks and all corresponding injection tasks are held out for testing (fixed seed 20260919: banking holds out 5/16, travel 6/20, workspace 12/40). Training attack is important_instructions. Boundary case tests use τ2-bench airline (50 tasks, 30/20 split) (Section 4).
    • Comparison baselines: Base untrained base model, RFT-succ, RFT-gate, DPO-gate, DPO-ctrl-any, DPO-ctrl-clean, DPO-oracle, and truncation position ablation variants (Section 3.5, Section 4).
    • Main metrics: Utility % (task completion rate), ASR % (attack success rate), Violating traj. % (proportion of trajectories with gate-violating calls), utilw % and utilr % (utility for user tasks requiring write tools and those not requiring write tools), Gate interventions % (actual interception rate of the gate at deployment) (Section 4).
    • Evaluation method and environment: Testing is performed at temperature 0; task success is determined by AgentDojo, attack success by safety flags, violations by deterministic gate replay, with no LLM judge involved (Section 4).
    • Sample size and repetitions: Main experiments report mean and standard deviation over 3 training seeds (RFT-gate, DPO-gate, DPO-ctrl-any, DPO-ctrl-clean); held-out task evaluation sample size is approximately 240 triples (Table 1), and the common evaluation set without length truncation is 230 triples (Table 14).

    Main Results

    The table below presents the pooled main results across the three suites for Qwen3-8B on AgentDojo held-out tasks, important_instructions attack, with the gate disabled (from Table 1):

    Swipe horizontally to read the table

    Model/Method (Arm)Negative source (Negatives)Utility %ASR %Violating traj. %utilw %utilr %
    Base–35.512.437.221.553.3
    RFT-succ– (only 1 seed trained)35.45.430.818.756.6
    RFT-gate–40.2 ± 3.35.5 ± 1.228.8 ± 2.021.3 ± 4.965.0 ± 3.3
    DPO-gateGate-rejected and truncated at rejected call39.9 ± 1.90.5 ± 0.210.3 ± 0.921.1 ± 2.665.1 ± 0.5
    DPO-ctrl-anyAny failure (55% contain violations)45.1 ± 0.21.2 ± 1.220.2 ± 2.820.6 ± 1.175.7 ± 0.9
    DPO-ctrl-cleanGate-filtered failures without violations41.0 ± 3.46.5 ± 1.131.9 ± 0.920.6 ± 3.469.3 ± 6.0
    DPO-oracleAttack oracle positives (1 seed)40.20.422.019.069.2
    • Compliance gains come from policy signal, not preference optimization per se: The authors state that self-training on successful trajectories alone (RFT-gate) can halve ASR and reduce violations by one-fifth, while using gate adjudication to select negatives (DPO-gate) reduces violating trajectories to 10.3%, and the clean control without violations (DPO-ctrl-clean) still has a violation rate of 31.9% (Section 5.1).
    • Policy supervision is not equivalent to attack supervision: The authors state that attack oracle supervision (DPO-oracle) reduces ASR to 0.4%, but violating trajectories remain at 22.0%, because the attack oracle only marks trajectories where the injection goal is achieved, and only 34 of its 63 negatives contain violating calls (Section 5.1).
    • Sample selection plays a major role and positioning provides incremental gains: With the same random truncation position, gate-selected negatives (16.9%) still outperform the two controls (20.4% and 32.6%); truncating at the rejected call further reduces violating trajectories by 6.9 percentage points compared to random truncation (from 13.0% to 6.1% on the common set, but the single-seed confidence interval touches 0) (Section 5.1).

    Inference-Time Gate Synergy and Generalization Tests

    • What was tested: The intervention rate of the gate when retained at deployment (Table 9), and generalization on unseen attack template tool_knowledge (Table 3) and the workspace suite completely excluded from training (Table 4) (all seed 0).
    • Results: With the gate retained, DPO-gate's gate intervention rate drops from 39.2% (Base) to 8.8% (Table 9); under unseen attack template tool_knowledge, DPO-gate's violating trajectory rate is 11.0% (Base 37.7%, Table 3); DPO-gate models trained only on banking and travel have a violation rate of 16.7% on workspace held-out tasks (Base 34.8%, models trained on workspace 14.1%, Table 4).
    • Authors' interpretation: The authors state that the deployment scheme is not to remove the gate but to turn it into a low-frequency deterministic backstop; compliance is not mechanical memorization of prompts and can achieve measurable transfer across suites sharing tools and predicates (Section 5.2, Section 5.3, Section 5.4).

    Second Model and Paired Diagnostic Analysis

    • What was tested: Reproduction of PVST on the smaller model Qwen3-4B-Instruct-2507 (Table 11), and testing of guarded tool invocation tendencies on 41 minimal pairs with matched contexts (Table 12).
    • Results: On Qwen3-4B, DPO-gate reduces violating trajectory rate from 37.3% to 10.2%, and gate intervention rate from 36.1% to 10.6% (Table 11); on 41 diagnostic contexts, both 8B and 4B DPO-gate models reduce execution rates for forbidden variants to 0.0% (Base 56.1% and 19.5% respectively), and execution rates for allowed variants are at least as high as the base model (both 24.4%, Base 19.5% and 14.6% respectively) (Table 12).
    • Authors' interpretation: The authors state that compliance training is reproduced on the second model; gate-trained agents can distinguish allowed and forbidden targets in paired contexts, and truncation at the rejected call helps prevent preference penalties from spilling over to compliant calls (Section 5.6).

    Business Policy Boundary Case: τ2-bench airline

    • What was tested: Evaluation of filtered distillation and DPO on the multi-turn business policy benchmark τ2-bench airline (Table 5, including in-domain data).
    • Results: Distillation filtered by the reference rule set reduces write violation rate from 88.5% (Base) to 40.9%, with RFT-1 success rate at 40.0%; but DPO with reference rule labels results in zero write calls (0/60 simulations, pass^1 at 31.7%) (Table 5).
    • Authors' interpretation: The authors state that in τ2-bench, task success essentially implies compliance, so the gate adjudication provides no additional information beyond task success during the filtering stage, and trajectory-level preferences misclassify necessary write operations as negatives, causing the model to completely abandon write operations (Section 5.5, Section 6.1).

    Other Ablations and Analyses

    • Preference pair quantity scaling: 28 pairs of annotated preference pairs reduce violating trajectory rate from 29.5% to 17.3%, with effects saturating between 56 and 113 pairs (Table 13, seed 0).
    • Write-task utility per suite: DPO-gate increases utilw in workspace from 12.9% to 23.7%, maintains banking at 25.0%, and decreases travel from 64.3% to 0.0% (Section 5.1, seed 0).
    • Negative sample balancing limitation: After limiting negatives to within twice the legitimate usage count of each tool, pooled utility recovers to 43.9% with a violation rate of 11.0%, but travel's utilw remains unimproved (Section 6.2, seed 0).
    • Guarded tool invocation frequency: DPO-gate reduces allowed send_money calls from 24.4 to 2.2 per hundred trajectories, and travel's create_calendar_event allowed calls from 16.7 to 0.0 per hundred trajectories (Table 10, seed 0).
  5. What are some points that can be further explored?

    The authors note limitations including a single model family, utility degradation from excessive avoidance, and rule deviations; experiments cover specific open-source models and benchmarks.

    Limitations and future directions noted by the authors

    • Model family and task generalization limitations: The tested models are limited to the Qwen3 family (Qwen3-8B and Qwen3-4B-Instruct-2507), the secondary experimental arm uses only a single random seed; injection tasks are shared between training and held-out user tasks, and generalization at the injection-task level was not tested (Section 7).
    • Utility degradation from avoidance behavior: Some compliance gains come from the model actively avoiding guarded tools, reducing utility on the travel suite below the base model (Section 7, Section 5.6, Section 6.2).
    • Gate design is not attack-agnostic: The policy, extended predicate vocabulary, and goal-matching rules were designed with reference to the benchmark's injection goals; although the self-training process does not read attack labels, the verifier itself is not fully attack-agnostic, and cross-suite testing held out only data, not the verifier design (Section 7).
    • Semantic deviations inherited from compilation bindings: The reward signal inherits semantic deviations between three compiled rules and the original clauses (TRA-AUTO-PRE-03, WOR-AUTO-PRE-04, WOR-AUTO-FBD-01), and transfers to payees already present in account history are allowed; these types of injected calls are not counted as violations (Section 7, Appendix A).
    • Business policy experiment setup limitations: On τ2-bench, the training rows include trajectories from the evaluation task (in-domain evaluation), the training verifier also serves as the evaluation metric, and a distillation stage with a larger model (gemma-4-26B) was introduced (Section 7).
    • Fine-grained information underutilized: The authors note that trajectory-level preference feedback discards most of the fine-grained information available to the gate (specifically which call, which rule, which predicate was triggered, and what state change would make the call compliant); future work should explore how to incorporate this information into learning objectives and how to use the same scalar reward to drive online policy optimization (Section 8).

    Experimental coverage

    • Model coverage: The experiments evaluate two open-source models, Qwen3-8B and Qwen3-4B-Instruct-2507 (Section 4, Section 5.6).
    • Benchmark coverage: Evaluation covers the banking, travel, and workspace suites of AgentDojo, as well as the τ2-bench airline environment (Section 4).
    • Attack template coverage: Injection testing covers two attack templates, important_instructions and tool_knowledge (Section 4, Section 5.3).
    • Sample and pair scale: The AgentDojo offline training pool contains 2351 trajectories, with at most 113 DPO preference pairs; the held-out task evaluation scale is about 240 triples (Section 4, Table 8).
    • What the paper does not report: The paper does not report dynamic testing against adaptive attackers, nor direct training performance of online reinforcement learning algorithms (such as GRPO) under this reward (Section 7, Section 8).
  6. Summarize the main content of the paper

    PVST uses deterministic policy gating to label self-generated trajectories for preference training, effectively reducing violation rates and gating overhead, but with some tool circumvention.
    • Paper positioning: This paper proposes Policy-Verified Self-Training (PVST), transforming a runtime policy gate originally used only for interception into a verifiable reward source for agent self-training.
    • Core problem: Addressing the issues that tool-calling agents are vulnerable to prompt injection leading to policy-violating actions, and that existing runtime gates face fixed latency and utility taxes, exploring how to internalize compliant behavior directly into model weights, turning the gate into a low-frequency safety backstop.
    • Method design: After the agent generates its own interaction trajectories, a deterministic gate compiled from policy documents adjudicates offline; compliant successful trajectories are used for rejection sampling fine-tuning (RFT-gate), and violating trajectories are truncated at the first rejected call to construct preference pairs for DPO optimization (DPO-gate).
    • Main experimental results:
      1. On AgentDojo held-out tasks, DPO-gate reduced Qwen3-8B's violating trajectory rate from 37.2% to 10.3 ± 0.9% (mean of three seeds), and ASR from 12.4% to 0.5 ± 0.2% (Table 1).
      2. When the gate is retained at deployment, its actual intervention rate dropped from 39.2% to 8.8% (seed 0, Table 9).
      3. Gains generalize to unseen attack template tool_knowledge (violation rate 11.0%, Table 3) and to the workspace suite completely excluded from training (violation rate from 34.8% to 16.7%, Table 4).
      4. Results reproduced on Qwen3-4B-Instruct-2507, with violating trajectory rate dropping from 37.3% to 10.2% (Table 11).
    • Boundaries and ablation findings: Ablations show that compliance gains come from the policy gate's selection of negatives; simple failure negatives or attack oracle negatives cannot achieve the same compliance effect. However, in environments where task success implies compliance (as in τ2-bench), trajectory-level preferences cause the model to completely stop write operations; some compliance improvements manifest as active avoidance of guarded tools, leading to utility degradation in the travel suite.
    • Authors' conclusions and implications: The authors argue that executable policy gates can serve not only as runtime constraints but also as high-quality verifiable rewards for self-training; future work still needs to explore how to incorporate the fine-grained rule information contained in the gate into learning objectives to mitigate over-avoidance, and to explore integration with online policy optimization.

Related papers

Show 3 more papers
Read originalarxiv.org