SuperFlow: Training Flow Matching Models with RL on the Fly

Kaijie Chen, Zhiyang Xu, Ying Shen, Zihao Lin, Yuguang Yao, Lifu HuangarXiv 2025 · DOI

Introduction

Large-scale pre-training has enabled generative models like Stable Diffusion 3.5 to capture vast amounts of visual knowledge. However, pre-training alone often falls short of aligning models with specific human intents, such as precise text rendering or complex spatial reasoning. Post-training via Reinforcement Learning (RL) has emerged as a critical step for this alignment. Despite its potential, current RL methods for flow-matching models suffer from significant computational overhead and suboptimal credit assignment.

This paper introduces SuperFlow, a novel RL framework designed to fine-tune flow-matching models with unprecedented efficiency. By introducing dynamic sampling strategies and refined step-level reward estimation, SuperFlow achieves state-of-the-art performance while requiring a fraction of the training resources used by previous methods.

The Challenges of RL for Flow Matching

Current state-of-the-art RL methods, such as Flow-GRPO, encounter two primary bottlenecks:

  1. Sampling Inefficiency: Standard methods apply a uniform computational budget to all prompts. In practice, prompts vary wildly in difficulty. A simple prompt like "a blue sky" requires far fewer samples to optimize than a complex instruction like "a neon sign saying 'Open Late' in a rainy alley." Fixed-group sampling leads to wasted compute on easy prompts and insufficient exploration for difficult ones.
  2. Inaccurate Credit Assignment: Flow-matching models generate images through a multi-step denoising trajectory. Existing RL approaches typically assign the final image's reward uniformly across all denoising steps. This is inherently biased, as certain steps in the trajectory are more critical for determining the final image's structure and content than others.

Methodology: The SuperFlow Framework

SuperFlow addresses these hurdles through two core innovations: Dynamic-Group Sampling and Step-level Advantage Re-estimation.

Dynamic-Group Sampling

Instead of a static group size, SuperFlow employs a "value tracker" modeled as a Beta distribution to monitor the reward uncertainty for each prompt. This allows the system to prioritize prompts with high variance—indicating high learning potential or model confusion—by allocating up to 24 rollouts. Conversely, prompts that have already reached stable, low-variance rewards receive fewer rollouts. This adaptive allocation ensures that the gradient signal is derived from the most informative samples, drastically reducing total GPU hours.

Step-level Advantage Re-estimation

To resolve the credit assignment problem, SuperFlow moves beyond global trajectory rewards. It re-estimates the "advantage"—the measure of how much better a specific action was compared to the expected baseline—at each individual denoising step. Crucially, these estimates are scaled according to the diffusion coefficient ($\sigma_t$) of the underlying SDE. By grounding the RL signal in the mathematical dynamics of the flow-matching process, SuperFlow ensures that the strongest updates occur during the most formative stages of image generation.

Experimental Evaluation

The researchers evaluated SuperFlow across three distinct benchmarks to test its versatility and robustness:

  • Visual Text Rendering: A dataset of 20,000 prompts focused on rendering specific text strings, evaluated using OCRScore.
  • Compositional Image Generation: The GenEval benchmark, which assesses the model's ability to handle attribute binding (e.g., color, count) and spatial relationships.
  • Human Preference Alignment: Measured via PickScore, a metric designed to correlate with human aesthetic judgments.
Figure 1: SuperFlow demonstrates superior efficiency and accuracy in OCR tasks compared to baselines like Flow-GRPO and Adv-Est.

Key Results and Insights

SuperFlow demonstrates a significant leap in both performance and training speed:

  • Efficiency: The model reached peak performance using only 5.4% to 56.3% of the training steps required by Flow-GRPO.
  • Textual Accuracy: SuperFlow improved OCR accuracy by 47.2% over the base SD3.5-M and 16.0% over the previous RL state-of-the-art.
  • Compositional Gains: On GenEval, it achieved a 38.4% relative improvement over the base model, showcasing its ability to follow complex spatial instructions.
Figure 2: An example of high-fidelity text rendering achieved by SuperFlow, accurately placing text within a complex scene.

Beyond raw metrics, SuperFlow exhibits remarkable stability. While many RL-tuned generative models suffer from "entropy collapse"—where the model becomes overly deterministic and loses diversity—SuperFlow’s use of a running-average reward baseline maintains a healthy learning signal throughout the training process.

Conclusion and Future Directions

SuperFlow proves that treating all training prompts as equal is a significant bottleneck in generative RL. By acknowledging the heterogeneity of prompt difficulty and grounding credit assignment in the physics of flow matching, the authors have created a framework that is both faster and more effective.

Future work may involve refining the heuristics used for dynamic sampling and exploring the application of these techniques to other generative architectures, such as autoregressive models. As reward models continue to improve, frameworks like SuperFlow will be essential for scaling alignment to increasingly complex human preferences.

Summary updated

BibTeX
@misc{chen2025superflow,
  author = {Kaijie Chen and Zhiyang Xu and Ying Shen and Zihao Lin and Yuguang Yao and Lifu Huang},
  title = {{SuperFlow: Training Flow Matching Models with RL on the Fly}},
  year = {2025},
  eprint = {2512.17951},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.17951},
}
Figure