NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ReinFlow: Fine-tuning Flow Matching Policy with Online Reinforcement Learning

Tonghe Zhang, Chao Yu, Sichang Su, Yu Wang

TL;DR

ReinFlow is the first online reinforcement learning (RL) framework designed to fine-tune flow matching policies for continuous robotic control. By injecting learnable noise into a flow policy's deterministic path, it transforms the generation process into a discrete-time Markov process, enabling exact likelihood computation and stable training. This allows robots to achieve high success rates with massive wall-clock time savings, even when using as few as one denoising step.

What Problem Does This Paper Address?

Flow matching models have recently emerged as a powerful, fast, and lightweight alternative to diffusion models for robotic action generation. However, because they are typically trained via imitation learning on imperfect, mixed-quality datasets, their performance often plateaus or remains suboptimal.

Online reinforcement learning (RL) offers a way to surpass these data limitations through trial and error. Unfortunately, fine-tuning flow matching models with online RL is notoriously difficult. Flow matching models generate actions along a deterministic Ordinary Differential Equation (ODE) path. Because the path is deterministic, calculating the log-probabilities (stochasticity) required for standard policy gradient methods is highly unstable and computationally expensive, requiring complex trace estimations. This problem worsens when trying to accelerate inference by using fewer denoising steps, as discretization errors compound rapidly.

Methods

ReinFlow resolves these challenges through a simple yet mathematically rigorous trick: learnable noise injection.

Instead of treating the flow as a continuous, deterministic ODE during RL training, ReinFlow injects bounded, learnable Gaussian noise at each denoising step via a compact "noise injection network" ($\sigma_{\theta'}$). This converts the deterministic flow into a discrete-time Markov Process with explicit Gaussian transition probabilities.

This formulation yields several key benefits:

  • Exact Likelihoods: The joint log-probability of the entire action-generation sequence can be computed exactly in closed form, completely bypassing the need for expensive Monte-Carlo trace estimators (like Hutchinson's estimator).
  • Stable Low-Step Inference: Because the likelihood computation is exact, the policy can be trained stably even with very few integration steps (e.g., 1 to 4 steps).
  • Joint Optimization: ReinFlow uses a Proximal Policy Optimization (PPO) subroutine to jointly update the velocity network (the core policy) and the noise network. The noise network automatically balances exploration and exploitation, naturally decaying as the policy approaches a 100% success rate.
  • Regularization: The framework incorporates Entropy regularization and Wasserstein-2 ($W_2$) regularization to maintain training stability and prevent the policy from deviating too destructively from its pre-trained initialization.

Datasets

The authors evaluated ReinFlow across three diverse simulation suites:

  1. OpenAI Gym (Locomotion): Hopper-v2, Walker2d-v2, Ant-v0/v2, and Humanoid-v3, utilizing medium and medium-expert demonstrations from the D4RL dataset.
  2. Franka Kitchen (State-input Manipulation): A long-horizon, multi-task environment where a robotic arm executes sequential tasks based on human teleoperated data (complete, mixed, and partial demonstrations).
  3. Robomimic (Visual Manipulation): PickPlaceCan, NutAssemblySquare, and TwoArmTransport tasks using low-quality, human-generated pixel and proprioception data.

Key Insights and Ideas

  • The Markov Shortcut: Converting a continuous ODE into a discrete Markov chain eliminates the mathematical headaches of continuous-time log-probability estimation. It turns an intractable optimization problem into a standard policy gradient problem.
  • Orthogonal Scaling: Traditionally, to get better performance out of generative policies, researchers scale up the dataset size or the number of inference steps. ReinFlow demonstrates that online RL provides an orthogonal scaling path: it drastically boosts success rates without requiring more data or more denoising steps.
  • Discardable Exploration: The noise network is only used during the online RL training phase to drive exploration. Once fine-tuning is complete, the noise network is discarded, returning the policy to a fully deterministic, high-speed ODE inference path.

Key Results

ReinFlow significantly outperformed state-of-the-art diffusion and flow-based RL baselines like DPPO and Flow Q-Learning (FQL) in both performance and wall-clock efficiency.

  • Locomotion Tasks: Rectified Flow policies achieved an average net reward growth of 135.36% after fine-tuning.
  • Manipulation Tasks: The success rate in state and visual manipulation tasks saw an average net increase of 40.34%. Remarkably, in the Robomimic Can and Square tasks, ReinFlow achieved these results using only a single denoising step.
  • Wall-Clock Efficiency: ReinFlow cut wall-clock training time by an average of 62.82% (and up to 82.63% in legged locomotion) compared to the leading diffusion RL method, DPPO, primarily because it requires far fewer denoising steps to generate actions.
Figure 1: Wall time efficiency in OpenAI Gym. Dashed lines indicate the behavior cloning level.

Limitations and Future Work

While ReinFlow achieves excellent wall-clock efficiency due to parallelized simulation rollouts, its underlying on-policy design (PPO) means it is inherently less sample-efficient than off-policy methods. This makes direct deployment in real-world physical environments (where sample collection is slow and expensive) challenging.

Additionally, the algorithm introduces hyperparameters regarding the upper and lower bounds of the injected noise, which currently require manual tuning based on the robot's joint constraints. Future work will focus on adapting ReinFlow to off-policy RL architectures, automating noise hyperparameter tuning, and scaling the framework to large, vision-language-action (VLA) robotics models.

Summary updated

BibTeX
@inproceedings{zhang2025reinflow,
  author = {Tonghe Zhang and Chao Yu and Sichang Su and Yu Wang},
  title = {{ReinFlow: Fine-tuning Flow Matching Policy with Online Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=ACagRwCCqu},
}
Figure