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

Manuscript Offprint

arXiv:2608.14430

Designing Reinforcement Learning for Diffusion Models: A Unified Path-Space View

Yixian Xu, Yuanrui Zhang, Shengjie Luo, Liwei Wang, Di He

Abstract

Reinforcement learning (RL) post-training provides a direct way to align diffusion models with human preferences and task-specific rewards. However, current RL algorithms for diffusion models remain fragmented: reverse-trajectory methods rely on discretized likelihood ratios, whereas forward-matching methods train on reward-labeled noising versions of the rollout samples. This paper shows that these seemingly different losses arise from a single path-space principle. Starting from the regularized diffusion-RL objective, we use importance sampling between sampling SDEs to obtain an explicit policy-gradient estimator on trajectory space. The estimator contains the stochastic Itô integral underlying Flow-GRPO-type updates; we derive an equivalent variance-reduced value-gradient form that recovers the forward-matching structure of AWM and DiffusionNFT. This identifies the empirical gap between these method families as a variance-reduction effect rather than a difference in RL principle. The derivation yields a unified design space organized by value-gradient estimation, weight functions, and sampling choices. Within this space, we propose a multi-sample KDE value-gradient estimator that reuses rollout groups, together with scale-bounded weight families that retain stable existing recipes while excluding singular ones. Experiments on SD3.5-M and Qwen-Image models validate the variance-reduction explanation and show that the resulting recipe improves over prior diffusion-RL baselines. The code is available at https://github.com/xyx050/DesigningDiffusionRL.git.

1 Introduction

Diffusion and flow models have become the backbone of modern visual generation, powering high-quality image, video, and 3D synthesis [15, 34, 23, 25, 11]. The pretrained generator is optimized for distributional alignment via score matching, but not for the downstream preferences that users ultimately care about, including human aesthetic preference, compositional correctness, text rendering, or task-specific verifiability. Reinforcement learning (RL) post-training is therefore a natural next step that treats the generator as a policy and directly optimizes rewards evaluated on generated samples, including black-box or non-differentiable rewards that are hard to express as supervised losses.

This promise has led to a rapidly growing family of diffusion-RL algorithms. Starting from the raw objective of maximizing reward under the sampling policy with a reference regularizer, the central obstacle is that diffusion models do not provide the convenient policy likelihood ratios that PPO-style RL [32] relies on. Different practical routes around this obstacle have been proposed: some discretize the reverse-sampling SDE so that each denoising step has a Gaussian transition ratio [5, 24, 37]; others avoid reverse-time likelihoods and instead build supervised flow-matching losses from reward-labeled clean samples and their forward-noised versions [40, 45]. These routes produce loss functions that look structurally unrelated, and the community currently lacks a unified view for understanding existing recipes or designing principled diffusion-RL algorithms beyond combinations of heuristics.

Our first step is to expose the common continuous-time structure beneath these routes. Although a single diffusion path measure has no elementary likelihood, ratios between path measures generated by stochastic differential equations (SDEs) with the same diffusion coefficient have explicit form [2, 29]. Applying this path-space importance sampling to the raw diffusion-RL objective yields a tractable estimator under a proposal path measure. Its policy gradient term contains a stochastic Itô integral that corresponds to the noise exploration signal used by reverse-sampling-based GRPO methods [24]. We prove that this term has an equivalent deterministic value-gradient representation. This variance-reduced representation is the bridge from Flow-GRPO-style stochastic estimators to forward-matching methods: the large empirical gap between Flow-GRPO and DiffusionNFT/AWM is explained as a variance reduction effect rather than as a fundamentally different RL principle.

The variance-reduced form also reveals the design space. Its only unspecified component is how to estimate the value gradient ∇xtVt\nabla_{\mathbf{x}_{t}}V_{t} on sampled trajectories, together with how to weight the resulting policy gradient and quadratic regularization terms across time. A Bayes rule expression for ∇xtVt\nabla_{\mathbf{x}_{t}}V_{t} yields a deterministic one-sample estimator that recovers AWM and DiffusionNFT under their forward noising proposal, while the Brownian increment estimator recovers Flow-GRPO-type methods under reverse SDE rollouts. Lifting these choices to free parameters gives a unified template whose concrete entries specify the proposal dynamics, the value gradient estimator, the off-policy weight w^1\hat{w}_{1}, the on-policy weight w^2\hat{w}_{2}, and the sampler. These entries are organized into three axes: value gradient estimation, weight functions, and sampling. Under this template, previously separate algorithms become a specification of each entry in the same design space rather than separate design principles.

Finally, the framework turns this taxonomy into concrete design guidance. Along the estimator axis, we observe that existing methods all use one-sample estimators of ∇xtVt\nabla_{\mathbf{x}_{t}}V_{t}; we introduce a multi-sample KDE estimator that reuses the rollout group already collected for GRPO-style advantages and reduces conditional variance without additional sampling. Along the weight axis, we identify a scale-bounded principle: the effective per-step update w^2(t)∇V^t\hat{w}_{2}(t)\widehat{\nabla V}_{t} and the quadratic regularizer w^1(t)∥Δvθ∥2\hat{w}_{1}(t)\left\lVert\Delta\mathbf{v}_{\theta}\right\rVert^{2} should remain bounded across time and discretization scale. This principle recovers the stable weightings used by AWM, DiffusionNFT, and GRPO-Guard, rules out singular Flow-GRPO-style weights in off-policy regimes, and reduces algorithm design to a small family of interpretable weight shapes.

References (37)