Skip to content

DUET: Dual-Teacher Online Policy Distillation Based on Equal-Weight Divergence for Prohibition ComplianceDUET: Dual-Teacher On-Policy Distillation via Same-Weight Disagreement for Prohibition Compliance

arXiv· arXiv:2608.14644· Zihan Li, Feifei Li, Wenhui QueWeChat, Tencent Inc.Indexed by this site · 25 days ago· Originally publishedAlignment

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose DUET: token-level selective distillation using a pair of same-weight teachers differing only in prohibition visibility, achieving Viol. of 72.3–85.2% on a self-built prohibition compliance benchmark.

Questions
In actual deployment, prohibitions are injected per request in the form of a system prompt; SFT and DPO struggle to handle token-level local violations, and the authors formalize this as the Prohibition Compliance problem.
Methods
DUET uses a pair of same-weight teachers differing only in prohibition visibility, whose per-token divergence is used to select violation tokens and define push/pull directions, embedding DPO-style preference optimization into online distillation, plus an additional utility-retention term.
Experiments and results
On the self-built five-category prohibition benchmark, DUET achieves Viol. 72.3–85.2% and Util. 88–93%, outperforming baselines such as OPD, AlignDistil, and TIP; on SysBench, CSR/ISR improve, and no obvious decline is seen on GSM8K and MATH-500.
Limitations and future work
The paper does not specifically discuss limitations. The experiments cover only Qwen2.5/Qwen3 at 1.5B–8B and the LoRA r=16 setting; evaluation relies on a DeepSeek-V4-Flash judge, and the paper does not report the agreement between the judge and human scoring.
Experimental setupQwen2.5-1.5B、Qwen3-1.7B et al. · Prohibition-Compliance benchmark、SysBench et al. · Viol.、Util. et al.
Evaluated models
Qwen2.5-1.5BQwen3-1.7BQwen3-8B
Benchmarks
Prohibition-Compliance benchmarkSysBenchGSM8KMATH-500
Metrics
Viol.Util.Over.Hum.CSRISRaccuracy
AI summaryResearchers propose an online policy distillation method for prohibition compliance, DUET: the token-by-token divergence between two equally weighted teachers for visible and invisible prohibitions is used to separate the causal effect of prohibitions. On a self-built industrial prohibition compliance benchmark, 1.5B-8B Qwen variants achieve 72.3-85.2% compliance rates while retaining 88-93% normal utility; external evaluation on SysBench shows improved safety alignment, with minimal degradation on GSM8K and MATH-500.

