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

Generative models have taken the world by storm, but getting them to follow specific instructions—like "make this image more compressible" or "put the cat strictly on the left"—remains surprisingly difficult. While significant progress has been made in fine-tuning diffusion models using Reinforcement Learning (RL), a newer, faster class of models called Flow Matching (FM) has proven much harder to align.

Recent research introduces a framework called ORW-CFM-W2 (Online Reward-Weighted Conditional Flow Matching with Wasserstein-2 Regularization). It is the first theoretically grounded method to fine-tune these continuous flow models using online RL, solving a major headache in the field: how to maximize rewards without the model "collapsing" into a boring, repetitive mess.

The Challenge of Fine-Tuning Flow Models

Fine-tuning generative models typically involves Reinforcement Learning from Human Feedback (RLHF). For diffusion models, techniques like Proximal Policy Optimization (PPO) or Direct Preference Optimization (DPO) are standard. However, Flow Matching models—which represent data generation as a smooth, continuous "flow" from noise to an image—do not easily integrate with these algorithms.

The challenges are two-fold:

  1. Computational Cost: Standard RL methods require calculating "likelihoods," which in Flow Matching involves solving complex ordinary differential equations (ODEs). Doing this during every training step is prohibitively slow.
  2. Policy Collapse: If a model is simply instructed to "maximize reward," it often becomes a "one-trick pony." It finds the single image that gets the highest score and generates only that, losing all the creative diversity of the original pre-trained model. This phenomenon is known as over-optimization or policy collapse.

Methodology: The ORW-CFM-W2 Framework

To overcome these hurdles, the authors introduce three key innovations that make fine-tuning both tractable and stable.

Overview of the ORW-CFM-W2 framework, illustrating online reward-weighted fine-tuning and Wasserstein-2 regularization.
  • Online Reward-Weighting (ORW): Instead of relying on gradients of the reward function (which might be non-differentiable or hard to compute), the framework weights training samples based on the reward they receive. By doing this "online"—sampling directly from the model's current output—the model continuously explores and improves its generation manifold.
  • Wasserstein-2 (W2) Regularization: To prevent the model from collapsing, it must be kept "close" to the original pre-trained model. While researchers typically use KL-divergence for this, KL is computationally expensive in Flow Matching. Instead, this method utilizes the Wasserstein-2 distance.
  • A Tractable Bound: The real mathematical breakthrough of the paper is proving that the W2 distance between two flow models can be bounded simply by comparing their vector fields (the "directions" the model moves the data). This allows the model to be regularized without ever having to solve expensive ODEs.

Experimental Setup and Datasets

The researchers tested their method across three distinct domains to prove its versatility:

  • MNIST: Fine-tuning a model to generate specific subsets of digits (e.g., only even numbers).
  • CIFAR-10: An image compression task where the "reward" was minimizing the JPEG file size.
  • Stable Diffusion 3 (SD3): Using the state-of-the-art SD3 model for text-to-image alignment, specifically focusing on complex spatial prompts (e.g., "a cat on the left of a dog").

Key Insights and Results

Controllable Trade-offs and Preventing Collapse

The authors mathematically proved that without regularization, an online reward-weighted model will inevitably collapse into a single point (a Delta distribution). This provides strong theoretical justification for why regularization is a strict requirement, not just a nice-to-have feature.

Reward curves and generated samples demonstrating the controllable trade-off between reward maximization and diversity preservation using the hyperparameter α.

By adjusting a single hyperparameter ($\alpha$), users can precisely control the balance between "high reward" and "high diversity." As shown in the visual results, while baseline methods ($\alpha = 0$) often start generating identical-looking images (policy collapse), the W2-regularized versions maintain a wide variety of styles and compositions while still achieving near-optimal rewards.

Superior Alignment and Efficiency

In text-to-image tasks using Stable Diffusion 3, ORW-CFM-W2 significantly outperformed existing baselines like RAFT and ReFT. It was much better at following spatial constraints while maintaining high image quality. Quantitatively, on SD3 alignment tasks, the method achieved a CLIP Score of 35.46 and a Diversity Score of 4.21, beating the base model and all competitors in achieving the best balance.

Furthermore, because the method avoids likelihood calculations entirely by relying on vector fields, it is significantly more computationally efficient than traditional policy gradient methods for continuous-time flows.

Limitations and Future Work

While a major step forward, the authors acknowledge a few areas for future improvement:

  • Reward Model Sensitivity: Like all RL methods, the quality of the fine-tuning is inherently tied to the reward model. If the reward model has "blind spots," the generative model will exploit them.
  • Data Efficiency: Online RL still requires generating many samples during training. Future work could explore "off-policy" versions that utilize historical data more effectively to speed up training.
  • Scaling: While demonstrated successfully on Stable Diffusion 3, further research is needed to observe how this framework scales to even larger video generation models or complex multi-modal flows.

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