Fine-tuning large-scale generative models to match human "vibes" and preferences is the frontier of AI research. While Large Language Models (LLMs) have mastered this via Reinforcement Learning from Human Feedback (RLHF), applying similar techniques to diffusion models for image generation has remained notoriously slow and inefficient.
At ICLR 2024, researchers from Google DeepMind introduced DRaFT (Direct Reward Fine-Tuning), a method that skips the complexities of reinforcement learning to optimize diffusion models directly using the gradients of reward functions.
The Problem: Moving Beyond "Average" Pixels
Standard diffusion models, such as Stable Diffusion, are trained to recreate their training data—usually massive, uncurated scrapes of the internet. Consequently, they often inherit the "average" quality of the web rather than producing the high-quality, aesthetically pleasing images users actually want.
To fix this, researchers typically use Reinforcement Learning (RL). However, RL is "gradient-free" regarding the reward function; it treats the reward as a black box. This is incredibly sample-inefficient for images. If we have a differentiable reward model (like a neural network that predicts how much a human likes an image), why not use its gradients to tell the diffusion model exactly how to change its weights? DRaFT tackles the technical hurdles of doing exactly that.
Methodology: Direct Reward Fine-Tuning
The core idea behind DRaFT is to treat the entire diffusion sampling chain as a differentiable function. The researchers proposed three main variants to balance performance and computational efficiency:
- DRaFT (Full): The reward is calculated on the final generated image, and gradients are backpropagated through all $T$ sampling steps. To make this memory-feasible, the authors use Low-Rank Adaptation (LoRA) and gradient checkpointing.
- DRaFT-K: Backpropagating through the full chain often leads to numerical instability and "exploding gradients." DRaFT-K truncates the process, only backpropagating through the last $K$ steps of the denoising process.
- DRaFT-LV (Low Variance): For the most efficient case where $K=1$, the gradient estimates can be noisy. DRaFT-LV reduces this variance by taking the generated image, adding multiple different noise samples to it, and averaging the gradients across those samples.
Key Insights and Results
The researchers evaluated DRaFT using prominent reward models, including the LAION Aesthetics Predictor, PickScore, and HPSv2 (Human Preference Score v2).
- Efficiency and Speed: Differentiability is a superpower. By using gradients, DRaFT-LV is roughly 2x faster than previous gradient-based methods (like ReFL) and over 200x faster than RL-based methods (like DDPO) for certain tasks.
- Less is More: Surprisingly, backpropagating through only the very last step ($K=1$) often performs better than backpropagating through the whole chain. It avoids the numerical instability of long chains while still providing enough signal to update the model weights effectively.
- Global Impact from Local Gradients: Even though DRaFT-1 only "sees" the last step during training, the learned LoRA weights are applied to every step during inference. This results in a holistic shift in the model's behavior across the entire denoising process.
- Versatility: Beyond aesthetics, DRaFT can be used to optimize for other differentiable metrics. The authors demonstrated its ability to make images more compressible (JPEG reward), add or remove specific objects (using an OWL-ViT detection reward), or even create adversarial images.
Limitations and Future Work
Like all preference-tuning methods, DRaFT is susceptible to reward hacking. If pushed too far, the model finds ways to maximize the reward score that degrade actual visual quality (e.g., over-saturating colors or collapsing into weird textures). The authors suggest LoRA scaling as a partial mitigation strategy.
Furthermore, DRaFT strictly requires the reward function to be differentiable. While many modern reward models are neural networks, non-differentiable rewards (like certain hard-coded safety filters) still necessitate RL approaches. Finally, fine-tuning heavily on a specific aesthetic can cause the model to over-generalize, potentially "forgetting" how to generate simpler styles when explicitly prompted.
Ultimately, DRaFT represents a significant step toward making the alignment phase of generative AI as efficient as the initial training. It paves the way for highly personalized or task-specific image models that can be trained in hours rather than days.
Summary updated