Researchers propose an online policy distillation method for prohibition compliance, DUET: the token-by-token divergence between two equally weighted teachers for visible and invisible prohibitions is used to separate the causal effect of prohibitions. On a self-built industrial prohibition compliance benchmark, 1.5B-8B Qwen variants achieve 72.3-85.2% compliance rates while retaining 88-93% normal utility; external evaluation on SysBench shows improved safety alignment, with minimal degradation on GSM8K and MATH-500.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors formalize following prohibitions injected at runtime as Prohibition Compliance, and state that SFT/DPO/ordinary OPD are structurally unsuited to it.

    Core problem: how to make an LLM follow prohibitions injected at runtime via the system prompt that vary per request and per tenant (enterprise SOPs, PII red lines, tool boundaries), while retaining normal answering ability when no prohibition is present.

    • Problem setting: the authors state that real deployments increasingly rely on runtime-injected prohibitions, and that violations incur industrial costs such as leaking user data, unauthorized tool calls, and brand-safety incidents; the same set of weights must still answer normally when prohibitions change or are absent.
    • Three structural features: the authors characterize Prohibition Compliance as (i) runtime configurability—prohibitions live in the prompt rather than the weights; (ii) violation locality—only a few tokens in a long response cross the line; (iii) joint compliance-utility requirement—over-refusing legitimate queries within the same business scenario is itself a failure.
    • Shortcomings of existing methods (authors' view): SFT and RLHF use compliant responses as labels, and the violation signal has no channel into the loss; offline DPO's sequence-level chosen/rejected labels are misaligned with token-level violations, polluting neutral positions and diluting corrections at the actual violation, and preference-data construction is costly.
    • Two criticisms of vanilla OPD: first, teacher logits are conditioned on the student's (possibly already violating) prefix, so student drift drags down teacher supervision, with no online mechanism to detect it; second, per-sequence token-averaged loss wastes supervision on neutral tokens and dilutes key tokens, while token selection based on teacher-student divergence (e.g., TIP) conflates the violation signal with inherent teacher-student distribution mismatch.
    • Proposed in the paper: DUET (dual-teacher token-selective online distillation)—a pair of same-weight teachers differing only in prohibition visibility, whose per-token divergence drives violation-token selection and preference-direction learning; and an industrial Prohibition-Compliance benchmark covering five task families.
  2. What related research exists?

    Related work falls into two categories: online distillation methods and constraint-following benchmarks; the authors state that DUET's selection signal and the benchmark's joint evaluation are both lacking in prior work.

    Online knowledge distillation (OPD)

    • GKD (Agarwal et al. 2024): trains on student rollouts with teacher feedback, using divergences other than forward KL; MiniLLM (Gu et al. 2024) uses reverse KL to avoid over-weighting the teacher's low-probability tail; DistiLLM (Ko et al. 2024) interpolates between the two divergences with an adaptive on-policy ratio.
    • DistiLLM-2 (Ko et al. 2025): constructs teacher-student responses into preference pairs; AlignDistil (Zhang et al. 2025): synthesizes token-adaptive target distributions from two inversely trained preference models.
    • TIP (Xu et al. 2026): performs selective supervision by high-entropy tokens; SCOPE (Zheng et al. 2026): correctness-routed rollouts plus dual-path adaptive weighting; RCSD (Gu et al. 2026): cross-condition distillation with a conditional teacher (the same base model with/without a scoring rubric).
    • The paper points out: existing OPD neither dynamically monitors potentially erroneous signals in teacher feedback nor separates task-relevant error-prone positions from inherent teacher-student distribution mismatch; the authors state that using divergence between same-weight positive and negative teachers as a selection criterion is absent from prior work.

    Constraint-following benchmarks

    • IFEval (Zhou et al. 2023), FollowBench (Jiang et al. 2024), FoFo (Xia et al. 2024): target verifiable soft instructions, focusing on structural or stylistic requirements; the paper points out that outright prohibitions are rare in them.
    • SORRY-Bench (Xie et al. 2025), CoCoNot (Brahman et al. 2024): target refusal behavior under harmful or under-specified queries; the paper points out that they lack benign control samples within the same business scenario.
    • SysBench (Qin et al. 2025), SpecEval (Ahmed et al. 2025): closest to this paper's setting; the paper points out that they either lack the domain-specific confidentiality prohibitions common in industrial deployment, or audit provider-level rather than user-level dynamic rules; MT-Bench-101 (Bai et al. 2024) serves only as a general utility reference.

    Baselines and benchmarks: the distillation baselines compared in the experiments are OPD-F/OPD-R (Gu et al. 2024; Agarwal et al. 2024), AlignDistil, and TIP, with Student and Teacher (with/without thinking prefix) as additional references; evaluation uses the self-built Prohibition-Compliance benchmark and the public SysBench, and general capability uses GSM8K and MATH-500.

    Positioning: the authors state that this paper's benchmark jointly measures explicit-violation refusal, paraphrase robustness, and over-refusal within the same business scenario, filling the gap that prior benchmarks did not jointly evaluate compliance and utility retention in industrial hard-constraint scenarios.

  3. How does the paper address this problem?

    DUET uses the token-by-token disagreement between positive/negative teachers with the same weights to do two things: filter out agreeing positions, and embed token-level DPO-style push-pull into OPD at disagreeing positions.

    Overall approach: DUET (DUal-tEacher Token-selective OPD) has a pair of teachers T+ / T− that share weights and differ only in whether a prohibition is present in the system prompt; they forward token by token on student rollouts, and their divergence can only be caused by the prohibition, on which basis violation-token selection and preference-direction learning are performed (Figure 2).

    Model and prompt setup

    • T+ prompt: system_role + context + prohibition + user_query + assistant thinking prefix; T− prompt: removes the prohibition and prefix; student rollout prompt is the same as T+ but without the prefix.
    • The thinking prefix is a fixed short message appended to the T+ prompt; the authors state it is used to strengthen T+'s prohibition following and to balance teacher behavior in both violation and legitimate cases.
    • The three logits tensors are aligned along the response segment; the valid token set M excludes prompt and padding; at each position, the top-KV indices of zT+ and zT− are each taken and their union formed, with unselected coordinates set to −10^4 to shrink the vocabulary.

    Violation-Token Selection (signal cleaning)

    • Discarding consistent positions: the authors give two reasons—when p+ and p− are nearly identical, the position carries no prohibition-related information (redundant supervision); or T+ is dragged toward T− by the student's erroneous prefix, producing spurious consistency (misleading supervision), which is precisely the failure mode of vanilla OPD.
    • Three-level filter: (1) compute each position's divergence by symmetric KL, db,t=1/2[KL(p+|p−)+KL(p−|p+)]; (2) keep the Kb = ⌈0.1·|Mb|⌉ positions with the largest divergence per sequence, preventing long sequences from dominating and short sequences from starving; (3) apply 1-D max-pool dilation with kernel 5 along the sequence axis (±2 neighborhood) to capture neighboring tokens of sub-word clusters missed by top-K.

    Preference-Directed Learning (preference-direction learning)

    • Pull toward T+: ℒpos performs forward KD with p+ as target on the selected high-divergence set V*.
    • Push away from T−: ℒneg uses the divergence mass ∆b,t(u) = (p− − p+)+ as a soft suppression target, lowering candidates that T− prefers more than T+.
    • Synthesizing a purer target: because T+ may retain contamination in the T− direction, extrapolate along the divergence direction zadj = clip(zT+ − γsyn(zT− − zT+), ±C), then perform forward KD on its softmax to obtain Lsyn; the authors state that the two teacher losses set the coarse direction and the synthetic loss refines along the same preference axis.
    • Utility retention: Lutil performs KD on T+'s top-Ktk truncated renormalized distribution on legitimate queries, does not invoke T− and does not enter V* selection, and is used to prevent over-refusal in the same scenario.
    • Total loss: L = λpos·Lpos + λneg·Lneg + λsyn·Lsyn + λutil·Lutil; the authors state that the first three terms implement token-granularity DPO-style optimization on V*, without offline preference data.

    Benchmark construction and evaluation

    • Five task families: T1 PII/memory, T2 safety red lines (including jailbreak paraphrases), T3 custom business content, T4 tool-definition leakage, T5 business processes and SOPs.
    • Three sample buckets: induction (naturally elicits violations when no prohibition is present), boundary (induction rewritten by an LLM into a surface-sanitized form that still has leakage potential, preventing keyword shortcuts), normal (legitimate queries in the same scenario); the three buckets share system_role and context and differ only in user_query.
    • Construction pipeline: corpus loading→scenario-rule mapping→induction synthesis→boundary rewriting→normal synthesis, with all LLM components using Qwen3-235B-A22B; the training set is about 2,500 items (induction+boundary about 75%), the evaluation set 700 items (induction+boundary 600, of which 200 prohibitions are drawn from a new pool outside the training constraint pool; normal 100); the manual spot-check pass rate is 98.4%.
    • Evaluation: LLM-as-a-judge; induction/boundary use a violation judge (outputs T/F), normal uses a non-refusal judge; the appendix gives all prompts and details.
  4. What experiments did the paper conduct?

    On the self-built benchmark, DUET achieves Viol. 72.3–85.2% and Util. 88–93%, outperforming OPD/AlignDistil/TIP; SysBench and the math benchmarks show generalization and capability retention.

    Experimental Setup

    • Distillation configurations: Qwen2.5-7B → Qwen2.5-1.5B; Qwen3-8B → Qwen3-1.7B; Qwen3-8B → Qwen3-8B (self-distillation).
    • Baselines: Student (original student), Teacher (with/without thinking prefix, for reference only and not included in ranking), OPD-F/OPD-R, AlignDistil, TIP.
    • Metrics: Viol. (violation refusal rate in the induction+boundary buckets), Util. (legitimate utility rate in the normal bucket), Over. (overall accuracy on the full set), Hum. (human scoring on 30% of data randomly sampled stratified by class).
    • Evaluation method: LLM-as-a-judge uniformly uses DeepSeek-V4-Flash; significance uses the McNemar paired test with Holm–Bonferroni correction.
    • Training setup: LoRA r=16 applied to all attention and MLP projection matrices; single machine with 8×NVIDIA H20 (2 GPUs for rollout, 6 for training); full training of Qwen2.5-1.5B and Qwen3-1.7B took 0.5 and 1.0 hours respectively, which the authors state is about 75% of the training time of the fastest baseline, TIP.
    • External evaluation: SysBench (500 system prompts, six categories of constraints, metrics CSR/ISR, without using its training data); GSM8K and MATH-500 converted to multiple-choice format by extracting options and reporting accuracy.

    Main Results

    According to Table 1 (Viol./Util./Over./Hum., %):

    Swipe horizontally to read the table

    MethodQwen2.5 Viol.Qwen2.5 Util.Qwen2.5 Over.Qwen3-1.7B Viol.Qwen3-1.7B Util.Qwen3-1.7B Over.
    Teacher†59.389.063.680.246.075.3
    Student41.579.046.946.886.052.4
    OPD-F51.087.056.181.384.081.7
    OPD-R54.891.060.081.088.082.0
    AlignDistil43.586.049.655.571.057.7
    TIP54.592.059.980.090.081.4
    DUET72.393.075.383.888.084.4

    DUET-8B from Qwen3-8B self-distillation: Viol. 85.2, Util. 91.0, Over. 86.0, Hum. 88.1 (Table 1). The authors state that DUET's improvements over all baselines are statistically significant under the McNemar test with Holm–Bonferroni correction.

    • The teacher itself is imbalanced: the authors report that the original teacher's Viol. is far lower than its Util. (Qwen2.5: 43.8% vs. 95.0%), and that after adding the thinking prefix, Qwen3's Util. drops from 86% to 46%; on this basis the authors argue that prompt-side constraints cannot balance compliance and utility.
    • Shortcomings of single-teacher OPD: OPD-F/OPD-R's Viol. is at least 17 percentage points lower than DUET's (Qwen2.5: 51.0/54.8 vs. 72.3), which the authors attribute to a single teacher being unable to detect online the positions contaminated by the student prefix, and to full-token average loss diluting key supervision.
    • Gains vary with setting: DUET's lead on Qwen2.5 is larger than on Qwen3; the authors' explanation is that the Qwen2.5 teacher is "dirtier" (Viol. only 59.3%) and that Qwen2.5-7B and 1.5B have different vocabularies, so the teacher-student distribution mismatch is larger, whereas Qwen3-8B and 1.7B share a vocabulary and the mismatch is naturally smaller.

    SysBench External Evaluation

    • What was tested: the Qwen2.5-1.5B model trained in §6.2 was evaluated directly on SysBench, and the training data contained no SysBench-style system prompts.
    • Results: DUET's CSR is 34.4 and ISR 15.2; the baselines' CSR is 31.0–33.2 and ISR 12.6–14.5, and the Teacher upper bound is CSR 62.5 and ISR 39.4 (Table 2); the differences between DUET and the baselines are marked as p < 0.05 to p < 0.001.
    • Authors' interpretation: the alignment signal separated out by T+/T− disagreement is a task-agnostic general prohibition alignment capability, rather than memorization of a particular constraint template.

    General Capability Retention

    • What was tested: the accuracy of the Qwen2.5-1.5B distilled model on GSM8K and MATH-500; training did not include data from these two benchmarks.
    • Results: GSM8K 68.3, MATH-500 52.2, which the authors state shows no significant degradation; on MATH-500 by subject, Algebra and Prealgebra are unchanged, Geometry and Precalculus improved slightly, and the residual gap is concentrated in Number Theory and Counting & Probability, which the authors state are the Student's original weak areas and within the acceptable fluctuation range of LoRA training capability.

    Ablation (Table 3, Qwen2.5-7B→1.5B)

    • teacher sample (off-policy): Over. drops from 75.3 to 62.9; the authors state that on-policy is a necessary precondition for prohibition alignment.
    • single teacher: Viol. 58.8, the lowest among the ablations; full token (full-token supervision): Viol. 66.0.
    • w/o Lsyn: Viol. drops from 72.3 to 63.7, the largest Viol. drop among all ablations; w/o Lpos: Over. drops 5.7 points; w/o Lneg: Viol. drops to 67.0.
    • w/o Lutil: Util. drops from 93.0 to 62.0, the largest utility drop among all ablations; the authors state that each of the four losses corresponds to an objective and that removing any one causes a drop, verifying the orthogonality of the design.
  5. What are some points that can be further explored?

    The paper does not specifically discuss limitations; the experiments cover two Qwen families at 1.5B–8B, the LoRA setting, and a single LLM judge.

    Limitations and future directions noted by the authors

    The paper does not include a Limitations or Future Work section, and neither the main text nor the conclusion explicitly states "this is a limitation / this could be done in the future." The only statements related to shortcomings are: §6.2 points out that the thinking prefix is only a stop-gap ("only a stop-gap"), that prompt-side constraints cannot jointly achieve compliance and utility, and that prohibition alignment must be accomplished in the weights—this is the authors' argument for the method's motivation, not a discussion of DUET's own limitations.

    Experimental coverage

    • Models tested: Qwen2.5-7B→Qwen2.5-1.5B, Qwen3-8B→Qwen3-1.7B, Qwen3-8B→Qwen3-8B self-distillation, three configurations in total across two model families (§6.1).
    • Training method: all LoRA r=16, applied to attention and MLP projection matrices; the paper does not report results for full-parameter fine-tuning (§6.1).
    • Evaluation benchmarks: the self-built Prohibition-Compliance benchmark (evaluation set of 700 items), SysBench (500 items), GSM8K, MATH-500; general capability is measured only on these two math benchmarks (§6.3, §6.4).
    • Judging method: automated evaluation uniformly uses DeepSeek-V4-Flash as judge; human scores Hum. are taken from a stratified sample of a random 30% of each category, and the paper does not report agreement between judge outputs and human scores (§5.4, Table 1).
    • Hyperparameter reporting: the paper gives the per-sequence top-K ratio 0.1, max-pool kernel 5, LoRA r=16, etc., but does not report the specific values of λpos/λneg/λsyn/λutil, γsyn, C, KV, Ktk (§4).
  6. Summarize the main content of the paper

    DUET uses token-level divergence from same-weight dual teachers to perform both signal cleaning and preference learning simultaneously, outperforming distillation baselines on prohibition compliance and utility retention.

    An alignment methods paper aimed at industrial deployment: the authors formalize "prohibition following injected at runtime via system prompt and varying per request" as Prohibition Compliance, whose difficulties are that the prohibition is in the prompt, violations occur only on a few tokens, and over-refusal in the same scenario also counts as failure.

    • Problem to solve: the authors state that SFT/RLHF leave no place for the violation signal to enter the loss, offline DPO's sequence-level labels are misaligned with token-level violations, and vanilla OPD has two structural gaps: the teacher is dragged off by the student prefix, and full-token average loss dilutes key supervision.
    • Method highlights: DUET uses a pair of teachers T+/T− that share weights and differ only in prohibition visibility, so their token-by-token disagreement can only be caused by the prohibition; agreeing positions are discarded as redundant or misleading supervision (symmetric KL + within-sequence top 10% + max-pool dilation filtering), and at disagreeing positions the student is pulled toward T+ and pushed away from T−, with extrapolation along the disagreement direction to synthesize a purer target, plus top-K KD on legitimate queries to preserve utility—equivalent to embedding DPO-style preference optimization into OPD at token granularity, without offline preference data.
    • Benchmark: a self-built industrial Prohibition-Compliance benchmark with five task families (PII/memorization, safety red lines, business content, tool definitions, SOP), with induction/boundary/normal buckets measuring violation refusal, paraphrase robustness, and over-refusal respectively; the evaluation set has 700 items, with a manual spot-check pass rate of 98.4%.
    • Main results: on Qwen2.5-7B→1.5B, Viol. 72.3%, Util. 93.0% (best baseline OPD-R is 54.8%/91.0%); Qwen3-8B self-distillation Viol. 85.2%, Util. 91.0% (Table 1); on SysBench, CSR 34.4, ISR 15.2, higher than the baselines (Table 2); GSM8K 68.3, MATH-500 52.2, which the authors state shows no significant degradation in general capability.
    • Authors' conclusion: the same mechanism (disagreement of a same-weight negative teacher) simultaneously cleans misleading supervision and defines the push-pull direction; ablations show that removing Lsyn drops Viol. from 72.3 to 63.7 and removing Lutil drops Util. from 93.0 to 62.0, and the authors state that the four losses are orthogonal and each necessary; training time is about 75% of the fastest baseline TIP.
Read originalarxiv.org