Fine-Tuning Diffusion Models via Intermediate Distribution Shaping

Gautham Govind Anil, Shaan Ul Haque, Nithish Kannen, Dheeraj Mysore Nagaraj, Sanjay Shakkottai, Karthikeyan Shanmugam

Fine-tuning a massive diffusion model to follow specific rewards (like "make this image more aesthetic" or "ensure this molecule is stable") is notoriously difficult. Standard Reinforcement Learning (RL) techniques like PPO struggle because calculating the necessary "KL-divergence" (a measure of how much the model has drifted from its original state) is mathematically intractable for diffusion processes.

In this paper, researchers from Google DeepMind and academic partners introduce P-GRAFT and Inverse Noise Correction, two novel methods that leverage the intermediate steps of the denoising process to make fine-tuning more stable, efficient, and effective.

TL;DR

The authors show that fine-tuning diffusion models at intermediate noise levels—rather than just the final output—balances a crucial bias-variance tradeoff, leading to superior performance. They also introduce a way to "fix" pre-trained flow models by learning a corrected initial noise distribution, improving image quality while actually reducing computational costs.

What Problem Does This Paper Address?

Generative models often need "alignment"—adjusting a pre-trained model to better suit a specific task or human preference. In Large Language Models (LLMs), we use RLHF. In diffusion models, however, we hit a wall: the marginal likelihoods needed for standard KL-regularized RL are impossible to compute directly.

Existing workarounds, like "trajectory KL," often lead to unstable training or subpar results. While rejection sampling (picking the best of $N$ samples) is a popular alternative, its theoretical connection to reward maximization in diffusion models wasn't fully understood. Furthermore, most methods only look at the final generated image, ignoring the rich information available in the intermediate noisy versions of that image.

Methods

1. GRAFT (Generalized Rejection sAmpling Fine-Tuning)

The authors first unify existing rejection sampling methods (like RAFT and Best-of-N) into a single framework called GRAFT. They prove a key theoretical result: GRAFT implicitly performs KL-regularized reward maximization. This provides a solid mathematical foundation for using rejection sampling as a fine-tuning tool.

2. P-GRAFT (Partial-GRAFT)

The core innovation is P-GRAFT. Instead of fine-tuning the model on the final data distribution ($X_0$), P-GRAFT shapes the distribution at an intermediate noise level ($X_t$).

Reward distributions at intermediate noise levels
  • The Intuition: During training, the model learns to denoise. Learning to denoise pure noise is "easy" (low bias) but the rewards are "noisy" because many different images could come from that noise (high variance). Learning to denoise a nearly finished image is "hard" because the model is already very specialized (high bias), but the rewards are very accurate (low variance).
  • The Solution: By picking an intermediate step (e.g., 25% of the way through the denoising process), P-GRAFT finds the "sweet spot" in this bias-variance tradeoff.

3. Inverse Noise Correction

For "flow models" (a deterministic cousin of diffusion), the authors propose a reward-free correction method.

Trajectories and distributions in Inverse Noise Correction

Since flow models are reversible, if a model has a slight "learning error," you can run it backward from a real image to find the "inverse noise." By training a small adapter to transform standard Gaussian noise into this "corrected" noise, you can cancel out the model's errors during generation.

Datasets

The authors evaluated their methods across four distinct domains:

  • Text-to-Image (T2I): Fine-tuning Stable Diffusion v2 using GenAI-Bench, T2ICompBench++, and GenEval.
  • Layout Generation: Using the PubLayNet dataset to improve how models arrange elements on a page.
  • Molecule Generation: Using the QM9 dataset, where the "reward" is the chemical stability of the generated molecule.
  • Unconditional Image Generation: Using CelebA-HQ (faces) and LSUN-Church to test Inverse Noise Correction.

Key Insights and Ideas

  • The Bias-Variance Tradeoff: This is the "aha" moment. The paper mathematically demonstrates that the score function (what the model learns) becomes exponentially simpler and easier to learn at higher noise levels. P-GRAFT exploits this by shifting the learning target to a point where the model can actually improve without getting stuck.
  • Reversibility as a Feature: In flow models, the ability to go perfectly backward from an image to noise is usually used for editing. Here, it’s used as a diagnostic tool to find and fix the model's inherent "drift" or bias.
  • Efficiency: P-GRAFT doesn't just work better; it's often more compute-efficient than policy gradient methods like DDPO because it avoids backpropagating through the entire denoising chain for every sample.

Key Results

  • T2I Superiority: P-GRAFT (at the $0.25N$ timestep) outperformed the base Stable Diffusion v2, SDXL-Base, and the popular DDPO method across all benchmarks. It showed an 8.81% relative improvement in VQAScore over the base model.
  • Molecule Stability: In molecule generation, P-GRAFT achieved a stability score of 92.61%, significantly higher than the baseline (90.50%) and GRAFT (90.76%), while requiring 9x fewer sampling rounds than standard GRAFT.
  • Faster, Better Images: Inverse Noise Correction improved the FID (image quality metric) on CelebA-HQ from 11.93 to 8.02. Crucially, it allowed the model to achieve better quality in 200 steps than the original model could in 1000 steps, representing a massive reduction in FLOPs per image.

Limitations and Future Work

  • Hyperparameter Sensitivity: While the paper suggests $0.25N$ is a good intermediate step, the optimal "sweet spot" for the bias-variance tradeoff likely varies depending on the specific model and reward function.
  • Corrector Overhead: Inverse Noise Correction requires training a separate (though smaller) "Noise Corrector" model.
  • Discrete vs. Continuous: While the authors show the method extends to discrete-continuous models (like IGD), further exploration into purely discrete state spaces (like some language models) remains for future work.

The authors conclude that shaping intermediate distributions is a powerful, theoretically grounded lever for aligning generative models that has been largely overlooked until now.

Summary updated

BibTeX
@inproceedings{anil2026fine,
  author = {Gautham Govind Anil and Shaan Ul Haque and Nithish Kannen and Dheeraj Mysore Nagaraj and Sanjay Shakkottai and Karthikeyan Shanmugam},
  title = {{Fine-Tuning Diffusion Models via Intermediate Distribution Shaping}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=DYjyFDn8K7},
}
Figure