Flow Matching Policy Optimization with Mirror Descent and Entropy Constraints

Ting Gao, Stavros Orfanoudakis, Nan Lin, Winnie Daamen, Serge Hoogendoorn, Elvin IsufiNeurIPS 2026

TL;DR

When teaching robots complex skills through trial and error, standard AI policies often get stuck in single-track thinking, while expressive generative models like diffusion are notoriously unstable and expensive to train online. This paper introduces FMER, a framework that uses deterministic Flow Matching to give Reinforcement Learning agents rich, multi-option behaviors without the computational headaches. By mathematically unlocking exact exploration control and avoiding backpropagation through differential equation solvers, FMER cracks tough, sparse-reward robotics tasks where other methods stall out.

What Problem Does This Paper Address?

Imagine standing in front of an obstacle: you can step left or step right. Both are great choices, while walking straight ahead is a disaster. Standard Reinforcement Learning (RL) policies usually model actions as a single bell curve (a unimodal Gaussian)—meaning if left and right are equally good, the policy averages them and walks straight into the wall.

To capture multi-peaked ("multimodal") action landscapes, researchers brought Diffusion Models into RL. While expressive, diffusion relies on stochastic (random) reverse processes that create two major headaches for online RL (where an agent learns from scratch by interacting with the world):

  1. Intractable Entropy: Because of the injected randomness at every denoising step, you can't easily calculate the policy's entropy (a measure of randomness crucial for balancing exploration and exploitation). Researchers have had to rely on crude heuristics to make agents explore.
  2. Brittle, Expensive Gradients: Updating the policy often requires backpropagating gradients through a long chain of denoising steps or differential equation solvers—a slow process prone to exploding or vanishing gradients.

Existing Flow Matching (ODE-based) alternatives fix some of this by removing randomness, but still end up sacrificing either simulation-free training, exact entropy calculation, or behavioral stability.

Methods

The authors propose FMER (Flow Matching Policy Optimization with Mirror Descent and Entropy Constraints), which achieves expressive, stable online RL by uniting three core components:

Figure 1: Overview of the FMER framework. Left (Policy Training): The policy generates a set of candidate actions, which are evaluated by the critic (Q-network) to compute advantage-based weights. These weights guide the Weighted Conditional FM loss, while an entropy regularization term ensures exploration. Right (Interaction): During data collection, the agent samples multiple candidates and executes the highest-value action to store in the replay buffer.
  • Simulation-Free Policy Mirror Descent: Standard Policy Mirror Descent stabilizes RL by maximizing action value while keeping the new policy close to the old one (a "trust region"). Instead of backpropagating through an ODE solver to do this, the authors prove they can sample $M$ candidate actions, weight them exponentially by their critic ($Q$) values, and train the Flow Matching velocity field using a Weighted Conditional Flow Matching loss.
  • Adaptive Trust Regions via ESS: How aggressively should the policy chase high-value actions? FMER dynamically tunes the mirror descent temperature ($\tau$) by monitoring the Effective Sample Size (ESS) of the action weights—tightening or loosening the update if too few or too many candidate actions dominate.
  • Exact Squashed-Action Entropy: Because robot joints have physical limits, unbounded model outputs are squashed into $(-1, 1)$ using a $\tanh$ function, which warps probability densities. Leveraging deterministic ODEs, the authors derive a closed-form equation for exact action-space entropy that corrects for this $\tanh$ distortion, using Hutchinson’s trace estimator to keep compute light ($O(d)$ instead of $O(d^2)$).

Datasets

Because this is an online RL paper, there are no static pre-collected datasets—agents generate their own experience from scratch over 1 million environment steps. FMER is evaluated across three standard simulation suites (no new benchmarks are introduced):

  • 2D Multi-Goal Environment: A classic interpretability sandbox with four symmetrically placed goals to test multimodal navigation.
  • FrankaKitchen: A challenging, sparse-reward benchmark where a 9-DoF robot arm must complete sequences of $N \in \{1, 2, 4, 7\}$ household tasks (e.g., moving a kettle, flipping a light switch), receiving a binary reward of 1 only when a sub-task is finished.
  • MuJoCo-v5: Standard dense-reward locomotion tasks (Hopper, HalfCheetah, Walker2d, Humanoid), used as a regression test to ensure FMER's multimodal machinery doesn't hurt performance in simpler settings.

