Coefficients-Preserving Sampling for Reinforcement Learning with Flow Matching

Feng Wang, Zihao Yu · Submission to ICLR 2026 · Withdrawn

TL;DR

Online reinforcement learning for Flow Matching models requires injecting noise during generation to explore diverse outputs, but standard SDE formulations leave severe noise artifacts on final images that corrupt reward signals. The authors propose Coefficients-Preserving Sampling (CPS), a DDIM-inspired formulation that guarantees exact variance preservation at every step, yielding clean image rollouts, more reliable rewards, and faster, higher-performing RL convergence.

What Problem Does This Paper Address?

Flow Matching models (such as Stable Diffusion 3.5 and FLUX.1) are governed by deterministic Ordinary Differential Equations (ODEs). When applying online reinforcement learning methods like Group Relative Policy Optimization (GRPO)—as seen in recent frameworks like Flow-GRPO and Dance-GRPO—the model needs stochasticity to generate diverse candidate trajectories for each prompt.

To do this, existing approaches convert the generative ODE into a Stochastic Differential Equation (SDE). However, the authors discover that SDE-based sampling leaves noticeable noise artifacts on generated images during training rollouts. When these grainy images are evaluated by reward models (e.g., scoring aesthetic preference or alignment), the scores become noisy and misleading, harming policy optimization.

Methods

The authors analyze the mathematical root cause and present a streamlined fix:

  1. Theoretical Diagnosis: The continuous SDE used in Flow-GRPO is merely a first-order Taylor approximation of a proper noise injection scheme. When using few sampling steps (e.g., 4 to 16 steps, typical for rectified flow models), the step size $\Delta t$ is far from infinitesimal, causing approximation errors to accumulate into an unremoved residual noise floor. Moreover, terms containing $1/t$ cause extreme numerical instability near $t \to 0$.
  2. Coefficients-Preserving Sampling (CPS): Drawing inspiration from DDIM, the authors define CPS such that the coefficients for the predicted clean data $\hat{x}_0$ and the total noise (the root-sum-square of the predicted noise $\hat{x}_1$ and newly injected Gaussian noise $\epsilon$) precisely sum to the noise scheduler's target at every timestep: $$x_{t-\Delta t} = (1 - (t - \Delta t))\hat{x}_0 + (t - \Delta t)\cos\left(\frac{\eta\pi}{2}\right)\hat{x}_1 + (t - \Delta t)\sin\left(\frac{\eta\pi}{2}\right)\epsilon$$ where $\eta \in [0, 1]$ directly controls exploration strength.

  3. Simplified Log-Probability & KL Objective: The authors remove the $2\sigma_t^2$ denominator in both the GRPO log-probability ratio and the KL divergence penalty. This avoids division-by-zero near the final step and prevents the algorithm from over-weighting late, deterministic timesteps at the expense of early, high-variance exploration stages.

Datasets

The authors evaluate their method across four standard evaluation tasks and reward benchmarks:

  • PickScore (Pick-a-Pic): Human preference regression model evaluated on FLUX.1-schnell and FLUX.1-dev.
  • HPSv2 (Human Preference Score v2): Aesthetic and human alignment evaluation on FLUX.1-schnell and FLUX.1-dev.
  • OCR Text Rendering: Evaluated using PaddleOCR 3.0 on text rendering accuracy (edit distance).
  • GenEval: An object-focused benchmark measuring compositionality (counting, spatial positioning, color binding, and attribute binding) using Stable Diffusion 3.5 Medium (SD3.5-M).

Key Insights and Ideas

  • SDE Discretization Breakdown in Few Steps: Diffusion theory often assumes $\Delta t \to 0$ over hundreds or thousands of steps. Modern flow models generate images in as few as 4 to 8 steps; in this regime, SDE Taylor expansions fail dramatically, adding significantly more noise than they remove.
  • Independence Preserving Geometry: In CPS, the trade-off between predicted noise and freshly injected noise forms an exact quarter-circle trigonometric rotation ($\cos^2 + \sin^2 = 1$). This maintains the exact schedule variance without complex drift corrections.
  • Cleaner Samples Mean Cleaner Rewards: Reward models trained on clean images (like CLIP-based aesthetics heads) fail catastrophically when presented with high-frequency noise artifacts. Ensuring training rollouts match the clean test distribution is critical for faithful advantage estimation.

Key Results

  • Artifact-Free Exploration: Flow-CPS outputs visually pristine images across all noise scales ($\eta = 0.3$ to $1.0$), whereas Flow-SDE generates visibly degraded, grainy outputs as noise increases.
  • Higher Preference Scores:
  • PickScore: Flow-CPS reaches 23.78 (vs. 23.39 for Flow-GRPO) on FLUX.1-schnell and 24.25 (vs. 23.90) on FLUX.1-dev.
  • HPSv2: Reaches 0.377 (vs. 0.364 for Dance-GRPO) on FLUX.1-schnell.
  • Rule-Based & Verifiable Rewards:
  • OCR: Reaches 0.975 (vs. 0.966 for Flow-GRPO) on SD3.5-M.
  • GenEval: Matches saturated top performance (0.97 overall score) while converging significantly faster during training.
  • Implementation Simplicity: The core fix requires fewer than 10 lines of code changes to standard flow-matching training loops.

Limitations and Future Work

  • Training Instability at Low Noise: When setting $\eta \le 0.5$, Flow-CPS can exhibit sudden intermittent reward drops during training, mirroring similar instabilities seen in SDE-DPM-Solver++1, which authors hypothesize is linked to insufficient sample diversity.
  • Susceptibility to Reward Hacking: Highly optimized checkpoints display exaggerated textures and high-frequency patterns, showing that visual models can still exploit proxy reward heads even with clean sampling.
  • Open RL Challenges: The method does not yet address fundamental RL hurdles in diffusion models, such as temporal credit assignment across multi-step trajectories or optimizing over the initial noise distribution $x_1$.

Summary updated

BibTeX
@misc{wang2025coefficients,
  author = {Feng Wang and Zihao Yu},
  title = {{Coefficients-Preserving Sampling for Reinforcement Learning with Flow Matching}},
  year = {2025},
  eprint = {2509.05952},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.05952},
}
Figure