Research
Self-OPD: On-Policy Distillation for Flow Matching Models without Teacher
Overview Research area: Alignment and reinforcement-learning-style fine-tuning of flow matching (rectified-flow) image generation models in computer vision. Technical level: Advanced. The paper assume

- arXiv
- 2608.26872
- Published
- 2026-08-27
- Authors
- Shiyi Zhang, Mushui Liu, Yunze Tong, Wanggui He, Siyu Zou, Jinlong Liu, Yunlong Yu, Jian Song, Hao Jiang, Pipei Huang, Bo Zheng
AI summary
Overview
Research area: Alignment and reinforcement-learning-style fine-tuning of flow matching (rectified-flow) image generation models in computer vision.
Technical level: Advanced. The paper assumes familiarity with flow matching, reverse-time SDEs, score functions, Euler–Maruyama discretization, on-policy distillation (OPD), and group-relative policy optimization.
Scope in one sentence: Self-OPD is a teacher-free on-policy distillation framework that converts a flow matching student's own stochastic SDE branch explorations plus a deterministic self-reference baseline into dense, per-step reward supervision, and fuses multiple objectives at the reward level rather than in parameter space.
What This Paper Is About
Aligning flow matching image generators with objectives such as accurate text rendering, correct composition, and human preference is hard. Existing reinforcement learning methods (for example Flow-GRPO) are teacher-free but rely on a single terminal reward at the end of a long denoising trajectory, which produces high-variance credit assignment and fragile multi-objective training. On-policy distillation (for example Flow-OPD, DiffusionOPD) supplies dense per-step supervision instead, but needs a separate pretrained teacher for every new objective, is bounded by that teacher's quality and bias, and can suffer compounding error from teacher–student distribution mismatch. The goal of this paper is to keep OPD's dense per-step supervision while removing the external teacher entirely.
Key Contributions
- A teacher-free on-policy distillation framework (Self-OPD) for flow matching models that converts reward-guided self-exploration and a self-reference baseline into dense step-wise supervision, replacing teacher velocity targets with reward-weighted targets discovered from the student's own local neighborhood.
- An all-branch pull-push distillation objective with SDE-variance normalization and direction-aware attenuation, which uses both high-advantage and low-advantage branches instead of only the best branch, while keeping optimization stable.
- A reward-level fusion strategy for multi-objective alignment, which fuses normalized scalar scores into a composite reward used only for ranking branches, avoiding field-level teacher routing and direct gradient conflict between objectives.
- Empirical evidence on single-reward and mixed-reward benchmarks that Self-OPD outperforms prior teacher-free RL methods and teacher-based OPD methods, using one single model that stays jointly competitive across all metrics.
The code is released at https://github.com/Shiy-Zhang/Self-OPD. Affiliations are Tsinghua University, Zhejiang University, and Alibaba Group.
Main Findings
- Single-reward results (Table 1): Self-OPD's task-specialist models reach GenEval strict 0.9536 and continuous 0.9676 with the GenEval reward model, OCR 0.9745 with the OCR reward model, PickScore 24.47 with the PickScore reward model, and HPSv2 0.4099 with the HPSv2 reward model, against an unaligned SD3.5-Medium baseline of 0.5222 / 0.6219 / 0.5833 / 22.41 / 0.3004. The competing teacher-free RL baselines reach at best 0.9155 (GRPO-Guard, GenEval reward), 0.9348 (GRPO-Guard, OCR reward), 23.98 (GRPO-Guard, PickScore reward) and 0.3453 (GRPO-Guard, PickScore reward) on HPSv2.
- Reported summary versus table: the running text summarizes Self-OPD's best single-reward performance as GenEval 0.95, OCR 97.5 percent, PickScore 24.79 and HPSv2 0.3665; the corresponding Table 1 entries listed above are GenEval strict 0.9536, OCR 0.9745, PickScore 24.47 and HPSv2 0.4099.
- Mixed-reward results (Table 2): one teacher-free Self-OPD model scores GenEval strict 0.9521, continuous 0.9691, OCR 0.9597, and under the same-test-images preference protocol PickScore 23.87 and HPSv2 0.3214, versus teacher-based DiffusionOPD at 0.9150 / 0.9479 / 0.9464 / 22.72 / 0.2676, and teacher-based Flow-OPD at 0.8594 / 0.9203 / 0.9392 / 23.43 / 0.3042. Teacher-free DiffusionNFT scores 0.8888 / 0.9277 / 0.9229 / 23.67 / 0.3206.
- Prompt-family coupling differs between paradigms (Figure 4): for DiffusionOPD the preference distribution shifts by Δ = 1.23 (PickScore) and Δ = 0.105 (HPSv2) when images are generated on GenEval/OCR task prompts instead of aesthetic prompts, whereas for Self-OPD the two distributions nearly coincide, with Δ = 0.48 (PickScore) and Δ = 0.020 (HPSv2).
- Reward-level fusion is the stated explanation: field-level fusion blends per-teacher gradients in parameter space, so preference quality becomes tied to the prompt family matching the routed teacher; reward-level fusion ranks whole trajectories inside the joint high-reward region, so the same generations that satisfy the task also carry high aesthetic quality.
- Branch strategy ablation: regressing only to the top branch (Best-of-K) yields unstable, non-monotonic training that barely surpasses the baseline, attributed to high gradient variance from abrupt target switching and the absence of negative feedback; the all-branch advantage-weighted distillation stabilizes training. The provided paper content is truncated mid-sentence at this point, so the remaining ablation results are not available here.
- Qualitative results (Figure 5): on six prompts covering text rendering, spatial relations and counting, Self-OPD renders phrases such as "No Liquids Allowed" and "Google Brain Toronto" with higher fidelity than mixed-reward baselines, executes layouts such as a laptop on a teddy bear or a vase right of a horse, and satisfies counting constraints such as exactly four benches.
Methodology in Plain English
The approach starts from the observation that a flow matching model's denoising step is affine in its velocity prediction: the deterministic next state equals a state-dependent term plus a constant times the velocity. Because of this equivalence, a loss written in "transition space" can be optimized identically in "velocity space."
At each on-policy timestep the student computes one deterministic next-state prediction with a single forward pass. Instead of asking a teacher what to do, Self-OPD creates diversity cheaply: it adds independent Gaussian SDE perturbations to that shared prediction to form K candidate branches (K = 8 in the experiments, with noise level η = 0.7 as reported in the implementation details; the methodology section describes the exploration radius as set by η = 0.6). Each branch is then completed to a clean image with a deterministic ODE rollout and scored by task reward models, and a pure-ODE rollout from the same parent state provides a self-reference baseline. Branch advantages are the normalized differences between branch rewards and that baseline reward.
Training then uses all branches. Branches with positive advantage pull the velocity field toward their effective velocity; branches with negative advantage push it away, weighted by how much worse they are. A direction-aware attenuation coefficient reduces the repulsion when a bad branch points in nearly the same direction as the best branch, since otherwise the push would undo the pull. The whole per-step loss is multiplied by a prefactor derived from the SDE transition variance and the affine change of variables, which the authors show corresponds to the precision of the Gaussian transition kernel and makes the update an unbiased Monte Carlo estimate of a single per-step KL gradient toward a reward-tilted target distribution (Proposition 1). Per-step losses are summed over the trajectory with weights that emphasize early-to-mid, layout-determining timesteps.
For multiple objectives, the method fuses scores before any differentiation: each reward model's scores are z-normalized across the branch set, combined as a weighted sum, and used only to rank branches and define advantages; the regression target remains one concrete sampled velocity. The experiments use per-task weighting λ_OCR : λ_PickScore : λ_HPSv2 = 3 : 1 : 1 (with an analogous GenEval variant), keeping PickScore and HPSv2 as shared prompt-agnostic quality guards. Because an affine map preserves ordering, this composite ranking is equivalent to tilting by the summed per-objective advantages. The reward models never need to be differentiable, so black-box scorers are supported.
Training setup: SD3.5-Medium at 512×512 resolution as the base model, LoRA applied to the transformer, AdamW with learning rate 3 × 10⁻⁴, K = 8 branches, and training timesteps per step = 2. Baselines compared are SD3.5-Medium, the teacher-free RL methods Flow-GRPO, GRPO-Guard and DiffusionNFT, and the teacher-based OPD methods Flow-OPD and DiffusionOPD.
Why This Matters
The work challenges the assumption that dense per-step supervision in generative alignment requires a pretrained specialist teacher. By showing that a student's own local stochastic branches can serve as the supervision signal, it removes a major cost and a ceiling on attainable quality, and it reframes multi-objective alignment as selecting trajectories in a joint high-reward region rather than compromising between conflicting gradients in parameter space. The paper's claim that a single teacher-free model can be simultaneously strong on composition, text rendering, and preference metrics, while teacher-based field-level fusion couples preference quality to prompt family, is a concrete argument about how objectives should be combined.
Real-world applications:
- Accurate in-image text for posters, advertisements, product packaging and signage, where character-level fidelity is the whole point of the asset.
- Controllable compositional generation for design and illustration workflows that must satisfy strict spatial and counting constraints.
- Human-preference-aligned creative tools, since PickScore and HPSv2 style scorers stand in for perceived aesthetic quality and user preference.
- Black-box reward pipelines in industrial settings, where the scoring function may be proprietary, non-differentiable, or available only as an API.
Industry relevance centers on cost and composability: eliminating per-objective teacher training removes a large repeated expense, and because trade-offs are adjusted through the reward weights without retraining the model, product teams can retune the balance between accuracy and aesthetics at runtime. The method is also attractive for black-box reward models, which is how many commercial quality scorers are deployed.
Future Directions
- Scaling beyond 512×512 still images: whether the framework transfers to video generation, larger backbones, and other modalities is not established in the reported content.
- Sensitivity to the exploration hyperparameters: the paper uses K = 8 branches and reports different noise-level values in different sections (η = 0.7 in implementation details, η = 0.6 for the exploration radius in the methodology), so a systematic study of branch count, exploration radius and the timestep weighting α_j is a natural next step.
- Completing and extending the ablation study: the provided content truncates the branch-selection ablation, and the direction-aware attenuation coefficient, the per-scorer veto, and the reward weights each merit their own analysis.
- Robustness to reward hacking and theoretical guarantees: the paper notes the danger of reward hacking and guards against it with prompt-agnostic quality scorers; whether the composite-tilt interpretation extends to richer guarantees on the joint optimum, and how it behaves when many conflicting objectives are combined, remain open.
Target Audience
Researchers and engineers working on generative model alignment, particularly those applying reinforcement learning or distillation to diffusion and flow matching image models; practitioners who need multi-objective control (text accuracy, composition, aesthetics) without training or maintaining specialist teacher models; and readers interested in KL-based interpretations of on-policy distillation objectives and in reward-level rather than gradient-level methods for combining objectives.
Authors’ 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 \textbf{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 $K$ 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.