Iterative Refinement of Flow Policies in Probability Space for Online Reinforcement Learning

Mingyang Sun, Pengxiang Ding, Weinan Zhang, Donglin WangSubmission to ICLR 2026 · Rejected

TL;DR

Fine-tuning expressive flow-matching and diffusion policies with online reinforcement learning (RL) is notoriously unstable and computationally expensive due to their multi-step inference. The Stepwise Flow Policy (SWFP) solves this by framing Euler-discretized flow matching as a sequence of Jordan–Kinderlehrer–Otto (JKO) proximal steps in Wasserstein space. This decomposes the global flow into short, parallelizable blocks equipped with an intrinsic Wasserstein trust region, enabling stable, highly efficient online adaptation with as few as 5 inference steps.

What Problem Does This Paper Address?

Generative models—particularly diffusion and continuous normalizing flows (CNFs)—have set new performance benchmarks in robotic imitation learning because they naturally represent complex, multi-modal action distributions. However, behavior cloning (BC) policies suffer from distributional shift: small execution errors compound over time, leading the agent into unfamiliar states where it fails.

Online RL could fix this by letting policies learn through trial and error, but adapting generative models online is exceedingly difficult:

  1. Iterative Inference: Diffusion and flow models map noise to actions through multi-step trajectories (often 20 to 100 integration steps), breaking the single-step computation graph expected by standard actor-critic methods.
  2. Backpropagation Overhead: Backpropagating policy gradients through the entire integration trajectory causes high variance and explosive memory footprints.
  3. Indirect Workarounds Fall Short: Workarounds like advantage-weighted regression, rejection sampling, or one-step distillation (e.g., Flow Q-Learning) either fail to modify the base policy distribution or severely degrade the model's expressivity.

Methods

SWFP bridges generative flow matching and regularized policy optimization through optimal transport theory:

  • The Flow–JKO Connection: The authors demonstrate that discretizing flow matching via a fixed-step forward Euler scheme naturally aligns with the variational Jordan–Kinderlehrer–Otto (JKO) scheme—a metric gradient flow over probability distributions.
  • Stepwise Flow Decomposition: Instead of treating the generation process as a monolithic mapping from Gaussian noise to actions, SWFP divides the time horizon $[0, 1]$ into $N$ sub-intervals (e.g., $N=5$). Each block $F_{n,\theta}$ transports the distribution between proximate intermediate states.
  • Wasserstein Trust Regions: At each step $n$, the policy update optimizes an entropy-regularized objective (via a learned soft $Q$-critic) regularized by the Wasserstein-2 ($W_2$) distance to the previous iterate: $$\pi_{n+1} = \arg\min_{\pi} \frac{1}{2\tau} W_2^2(\pi_n, \pi) + \int \pi \log \pi \, da - \int \frac{Q(s, a)}{\alpha} \pi \, da$$ This acts as an explicit trust region in distribution space, penalizing excessive shifts and preventing mode collapse.

  • Parallel Block Training: Sequential training of flow blocks is slow and prone to forgetting. Using the triangle inequality of the Wasserstein distance, the authors formulate a decoupled objective allowing all $N$ blocks to be trained in parallel using replay-buffer particles.

Datasets

The authors evaluated SWFP across simulated manipulation, navigation, and locomotion benchmarks:

  • 2D Synthetic Bandit: An 8-component Gaussian mixture target to visualize distribution transport and mode capture.
  • RoboMimic: Manipulation tasks evaluated from low-dimensional states (Can-State, Square-State).
  • Franka-Kitchen: Complex multi-task robotic manipulation (Kitchen-Complete-v0, Kitchen-Mixed-v0, Kitchen-Partial-v0).
  • CALVIN: High-dimensional, vision-based continuous robotic manipulation tasks.
  • OGBench: Offline-to-online continuous control and locomotion benchmarks (antmaze-large, antmaze-giant, humanoidmaze-medium, humanoidmaze-large, and antsoccer-arena).

No new benchmarks were created; all tasks leverage standardized evaluation protocols.

