arXiv(opens in a new tab)cs.CVAug 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2608.26872

Self-OPD: On-Policy Distillation for Flow Matching Models without Teacher

Shiyi Zhang, Mushui Liu, Yunze Tong, Wanggui He, Siyu Zou, Jinlong Liu, Yunlong Yu, Jian Song, Hao Jiang, Pipei Huang, Bo Zheng

Abstract

On-policy distillation (OPD), which leverages a pre-trained, specialized teacher model to provide dense supervisory signals, has achieved significant success in Large Language Models (LLMs) and has recently been adapted to flow matching models. However, this paradigm suffers from two major issues: First, training a separate, task-specific teacher for every new objective incurs high computational costs. Second, the discrepancy between teacher and student distributions often leads to compounding errors along the generation trajectory. In this paper, we introduce Self-OPD, a teacher-free OPD framework for flow matching models that turns the student's own self-exploration into step-wise supervision. At each timestep, Self-OPD branches the deterministic next-state prediction into KK stochastic SDE candidates, rolls them out with the ODE sampler, and compares their rewards against a deterministic self-reference baseline to obtain normalized advantages. The velocity field is optimized with an all-branch pull-push objective, where high-advantage branches attract the student and low-advantage branches repel it under direction-aware attenuation and SDE-variance normalization. For multi-objective alignment, Self-OPD fuses normalized scores at the reward level, avoiding direct gradient conflict. Experiments on single and mixed reward benchmarks show that Self-OPD outperforms prior RL and OPD methods without task-specific teachers.

Github: https://github.com/Shiy-Zhang/Self-OPD

1 Introduction

Flow Matching (FM) models [6, 19, 23], which learn a continuous velocity field that transports noise to data, have become a dominant backbone for high-quality visual generation [3, 13, 24, 25]. Despite their generative strength, aligning FM models with downstream objectives such as text rendering [4, 36], compositional correctness, and human preference remains challenging.

Existing reinforcement learning (RL) approaches [2, 7, 20, 29, 30, 40] directly optimize reward signals by treating generation as a sequential decision process. As summarized in Fig. 1(a) and illustrated in Fig. 2, these methods can be teacher-free, but they often rely on terminal scores from full denoising trajectories. Consequently, reward credit must be assigned backward through many steps, which leads to high-variance gradients and makes multi-objective alignment fragile when different rewards favor different visual properties.

On-policy distillation (OPD) provides a more stable alternative by supplying dense, step-wise supervision on the student's own trajectory. Recent OPD methods for FM or diffusion models [8, 18] regress the student velocity toward a pretrained teacher prediction at each denoising step, thereby improving training stability.

Flow-GRPOTeacher-based OPDSelf-OPD
Teacher-free✓✕✓
Per-step supv.✕✓✓
On-policy data✓✓✓
Credit assign.TerminalDenseDense
Adapts to student✓✕✓
ExplorationFull traj.TeacherLocal

Figure

(a) Comparison of alignment paradigms

(b) Single- and mixed-reward results

Figure

(c) Generated samples from a single Self-OPD model

Figure 1 Overview of Self-OPD.

and sample efficiency. Yet this teacher-dependent design introduces a different bottleneck: each new objective requires training or acquiring a specialized teacher, the student is upper-bounded by the quality and bias of that teacher, and field-level fusion of multiple teachers can create conflicting update directions [8, 18, 41]. In particular, some OPD methods handle multiple objectives by decoupling the problem into separately trained, task-specific teachers whose velocity fields are then routed and merged at the field level [18], which is fundamentally at odds with our aim of driving a single image to high reward across all objectives at once. This motivates a central question: Can we retain the dense per-step supervision of OPD while removing the need for any external teacher?

We answer this question with Self-OPD, a teacher-free on-policy distillation framework for flow matching models. The key idea is to replace teacher-provided velocity targets with reward-weighted targets discovered from the student's own local exploration. At each on-policy timestep tjt_j, Self-OPD branches the deterministic next-state prediction xtj+1,θx_{t_{j+1},\theta} into KK stochastic SDE candidates, rolls each candidate out deterministically to a clean image, and evaluates the resulting images with task rewards. In parallel, a deterministic ODE rollout from the same parent state provides a self-reference baseline, allowing terminal rewards to be converted into normalized branch advantages. Self-OPD then performs all-branch pull-push distillation: high-advantage branches pull the velocity field toward better local trajectories, while low-advantage branches push it away from poor directions. A direction-aware attenuation term stabilizes this signed objective by suppressing repulsion that would counteract the best branch, and an SDE-variance normalization yields a principled per-step alignment loss connected to reward-tilted KL minimization. This self-referenced formulation also changes how multi-objective alignment is handled. Instead of differentiating through a weighted sum of potentially conflicting objective losses, Self-OPD fuses normalized scalar scores at the reward level and uses the composite reward only to rank sampled branches. The actual regression target remains a concrete trajectory velocity sampled from the student's own neighborhood, which naturally supports black-box rewards and avoids direct gradient competition among objectives. Rather than partitioning capabilities across specialized teachers as in field-level decoupling, Self-OPD selects branches inside the joint high-reward region, so that a single image is directly optimized to score high on all rewards at once. As shown in Fig. 1, this lets a single generated image simultaneously satisfy multiple objectives—accurate text rendering, correct composition, and high aesthetic quality—rather than having different images each excel under a different reward; we return to this joint high-reward behavior in Sec. 3.4.

Figure

Figure 2 Comparison of alignment paradigms. (a) Flow-GRPO relies on trajectory-level policy gradients from terminal rewards. (b) Flow-OPD requires a pretrained teacher for step-wise MSE supervision. (c) Self-OPD (Ours) turns local stochastic branches and a self-reference baseline into dense pull-push supervision, without requiring any teacher.

Overall, our contributions are:

• We propose Self-OPD, a teacher-free on-policy distillation framework for flow matching models that converts reward-guided self-exploration and a self-reference baseline into dense step-wise supervision.

• We introduce an all-branch pull-push distillation objective with SDE-variance normalization and direction-aware attenuation, using both high- and low-advantage branches while maintaining stable optimization.

• We develop a reward-level fusion strategy for multi-objective alignment, enabling black-box composition without field-level teacher routing or gradient conflicts.

• We show empirically that Self-OPD outperforms prior RL and teacher-based OPD methods across single-reward and mixed-reward benchmarks.

References (38)