Command Palette
Search for a command to run...
RETHINKING CLASSIFIER-FREE GUIDANCE IN ON-POLICY DIFFUSION DISTILLATION
RETHINKING CLASSIFIER-FREE GUIDANCE IN ON-POLICY DIFFUSION DISTILLATION
Bingnan Li Haozhe Wang Haozhong Xiong Fangtai Wu Jinpeng Yu Yang Shi Jiaming Liu Ruihua Huang
Abstract
On-policy distillation (OPD) adapts diffusion models by querying a teacher along trajectories generated by the current student, but how it should behave under classifier-free guidance (CFG), a default component of modern diffusion systems, remains poorly understood. Existing OPD methods naturally extend velocity matching to the CFG-composed prediction, directly matching teacher and student guided velocities. We show that this objective is under-identified at the branch level: positiveand negative-branch errors can compensate in the guided prediction. Through two contrasting cases, we find that naive matching remains effective under shared negative conditioning, where both branch errors decrease jointly. When the model’s native CFG schema retains privileged information in the teacher’s negative branch that is unavailable to the student, however, this joint reduction breaks down and the composed objective induces antagonistic brancherror dynamics, reducing the positive-branch error while increasing the negativebranch error. We term this failure mode Negative Branch Asymmetry (NBA). To address NBA, we introduce Positive–Direction Matching (PDM), a branch-aware OPD objective that separately constrains the positive prediction and the CFG conditional direction. We apply PDM to dense-to-sparse video control, where naive guided matching is highly sensitive to inference guidance scales, while branchaware supervision enables more robust and effective knowledge transfer.
One-sentence Summary
Alibaba's Qwen Business Unit introduces Positive-Direction Matching (PDM), a branch-aware on-policy distillation objective that separately constrains the positive prediction and the classifier-free guidance conditional direction to resolve Negative Branch Asymmetry and enable robust knowledge transfer for dense-to-sparse video control.
Key Contributions
- Negative Branch Asymmetry (NBA) is identified as a failure mode in on-policy distillation with classifier-free guidance, where privileged information in the teacher's negative branch prevents joint reduction of branch errors and induces antagonistic dynamics.
- Positive–Direction Matching (PDM) is introduced as a branch-aware objective that separately supervises the positive prediction and CFG conditional direction, eliminating cross-branch error compensation.
- Dense-to-sparse video control experiments show that PDM improves knowledge transfer and robustness across inference guidance scales, while image-domain studies confirm the conditions under which NBA emerges.
Introduction
Classifier-free guidance (CFG) is essential to modern diffusion models, yet standard on-policy distillation (OPD) may match only the teacher’s guided velocity, a composition of positive- and negative-branch predictions. This composed objective is under-identified: it constrains a linear combination of branch errors, leaving the individual errors free to compensate. Prior work either internalizes CFG into a single student prediction or shares negative conditioning between teacher and student, avoiding the issue. The authors reveal that when the teacher’s negative branch has privileged information unavailable to the student, this ambiguity causes antagonistic branch-error dynamics, a failure mode they call Negative Branch Asymmetry (NBA). The resulting student becomes sensitive to changes in the inference guidance scale. To address this, they introduce Positive–Direction Matching (PDM), which separately supervises the positive prediction and the CFG conditional direction, eliminating cross-branch error compensation and improving robustness across guidance scales, as demonstrated in dense-to-sparse video control tasks.
Method
The authors adopt an on-policy distillation (OPD) framework for diffusion models, where a student model is trained on noisy states drawn from its own iterative denoising process. Let xtS∼pθ denote such a state. At each visited state, the teacher and student each define a local denoising step conditioned on possibly different information cT and cS, because the teacher may have access to privileged signals that are only partially available to the student. The core OPD objective minimizes the discrepancy between the teacher’s and student’s velocity predictions at states the student encounters, leading to the transition-level loss
LOPD=ExtS∼pθ,t[w(t)vT(xtS,t,cT)−vS(xtS,t,cS)22],where vT and vS are the respective velocity predictions and w(t) absorbs solver-dependent and parameterization-specific weighting.
When the teacher and student use classifier-free guidance (CFG) with scale γ>1, the denoising velocity becomes a linear combination of positive- and negative-branch predictions:
v=γv++(1−γ)v−.The negative branch often differs between teacher and student when privileged information is present, for instance when reference images or control signals are available only to the teacher. In such cases, naively matching the CFG-composed velocities,
Lnaive=ExtS∼pθ,t[w(t)∥γe++(1−γ)e−∥22],with e+=vT+−vS+ and e−=vT−−vS−, introduces a compensation problem. The loss only requires γe++(1−γ)e−=0, which permits non-zero branch errors that cancel in the guided output. This branch ambiguity becomes a failure mode—termed Negative Branch Asymmetry (NBA)—when privileged negative conditioning leads to antagonistic dynamics that reduce ∥e+∥ while increasing ∥e−∥, thereby hurting performance when the guidance scale is changed at inference.
To eliminate this cross-branch compensation, the authors propose branch-aware OPD objectives that supervise the predictions before CFG composition. The primary formulation, Positive–Direction Matching (PDM), separately matches the positive branch and the conditional direction dM=vM+−vM−:
ℓPDM=∥e+∥22+λ∥dT−dS∥22=∥e+∥22+λ∥e+−e−∥22,where λ>0 controls the direction-matching strength. The first term anchors the positive prediction, while the second preserves the CFG conditional direction, forcing both e+ and e− toward zero and removing the compensation freedom. As a baseline, Independent Branch Matching (IBM) directly matches the two branches with per-branch weights derived from the expanded naive loss but without the cross-term:
ℓIBM=γ2∥e+∥22+(γ−1)2∥e−∥22.Both PDM and IBM prohibit the ambiguous solution, but PDM is designed to preserve the conditional direction explicitly, while IBM enforces branch-level alignment through independent terms.
For computationally expensive dense-to-sparse video distillation, the authors introduce an efficient supervision strategy that reduces teacher evaluations. In a full denoising trajectory with states {xtkS}k=0N−1 visited by the student, only the first K states receive teacher supervision:
LOPD(K)=E{xtkS}∼pθ[K1k=0∑K−1w(tk)ℓ(xtkS,tk)].The student still completes the full denoising rollout, but the teacher loss is computed only for these early states, substantially lowering the training cost while maintaining output quality. Setting K=N recovers full-trajectory supervision; smaller K reduces per-iteration compute. This partial supervision is applied solely to the dense-to-sparse video setting, whereas image-domain experiments follow their standard full-trajectory protocols.
Experiment
The evaluation first diagnoses negative branch ambiguity (NBA) by comparing text-rendering distillation (shared negative conditioning) with reference-conditioned distillation (privileged conditioning), revealing that NBA leads to antagonistic branch errors and excess guidance sensitivity that branch-aware on-policy distillation (PDM) resolves. Applied to dense-to-sparse video control, PDM consistently improves pose, depth, and scribble control fidelity across guidance scales, outperforming naive matching and other baselines. Ablations validate the default direction-matching weight and a moderate supervision horizon.
In text-rendering distillation, the teacher, naive student, and PDM student produce very similar OCR reward curves across guidance scales, with all showing a notable drop at γ=1 and comparable gains as guidance increases. The performance loss in the absence of classifier-free guidance is inherited from the teacher rather than introduced by naive distillation. The teacher and both student models exhibit nearly identical trends, with OCR reward rising from around 74–75 at γ=1 to about 94 at higher guidance scales. The reduced performance at γ=1 reflects the teacher's intrinsic reliance on CFG, not an extra sensitivity caused by naive distillation.
Branch-aware on-policy distillation substantially improves dense-to-sparse video control over naive matching, SFT, and off-policy baselines. PDM provides the most consistent control-fidelity gains across pose, depth, and scribble modalities, while IBM also outperforms naive matching on nearly all metrics. In the pose-specific evaluation, IBM achieves the best spatial accuracy and distributional quality among the Student-derived methods. PDM yields the most consistent control-fidelity improvements across pose, depth, and scribble modalities at the training guidance scale. IBM outperforms naive OPD on most control metrics, confirming that preventing cross-branch error compensation strengthens fidelity. On pose control, OPD (IBM) attains the lowest MPJPE, the highest PCK scores, and the best FID, indicating superior pose accuracy and image quality relative to other non-teacher methods.
When inference guidance scale deviates from the training value of 5, naive matching suffers severe drops in pose control and video quality, while branch-aware methods IBM and PDM stay robust. IBM maintains low keypoint errors and high visual fidelity across all tested scales, and PDM provides the most consistent control fidelity. Naive matching: MPJPE more than doubles and FVD jumps to 507.7 when inference guidance drops to 1, exposing extreme sensitivity to off-training guidance scales. IBM: keypoint MPJPE remains below 5.0 and FVD stays under 72 at all scales, confirming that branch-aware supervision eliminates the sharp degradation seen in naive matching.
Setting the direction-matching weight λ to 1 yields the best control fidelity, with the lowest keyframe MPJPE and highest [email protected] among all tested values. Higher λ values (5 and 10) produce modestly better distribution quality (lower FID and FVD) but consistently degrade keypoint accuracy and percentage of correct keypoints. The positive-only variant (λ=0) performs slightly worse than λ=1 on keyframe metrics, confirming the benefit of including conditional-direction matching. Keyframe MPJPE drops from 2.81 at λ=0 to 2.75 at λ=1, then rises steadily as λ increases, reaching 3.07 at λ=10. [email protected] on keyframes peaks at 91.66 for λ=1 and declines to 89.93 for λ=10, showing that larger λ weakens precise alignment. FID improves from 13.97 (λ=0) to 12.96 (λ=10), and FVD reaches its minimum of 56.85 at λ=5, indicating that higher λ enhances overall distribution realism. Using λ=1 obtains the best compound trade-off, improving keyframe accuracy over λ=0 while maintaining competitive quality metrics compared to larger λ.
Increasing the supervision horizon from one to eight steps progressively improves keyframe control fidelity, with K=8 achieving the lowest keypoint pose error and highest PCK scores. Extending to full-trajectory supervision drastically raises training cost to 790 seconds per step while worsening control accuracy, making K=8 the most practical and effective setting. K=8 yields the strongest control fidelity, attaining the best keypoint MPJPE and [email protected] among all evaluated horizons. Full-trajectory supervision (K=50) degrades keypoint accuracy below even K=1 while incurring a 34-fold increase in per-step training time. Training time grows steadily from 23 to 132 seconds per step from K=1 to K=8, then jumps sharply to 790 seconds at K=50.
Distillation experiments for text-rendering and dense-to-sparse video control reveal that naive on-policy distillation inherits the teacher's classifier-free guidance dependence without introducing additional sensitivity. Branch-aware methods (IBM and PDM) provide robust control fidelity across inference guidance scales and prevent cross-branch error, with PDM achieving the most consistent improvements over baselines. Hyperparameter ablations establish that a direction-matching weight of 1 and an 8-step supervision horizon offer the best trade-off between spatial accuracy, image quality, and training efficiency.