Abstract
This paper provides a comprehensive theoretical and practical framework for fine-tuning diffusion models using Reinforcement Learning (RL). By framing the denoising process as a sequential decision-making problem, the authors demonstrate how various RL algorithms—ranging from Proximal Policy Optimization (PPO) to Path Consistency Learning—can steer generative models toward maximizing specific downstream rewards, such as protein stability or image aesthetics, while preserving the quality of the original pre-trained distribution.
Introduction
Diffusion models have demonstrated an exceptional ability to mimic complex training data distributions. However, many scientific and engineering tasks require more than just high-fidelity replication; they require the optimization of specific properties. For instance, a biologist may seek DNA sequences with high cell-specificity, or a chemist may require molecules with high docking scores.
Standard fine-tuning methods, such as retraining on high-reward subsets, are often constrained by limited data availability. Conversely, rejection sampling is computationally inefficient. This paper addresses these challenges by providing a principled framework to "nudge" pre-trained diffusion models toward high-reward regions without sacrificing the structural knowledge acquired during pre-training.
Methodology: Denoising as an MDP
The authors unify various fine-tuning techniques under the umbrella of Entropy-Regularized Markov Decision Processes (MDPs). In this framework, each step of the iterative denoising process is treated as an "action" taken by an RL agent. The optimal fine-tuned distribution is shown to be a Gibbs distribution: $p_r(x) \propto \exp(r(x)/\alpha) p_{pre}(x)$, where the reward $r(x)$ is balanced against the pre-trained prior $p_{pre}(x)$.
Taxonomy of Approaches
The paper categorizes fine-tuning strategies based on their constraints and the nature of the reward function:
- Non-Distribution-Constrained Approaches: These focus primarily on reward maximization.
- Soft PPO: Adapts Proximal Policy Optimization for diffusion, offering stability for non-differentiable "black-box" rewards.
- Direct Reward Backpropagation: Utilized when the reward function is differentiable, allowing gradients to flow directly through the denoising chain for faster convergence.
- Distribution-Constrained Approaches: These ensure the model stays close to the original distribution to prevent mode collapse.
- Reward-Weighted MLE: Employs weighted maximum likelihood to maintain proximity to the prior.
- Value-Weighted Sampling: An inference-time technique that uses a learned value function to steer the model without altering its weights, effectively unifying RL with "Classifier Guidance."
- Path Consistency Learning (PCL): Ensures consistency across the entire denoising trajectory, revealing a fundamental link between RL losses and Gflownet objectives.
Applications and Datasets
The tutorial provides a unified perspective on several high-impact domains:
- Biology: Optimizing DNA/RNA sequences for translation efficiency and cell-specificity, and protein sequences for stability.
- Chemistry: Generating small molecules with high QED (Quantitative Estimate of Drug-likeness) and SA (Synthetic Accessibility) scores.
- Computer Vision: Enhancing image generation for aesthetic scores and human-alignment.
The authors have released a tutorial implementation for biological sequence generation to facilitate further research in these areas.
Key Insights
- Theoretical Unification: The paper bridges the gap between Diffusion, RL, and Gflownets by showing how their respective loss functions (e.g., Trajectory Balance and Path Consistency) are mathematically related.
- The Offline Challenge: In scenarios with static reward datasets, models can be misled by out-of-distribution samples that appear high-reward but are actually poor. The authors suggest "pessimistic" strategies to mitigate this risk.
- Guidance as RL: The staple technique of "Classifier Guidance" is formally identified as a specific case of value-weighted sampling within the RL framework.
Limitations and Future Work
Despite the promise of RL-based fine-tuning, several challenges remain. The methods can be computationally intensive compared to standard supervised training. Furthermore, the success of fine-tuning is heavily dependent on the accuracy of the reward model; inaccurate models can lead to "reward hacking," where the diffusion model exploits flaws in the reward function rather than learning the desired properties. Future research may explore more general $f$-divergences to better control the deviation from pre-trained states and improve scalability in high-dimensional spaces.
Summary updated