Finite Difference Flow Optimization for RL Post-Training of Text-to-Image Models

David McAllister, Miika Aittala, Tero Karras, Janne Hellsten, Angjoo Kanazawa, Timo Aila, Samuli Laine · DOI

Abstract

Reinforcement learning (RL) has become a standard technique for post-training diffusion-based image synthesis models, as it enables learning from reward signals to explicitly improve desirable aspects such as image quality and prompt alignment. In this paper, we propose an online RL variant that reduces the variance in the model updates by sampling paired trajectories and pulling the flow velocity in the direction of the more favorable image. Unlike existing methods that treat each sampling step as a separate policy action, we consider the entire sampling process as a single action. We experiment with both high-quality vision language models and off-the-shelf quality metrics for rewards, and evaluate the outputs using a broad set of metrics. Our method converges faster and yields higher output quality and prompt alignment than previous approaches.

Introduction

Diffusion and flow-matching models have revolutionized text-to-image synthesis through a two-stage process: massive-scale pre-training followed by post-training alignment. This second stage is crucial for tailoring models to human preferences, improving aesthetic quality, and ensuring strict adherence to complex prompts. However, current post-training methodologies typically frame image sampling as a Markov Decision Process (MDP), where every discrete denoising step is treated as an independent action.

This MDP formulation introduces significant challenges. Most random perturbations at individual steps are "reward-neutral" noise, leading to high variance in training signals. Consequently, models suffer from slow convergence, susceptibility to reward hacking (e.g., generating subtle grid-like artifacts to inflate scores), and unpredictable style drift.

Methodology: Finite Difference Flow Optimization

To address these limitations, we introduce Finite Difference Flow Optimization (FDFO). Rather than perturbing individual steps, FDFO treats the entire sampling trajectory as a single, holistic action. This approach simplifies the optimization landscape and drastically reduces variance.

The core mechanism involves:

  1. Paired Trajectories: For a given prompt, the model generates two slightly different images from the same initial noise block ($\epsilon$) by introducing controlled stochasticity during the sampling process.
  2. Finite Difference Gradient: The difference in final image states ($\Delta x$) and their respective rewards ($\Delta R$) are used to approximate a gradient.
  3. Flow Bending: The model is updated to "bend" the entire flow velocity toward the trajectory that yielded the higher reward.
Comparison of trajectory updates between Flow-GRPO (a) and our proposed FDFO (b). FDFO leverages paired trajectories to provide a cleaner, lower-variance training signal.

This method relies on the "non-rotational" property of diffusion flows, where intermediate nudges result in predictable changes in the final output. By adapting the EDM (Elucidated Diffusion Models) sampler for flow matching, we ensure mathematical consistency throughout the sampling process.

Experimental Setup

We trained our model using prompts from the Pick-a-Pic dataset. Evaluation was conducted across several benchmarks:

  • OneIG-Bench: For measuring prompt alignment and output diversity.
  • HPSv2 & HPDv2: Standard human preference benchmarks.
  • VLM Reward: We utilized the Qwen2.5-VL-7B vision-language model as a novel reward signal, judging image-caption alignment more effectively than traditional specialized metrics.

Results

FDFO demonstrates significant improvements over existing state-of-the-art methods like Flow-GRPO:

  • Efficiency: FDFO achieved target reward levels up to 19x faster in wall-clock time on NVIDIA H200 GPUs. Its requirement of only two rollouts per prompt makes it significantly more memory-efficient than group-based RL methods.
  • Quality and Alignment: The method consistently outperformed baselines in PickScore and OneIG-Bench.
  • Stability: Unlike MDP-based methods that often succumb to reward hacking and artifact generation (e.g., grid patterns) during extended training, FDFO remains stable, producing clean, high-fidelity images.
Qualitative result showing high-quality image generation and prompt alignment after 600 steps of FDFO post-training.

Discussion and Limitations

While FDFO offers a robust path for post-training, it faces common RL challenges. We observed a trade-off between reward maximization and output diversity (mode collapse), a typical phenomenon in fine-tuning. Additionally, models may eventually learn to exploit specific biases within the VLM used as a reward judge. To mitigate style drift and preserve pre-trained knowledge, KL regularization remains a necessary component of the training pipeline.

In conclusion, FDFO provides a high-efficiency, low-variance alternative for aligning text-to-image models, paving the way for more stable and effective post-training.

Implementation and models are available at GitHub.

Summary updated

BibTeX
@misc{mcallister2026finite,
  author = {David McAllister and Miika Aittala and Tero Karras and Janne Hellsten and Angjoo Kanazawa and Timo Aila and Samuli Laine},
  title = {{Finite Difference Flow Optimization for RL Post-Training of Text-to-Image Models}},
  year = {2026},
  eprint = {2603.12893},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.12893},
}
Figure