Key Insights and Ideas

  • Discretization as an Asset, Not an Approximation Error: Instead of viewing numerical Euler steps as an imperfect discretization of continuous flows, SWFP treats each discrete step as an intentional, conservative JKO proximal optimization step.
  • Tractable Wasserstein Bounds via Particles: By tracking finite sets of action particles along ODE trajectory slices, the Wasserstein-2 distance simplifies into the average squared particle displacement $\frac{1}{m} \sum_{i=1}^m \|x^i(t_n) - x^i(t_{n-1})\|^2$, eliminating the need for expensive dual Kantorovich formulations.
  • Fast Sampling Without Distillation: Standard diffusion policies often demand 100 denoising steps, and flow matching typically requires 15–20. SWFP achieves superior stability using only 5 flow steps, speeding up inference without suffering the quality drop typical of aggressive distillation.

Key Results

  • Offline-to-Online Fine-Tuning:
  • Franka-Kitchen: SWFP improved success rates from $63 \to 89$ on Complete-v0, $59 \to 82$ on Mixed-v0, and $57 \to 92$ on Partial-v0, dramatically surpassing baselines like RLPD ($0 \to 34$) and Cal-QL ($59 \to 84$).
  • RoboMimic: Reached $97\%$ on Can-State (up from $65\%$) and $98\%$ on Square-State (up from $40\%$), where competitors struggled to break $65\%$.
  • OGBench Locomotion:
  • In online fine-tuning, SWFP matched or beat Flow Q-Learning (FQL) on all 5 tasks (e.g., antsoccer-arena surged from $10 \to 84$ vs. FQL's $10 \to 80$; humanoidmaze-large reached 15 vs. FQL's 10).
  • Robustness & Hyperparameter Sensitivity: The algorithm proved remarkably insensitive to the Wasserstein scale factor $\epsilon$ across variations from $0.1$ to $5.0$, with performance plateauing robustly once $N \ge 5$ flow blocks were used.

Limitations and Future Work

  • Initial Performance Dip: Truncating inference to only 5 steps can cause a brief initial dip in policy performance during early training before online adaptation compensates.
  • Particle Discretization Costs: Computing empirical Wasserstein distances and gradients relies on drawing particle batches; high action dimensionalities or extreme multimodal distributions may demand larger sample sizes.
  • Heuristic Weighting: The balance parameter $\epsilon$ between the energy functional and the $W_2$ penalty is tuned manually rather than adaptively scheduled.
  • Future Work: Extending the JKO-flow formulation to pixel-level vision representations end-to-end, and applying dynamic step-size selection for the JKO operator.

Summary updated

Abstract

While behavior cloning with flow/diffusion policies excels at learning complex skills from demonstrations, it remains vulnerable to distributional shift, and standard RL methods struggle to fine-tune these models due to their iterative inference process and the limitations of existing workarounds. In this work, we introduce the Stepwise Flow Policy (SWFP) framework, founded on the key insight that discretizing the flow-matching inference process via a fixed-step Euler scheme inherently aligns it with the variational Jordan–Kinderlehrer–Otto (JKO) principle from optimal transport. SWFP decomposes the global flow into a sequence of small, incremental transformations between proximate distributions. Each step corresponds to a JKO update, regularizing policy changes to stay near the previous iterate and ensuring stable online adaptation with entropic regularization. This decomposition yields an efficient algorithm that fine-tunes pre-trained flows via a cascade of small flow blocks, offering significant advantages: simpler/faster training of sub-models, reduced computational/memory costs, and provable stability grounded in Wasserstein trust regions. Comprehensive experiments demonstrate SWFP's enhanced stability, efficiency, and superior adaptation performance across diverse robotic control benchmarks.
BibTeX
@misc{sun2025iterative,
  author = {Mingyang Sun and Pengxiang Ding and Weinan Zhang and Donglin Wang},
  title = {{Iterative Refinement of Flow Policies in Probability Space for Online Reinforcement Learning}},
  year = {2025},
  eprint = {2510.15388},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.15388},
}
Figure