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

Online Reward-Weighted Fine-Tuning of Flow Matching with Wasserstein Regularization

Jiajun Fan, Shuaike Shen, Chaoran Cheng, Yuxin Chen, Chumeng Liang, Ge Liu · DOI

Abstract

Fine-tuning continuous flow-based generative models, such as Flow Matching (FM), using Reinforcement Learning from Human Feedback (RLHF) is computationally challenging due to the prohibitive cost of exact likelihood calculations. We present ORW-CFM-W2, a novel framework that utilizes online reward-weighting and a computationally tractable Wasserstein-2 (W2) distance regularization. This approach allows for the maximization of arbitrary reward functions while explicitly preventing "policy collapse"—the loss of generation diversity—without requiring expensive ODE transport dynamics or differentiable reward models.

Introduction

Reinforcement Learning from Human Feedback (RLHF) has become the standard for aligning large-scale generative models, such as Diffusion Models and Large Language Models (LLMs), with human preferences. However, extending these techniques to continuous flow-based models like Flow Matching (used in state-of-the-art systems like Stable Diffusion 3) presents significant hurdles.

Traditional RL methods like Proximal Policy Optimization (PPO) rely on calculating the exact likelihood of generated data. For continuous flows, this requires solving complex Ordinary Differential Equation (ODE) transport dynamics, making the process computationally expensive. Furthermore, naive online fine-tuning often leads to policy collapse, where the model over-optimizes for a specific reward and loses the diversity of its original pre-trained distribution. This paper introduces a mathematically grounded method to balance reward maximization and generation diversity efficiently.

The ORW-CFM-W2 Framework

The proposed framework, Online Reward-Weighted Conditional Flow Matching with Wasserstein-2 Regularization (ORW-CFM-W2), consists of two primary components designed to bypass the limitations of traditional RLHF.

1. Online Reward-Weighting (ORW-CFM)

Instead of relying on likelihood gradients, the method modifies the standard Conditional Flow Matching loss by weighting it with the rewards of generated samples. By using an "online" approach, the model continuously generates new data from its current policy, allowing it to explore the reward space dynamically rather than being restricted to a static offline dataset.

2. Tractable Wasserstein-2 (W2) Regularization

To prevent policy collapse, the model must remain close to a pre-trained reference model. While Kullback-Leibler (KL) divergence is typically used for this purpose, it is intractable for continuous flows. The authors derive a computationally tractable upper bound for the Wasserstein-2 (W2) distance. This bound can be calculated directly from the vector fields of the flow matching models using simple Monte Carlo sampling, providing a massive computational advantage over KL-based methods.

Theoretical and Key Insights

  • Proof of Policy Collapse: The authors provide a rigorous mathematical proof (Lemma 1) demonstrating that unregularized online reward-weighted fine-tuning inevitably collapses to a Dirac delta distribution (a single high-reward output).
  • W2 as a KL Alternative: By proving that the W2 distance can be bounded by comparing vector fields, the authors establish a new standard for regularizing ODE-based flow models.
  • Reward Agnosticism: The framework works with raw scalar rewards (e.g., CLIP scores or compression ratios) and does not require differentiable reward functions or manually filtered preference datasets.

Experimental Results

The effectiveness of ORW-CFM-W2 was evaluated across several tasks, including MNIST digit generation, CIFAR-10 image compression, and text-to-image alignment using Stable Diffusion 3 (SD3).

Training dynamics showing reward maximization across different regularization strengths (α). The framework achieves near-optimal rewards while the regularization parameter allows for explicit diversity control.

In MNIST and CIFAR-10 experiments, the method successfully maximized rewards while allowing users to explicitly control the trade-off between reward and diversity via the regularization parameter $\alpha$. When applied to Stable Diffusion 3, ORW-CFM-W2 outperformed existing online methods like RAFT and ReFT. On complex spatial prompts from DrawBench, it achieved a superior CLIP alignment score (35.46) while maintaining significantly higher diversity (4.21) compared to baselines.

Conclusion

ORW-CFM-W2 provides a robust and efficient solution for fine-tuning continuous flow matching models. By replacing intractable likelihood calculations with reward-weighting and W2 regularization, the framework enables high-quality, diverse generation aligned with user preferences. Future work will focus on improving data efficiency and exploring off-policy learning to further scale these methods for larger foundation models.

Summary updated

BibTeX
@inproceedings{fan2025online,
  author = {Jiajun Fan and Shuaike Shen and Chaoran Cheng and Yuxin Chen and Chumeng Liang and Ge Liu},
  title = {{Online Reward-Weighted Fine-Tuning of Flow Matching with Wasserstein Regularization}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=2IoFFexvuw},
}
Figure