Score as Action: Fine Tuning Diffusion Generative Models by Continuous-time Reinforcement Learning

Hanyang Zhao, Haoxian Chen, Ji Zhang, David Yao, Wenpin Tang

Abstract

While diffusion models have revolutionized generative AI, aligning them with specific human preferences or downstream tasks remains a challenge. Current Reinforcement Learning from Human Feedback (RLHF) methods for diffusion typically operate in discrete time, treating the denoising process as a sequence of distinct Markov steps. This approach introduces discretization errors and leads to "step-overfitting," where models fail when the inference step count differs from the training count. This paper introduces CTRL (Continuous-Time RL for Diffusion), a framework that treats the score function as a continuous-time action. By formulating the problem within the domain of Stochastic Differential Equations (SDEs), CTRL achieves faster convergence, improved stability, and a unique "step-agnostic" robustness during inference.

Introduction

Diffusion models, such as Stable Diffusion, are traditionally trained using a reconstruction objective. To refine these models for specific aesthetic preferences or complex prompt adherence, researchers have turned to RLHF. However, most existing fine-tuning frameworks discretize the continuous diffusion process into a fixed number of steps (e.g., 50 steps) during training. This discretization creates a mismatch with the underlying continuous-time physics of diffusion and often results in models that are brittle; a model fine-tuned for 50 steps may produce poor results if sampled at 20 or 100 steps.

To address these limitations, we propose viewing the denoising process through the lens of continuous-time reinforcement learning. By treating the score function as an agent's action in an infinitesimal time-step, we derive a fine-tuning objective that is inherently solver-agnostic and more theoretically grounded.

Methodology: The CTRL Framework

Score as Action

In the CTRL framework, the denoising process is modeled as a controlled SDE. The score function—the gradient of the log-density—is redefined as the action taken by an RL agent at every moment in continuous time. This shift allows the optimization to occur over the entire probability path rather than a set of discrete points.

Continuous-time PPO

The authors derive a continuous-time version of Proximal Policy Optimization (PPO). Central to this is a new "Performance Difference Lemma" tailored for SDEs, which provides a theoretical guarantee that policy updates based on the derived objective will monotonically improve the expected reward. This formulation naturally incorporates a continuous-time KL divergence penalty, ensuring the fine-tuned model retains the prior knowledge and image quality of the original pre-trained model.

Structural Value Network Design

A critical component of RL is the "critic" or value network, which estimates the expected future reward. Rather than using a standard black-box architecture, CTRL employs a physics-informed design:

  1. Tweedie’s Formula: The network uses Tweedie’s formula to estimate the clean image from the current noisy state. This serves as a "reward mean predictor."
  2. Residual Corrector: A small neural component handles the residual error between the Tweedie estimate and the actual expected reward.

This structural prior makes the value function significantly easier to learn, leading to lower Mean Squared Error (MSE) and more stable training compared to traditional Multi-Layer Perceptrons (MLPs).

Experimental Evaluation

Setup

The framework was evaluated across two primary domains:

  • CIFAR-10: Benchmarked against small-step diffusion models like DxMI to test convergence and image quality (FID).
  • Stable Diffusion v1.5: Fine-tuned for high-resolution text-to-image generation using ImageReward, a model trained on human preference data, as the reward signal.

Key Results

  • Step-Agnostic Robustness: A standout feature of CTRL is its invariance to the number of sampling steps. While discrete-time baselines (like DDPO) show significant performance degradation when the inference step count deviates from the training count, CTRL maintains consistent reward levels across 25, 50, and 100 steps.
  • Efficiency and Convergence: CTRL demonstrated faster convergence than previous inverse RL approaches. On CIFAR-10, it achieved superior FID scores, indicating a better balance between image diversity and quality.
  • Qualitative Improvements: Models fine-tuned with CTRL produced images with sharper contours and better alignment with complex aesthetic prompts, outperforming both the base models and discrete RLHF baselines.

Discussion and Limitations

CTRL represents a significant step toward making diffusion fine-tuning more robust and theoretically sound. By aligning the RL process with the continuous nature of the SDEs that define diffusion, the method eliminates the artifacts of discretization.

However, some challenges remain. The current implementation relies on trajectory-wise Monte Carlo estimation for the value function. Future work could explore solving the Hamilton-Jacobi-Bellman (HJB) equation directly, which, while computationally demanding, offers a more direct path to the optimal policy. Additionally, like all RLHF methods, CTRL is limited by the quality and potential biases of the underlying reward model (e.g., ImageReward). Finally, while efficient, the computational requirements for large-scale T2I fine-tuning remain high, necessitating significant GPU resources.

Conclusion

By reframing the score function as a continuous-time action, CTRL provides a robust and efficient framework for aligning diffusion models with human preferences. Its ability to remain effective across varying inference schedules makes it a versatile tool for deploying fine-tuned models in diverse computational environments.

Summary updated

BibTeX
@inproceedings{zhao2025score,
  author = {Hanyang Zhao and Haoxian Chen and Ji Zhang and David Yao and Wenpin Tang},
  title = {{Score as Action: Fine Tuning Diffusion Generative Models by Continuous-time Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=V5HEX6stS2},
}
Figure