SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.05470 · 2025

Flow-GRPO: Training Flow Matching Models via Online RL

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 9 functions out of this paper's own repositories and ran 4 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
yifan123/flow_grpo canonical 4 of 9
FunctionStatusWhere it lives
get_image_transform Ran yifan123/flow_grpo/flow_grpo/clip_scorer.py
code served (permissive licence) · get_code("1d0c29e5ba66b093")
get_size Ran yifan123/flow_grpo/flow_grpo/clip_scorer.py
code served (permissive licence) · get_code("b4ae73baea6f9f47")
pil_image_to_base64 Ran yifan123/flow_grpo/flow_grpo/qwenvl.py
code served (permissive licence) · get_code("679c61d741aabb1d")
register_optimizer_offload_hooks Ran yifan123/flow_grpo/flow_grpo/fsdp_utils.py
code served (permissive licence) · get_code("9f8c8299498f223d")
clip_score Not yet run yifan123/flow_grpo/flow_grpo/rewards.py
code served (permissive licence) · get_code("58a9aa750111b5f3")
extract_scores Not yet run yifan123/flow_grpo/flow_grpo/qwenvl.py
code served (permissive licence) · get_code("aaf3538ea48a524d")
fsdp_wrapper Not yet run yifan123/flow_grpo/flow_grpo/fsdp_utils.py
code served (permissive licence) · get_code("597a05808a506d45")
image_similarity_score Not yet run yifan123/flow_grpo/flow_grpo/rewards.py
code served (permissive licence) · get_code("6bfe651b4ae64450")
pickscore_score Not yet run yifan123/flow_grpo/flow_grpo/rewards.py
code served (permissive licence) · get_code("667f709586d6128e")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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. 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2505.05470")
get_code_for_paper("2505.05470")
have("2505.05470")

Connect an agent — have() is free.