TL;DR
This paper introduces "Diffusion-Sharpening," a novel fine-tuning method for diffusion models that optimizes the entire sampling trajectory, not just individual timesteps. This approach leads to faster training, more efficient inference, and improved generation quality across various metrics, outperforming existing methods without increasing computational cost.
What Problem Does This Paper Address?
Diffusion models have achieved remarkable success in generative tasks like text-to-image synthesis. However, fine-tuning these models to align with nuanced user preferences and specific objectives remains a significant challenge. Existing methods fall into two main categories:
- Reinforcement Learning (RL)-based fine-tuning: These methods typically focus on optimizing a single timestep's output, neglecting the crucial aspect of aligning the entire sequence of denoising steps (the trajectory). This can lead to suboptimal overall generation quality.
- Sampling Trajectory Optimization: These methods aim to improve generation by optimizing the sampling trajectory itself. While effective, they often incur prohibitively high computational costs during inference, making them impractical for real-world applications.
The authors aim to bridge this gap by developing a method that optimizes sampling trajectories for better alignment and quality, while simultaneously achieving efficient training and inference.
Methods
The core innovation is Diffusion-Sharpening, a fine-tuning framework that optimizes sampling trajectories by leveraging reward feedback. The key ideas are:
- Trajectory-Level Optimization: Instead of focusing on single timesteps, Diffusion-Sharpening considers the entire denoising path.
- Path Integral Framework: The method uses a path integral framework to select optimal trajectories during training. This involves computing rewards along sampled trajectories and guiding the model to favor those with higher cumulative rewards.
- Amortized Inference Costs: By optimizing trajectories during training, the method aims to achieve better inference efficiency without requiring additional computational steps at inference time.
- Two Implementations:
- SFT-Diffusion-Sharpening: This variant uses a pre-existing image-text dataset for supervised fine-tuning. It filters high-reward samples and applies standard supervised learning, but crucially, it considers the entire trajectory for optimization, unlike previous SFT methods.
- RLHF-Diffusion-Sharpening: This variant employs online methods to generate positive and negative samples from denoising outputs. It uses a reward model to identify the best and worst trajectories and optimizes using a DPO (Direct Preference Optimization) loss, eliminating the need for curated preference datasets.
The method also leverages techniques from EDM (Karras et al., 2022) to approximate the posterior distribution of the initial noise ($x_0$) from intermediate states ($x_t$), which is crucial for reward evaluation along the trajectory.
Datasets
The paper utilizes several datasets for training and evaluation:
- JourneyDB (Pan et al., 2023): A large-scale dataset of high-resolution images with detailed text descriptions, used for multi-modal training.
- Text-to-Image-2M (zk, 2024): A curated text-image pair dataset for fine-tuning text-to-image models.
- Pokemon-Blip (lambdalabs, 2023): A dataset of Pokémon images with BLIP-generated captions, used for evaluating adaptation and convergence.
- DiffusionDB (Wang et al., 2022): A large-scale text-to-image prompt dataset for understanding prompt-generation interplay.
- DrawBench (Saharia et al., 2022): A benchmark for evaluating text-to-image models on complex prompts and generating realistic images.
Key Insights and Ideas
- The importance of trajectory-level alignment: The paper strongly argues that optimizing individual timesteps is insufficient for achieving high-quality, aligned generations. The entire denoising path plays a critical role.
- Amortizing inference costs through training: By integrating trajectory optimization into the training process, Diffusion-Sharpening achieves better inference performance without the typical computational overhead associated with sampling trajectory optimization methods.
- Flexibility in reward models: The proposed framework can work with various reward models, including CLIP Score, compositional rewards, MLLM graders, and human preferences, demonstrating its broad applicability.
- RLHF-Diffusion-Sharpening eliminates dataset curation: This variant is particularly impactful as it bypasses the need for large, manually curated preference datasets, which are often expensive and time-consuming to create.
Key Results
- Faster Training: Diffusion-Sharpening achieves faster convergence compared to standard fine-tuning, typically within 500-1000 steps, while baselines require 1000-1500 steps. The training curves are smoother and reach a lower final loss.
- Superior Inference Efficiency: The method achieves comparable or better performance than baseline SDXL with the same inference time (NFE), while sampling trajectory optimization methods require significantly more NFE (e.g., 10,000+ NFE for Demon and Inference Scaling) to achieve similar results, making them impractical.
- Outperforms Baselines: Diffusion-Sharpening consistently outperforms RL-based fine-tuning methods (e.g., Diffusion-DPO, DDPO, D3PO, IterPO) and sampling trajectory optimization methods (e.g., Demon, Free²Guide, Inference Scaling) across diverse metrics, including CLIP Score, Aesthetic Score, ImageReward, MLLM, and human preferences.
- For example, RLHF-Diffusion-Sharpening achieves the highest CLIP Score (0.338), ImageReward (1.445), and MLLM (0.921) scores in Table 1.
- Qualitative Improvements: Figure 3 and Figures 9-10 showcase generated images that exhibit better text alignment, compositional capabilities, and overall quality across different reward models.
Limitations and Future Work
- Computational Cost of Sampling Trajectories: While Diffusion-Sharpening amortizes inference costs, the training process still involves sampling multiple trajectories, which can be computationally intensive. The paper analyzes the trade-off between the number of samples and steps for optimal performance.
- Dependence on Reward Model Quality: The performance of Diffusion-Sharpening is inherently tied to the quality and accuracy of the chosen reward model.
- Future Work: The authors suggest exploring more advanced reward models and further optimizing the training process for even greater efficiency. The framework's adaptability to other generative models beyond diffusion models could also be an area for future research.
Summary updated