Coefficients-Preserving Sampling for Reinforcement Learning with Flow Matching

Feng Wang, Zihao Yu
9/7/2025
63 citations
cs.CV
diffusion-flowrlrlhf-rlvr-dpo

Official code: IamCreateAI/FlowCPS (84 stars, Python, MIT, last commit 2025-09-11).

Abstract

Reinforcement Learning (RL) has recently emerged as a powerful technique for improving image and video generation in Diffusion and Flow Matching models, specifically for enhancing output quality and alignment with prompts. A critical step for applying online RL methods on Flow Matching is the introduction of stochasticity into the deterministic framework, commonly realized by Stochastic Differential Equation (SDE).

Show full abstract

Our investigation reveals a significant drawback to this approach: SDE-based sampling introduces pronounced noise artifacts in the generated images, which we found to be detrimental to the reward learning process. A rigorous theoretical analysis traces the origin of this noise to an excess of stochasticity injected during inference. To address this, we draw inspiration from Denoising Diffusion Implicit Models (DDIM) to reformulate the sampling process. Our proposed method, Coefficients-Preserving Sampling (CPS), eliminates these noise artifacts. This leads to more accurate reward modeling, ultimately enabling faster and more stable convergence for reinforcement learning-based optimizers like Flow-GRPO and Dance-GRPO. Code will be released at https://github.com/IamCreateAI/FlowCPS

View on arXivView PDF

Code Implementations(1)

MIT

An official implementation of Coefficients-Preserving Sampling for Reinforcement Learning with Flow Matching

845Python, Jupyter NotebookSep 9, 20251 years agoMIT

Similar Papers

Cite this paper

@article{wang2025coefficientspreserving,
  title  = {Coefficients-Preserving Sampling for Reinforcement Learning with Flow Matching},
  author = {Feng Wang and Zihao Yu},
  year   = {2025},
  eprint = {2509.05952},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.05952v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.05952.svg)](https://codeofpaper.com/paper/2509.05952)

Discussion