Key Insights and Ideas

  • Vector field regression is a secret mirror descent surrogate: The biggest "aha" moment is Theorem 1. By simply weighting standard straight-line Flow Matching targets with softmax $Q$-values, the network naturally converges to the exact theoretical target of Policy Mirror Descent—completely bypassing ODE backpropagation.
  • Soft weighting beats greedy updates: Rather than just imitating the single best sampled action ("top-1"), aggregating all candidates via soft weights prevents the agent from getting tricked by critic overestimation or trapped in local maxima.
Weighted updates aggregate multiple candidates toward the global optimum, whereas greedy top-1 updates get pulled into a local maximum.
  • Don't ignore the $\tanh$: Optimizing latent entropy isn't enough when actions are squashed. Accounting for the exact coordinate transformation is critical to prevent premature policy collapse in bounded action spaces.

Key Results

  • Crushing Sparse, Multi-Task Robotics: On the hardest 7-task FrankaKitchen setup ($N=7$), FMER achieves a 40.29% task completion rate—nearly doubling the strongest generative baselines like DIPO (23.14%) and DPMD (20.57%), while Gaussian policies like SAC (12.29%) and flow baselines like SAC-Flow (0.57%) struggle. Qualitatively, FMER completes up to 5 sequential kitchen tasks in a 280-step episode compared to 3 for the best baseline.
  • True Multimodality: In the 2D Multi-Goal task, SAC and diffusion-based DPMD collapse onto favoring just two of the four equal peaks, whereas FMER cleanly adapts to local geometry and navigates to whichever of the four goals is nearest.
  • Competitive on Dense Benchmarks: On MuJoCo-v5, FMER achieves the highest scores overall on HalfCheetah (12,332) and Walker2d (5,283), and beats all other generative policies on Humanoid (5,286, just behind SAC's 5,327).

Limitations and Future Work

In the main text, the authors note one clear empirical trade-off: FMER underperforms standard off-policy baselines on Hopper-v5 (scoring 2,913 vs. TD3's 3,662). They attribute this to the explicit entropy constraint forcing the agent to keep exploring longer than necessary in a simple, unimodal environment where locking onto a single gait early is advantageous. Additionally, while ablations show FMER still learns without its "best-of-$M$" action selection trick during data collection, removing it noticeably drops performance on harder long-horizon tasks (dropping from 40.29% to 14.29% on FrankaKitchen $N=7$). Broader theoretical limitations and future work directions are deferred by the authors to Appendix B.8 (not included in the provided main-paper pages).

Summary updated

Abstract

Balancing policy expressiveness with the exploration-exploitation trade-off is a core challenge in online Reinforcement Learning (RL). While Stochastic Differential Equation (SDE)-based diffusion policies can represent complex, multimodal action distributions, they suffer from two critical limitations: their stochastic reverse processes render entropy intractable (necessitating heuristic exploration), and computing policy gradients through long denoising chains is expensive and unstable. In this work, we show that ODE-based flow matching inherently resolves these issues by enabling both simulation-free policy optimization and tractable entropy computation. Building on this, we introduce Flow Matching Policy Optimization with Mirror Descent and Entropy Constraints (FMER). Our framework exploits this insight in three ways. First, we derive an analytic entropy objective that corrects for the density distortion caused by the $\tanh$ transformation (mapping an unbounded latent space to bounded actions), thereby facilitating entropy-constrained policy optimization. Second, we theoretically establish that minimizing an advantage-weighted conditional flow matching loss acts as a simulation-free surrogate for policy mirror descent. This steers the velocity field toward high-value regions while entirely avoiding backpropagation through the ODE solver. Finally, we dynamically tune the mirror descent temperature based on the effective sample size to enforce a robust trust region during training. Empirical evaluations demonstrate that FMER achieves superior performance on the challenging sparse-reward FrankaKitchen environment, while maintaining competitive results across standard dense-reward MuJoCo benchmarks. Code is available at \url{https://github.com/gtanaelle/FMER.git}.
BibTeX
@inproceedings{gao2026flow,
  author = {Ting Gao and Stavros Orfanoudakis and Nan Lin and Winnie Daamen and Serge Hoogendoorn and Elvin Isufi},
  title = {{Flow Matching Policy Optimization with Mirror Descent and Entropy Constraints}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=zxpb2T9sJT},
}
Figure