Flow-GRPO: Training Flow Matching Models via Online RL

Jie Liu, Gongye Liu, Jia-Jun Liang, Yangguang Li, Jia-Heng Liu +4 more
5/1/2025
756 citations
diffusion-flowrlrlhf-rlvr-dpo

Official code: yifan123/flow_grpo (2,573 stars).

Abstract

We propose Flow-GRPO, the first method to integrate online policy gradient reinforcement learning (RL) into flow matching models. Our approach uses two key strategies: (1) an ODE-to-SDE conversion that transforms a deterministic Ordinary Differential Equation (ODE) into an equivalent Stochastic Differential Equation (SDE) that matches the original model's marginal distribution at all timesteps, enabling statistical sampling for RL exploration; and (2) a Denoising Reduction strategy that reduces training denoising steps while retaining the original number of inference steps, significantly improving sampling efficiency without sacrificing performance.

Show full abstract

Empirically, Flow-GRPO is effective across multiple text-to-image tasks. For compositional generation, RL-tuned SD3.5-M generates nearly perfect object counts, spatial relations, and fine-grained attributes, increasing GenEval accuracy from $63\%$ to $95\%$. In visual text rendering, accuracy improves from $59\%$ to $92\%$, greatly enhancing text generation. Flow-GRPO also achieves substantial gains in human preference alignment. Notably, very little reward hacking occurred, meaning rewards did not increase at the cost of appreciable image quality or diversity degradation.

View on arXivView PDF

Code Implementations(1)

[NeurIPS 2025] An official implementation of Flow-GRPO: Training Flow Matching Models via Online RL

2,573174

Similar Papers

Cite this paper

@article{liu2025flowgrpo,
  title  = {Flow-GRPO: Training Flow Matching Models via Online RL},
  author = {Jie Liu and Gongye Liu and Jia-Jun Liang and Yangguang Li and Jia-Heng Liu and Xin-Tao Wang and Peng-Fei Wan and Di Zhang and Wan-Li Ouyang},
  year   = {2025},
  eprint = {2505.05470},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2505.05470},
  url    = {https://doi.org/10.48550/arXiv.2505.05470},
  journal = {Neural Information Processing Systems}
}

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/2505.05470.svg)](https://codeofpaper.com/paper/2505.05470)

Discussion