TL;DR
This paper introduces a novel reinforcement learning (RL) framework for visual generative models that uses "distribution-wise rewards" instead of traditional "sample-wise rewards." This new approach significantly improves image quality and diversity by better aligning generated data with real-world distributions, overcoming issues like "reward hacking" and mode collapse.
What Problem Does This Paper Address?
Generating realistic and diverse images is a core goal of modern AI. While reinforcement learning has shown promise in fine-tuning these generative models to align with human preferences, a common pitfall is "reward hacking." This happens when the model learns to exploit flaws in the reward function, leading to generated images that might score well according to the reward but are visually anomalous or lack diversity. Existing methods often use sample-wise rewards, evaluating each generated image individually. This can cause the model to collapse into generating only a few types of images (mode collapse) or introduce unwanted artifacts. The paper aims to address this by developing a reward mechanism that considers the overall distribution of generated images, ensuring they better match the real data distribution.
Methods
The core innovation is the use of distribution-wise rewards for RL fine-tuning. Instead of evaluating individual samples, this approach assesses how well the entire set of generated samples matches the real data distribution.
To make this computationally feasible, they introduce a subset-replace strategy:
- Reference Set Generation: A set of images is generated using the current model.
- Subset Replacement: A small portion of this reference set is randomly replaced with newly generated samples.
- Reward Calculation: The Fréchet Inception Distance (FID) is calculated between this partially updated reference set and the ground truth distribution. The negative FID score serves as the reward. This strategy significantly reduces the computational cost compared to calculating FID on a massive set of samples.
To further address a train-inference inconsistency issue (where models trained with stochastic methods perform poorly with deterministic inference), they propose a post-hoc model merging with RL approach. Instead of directly fine-tuning the generative model, they use RL to optimize the coefficients for merging multiple pre-trained model checkpoints. This decouples the RL optimization from the stochastic denoising process, allowing for ODE-based inference.
Datasets
- ImageNet (256x256 and 512x512): Used for training and evaluating the generative models.
Key Insights and Ideas
- Distribution-wise rewards are crucial for diversity: Sample-wise rewards can lead to "reward hacking," where models optimize for superficial metrics rather than true distributional alignment, resulting in less diverse and often artifact-ridden outputs.
- Subset-replace strategy makes distribution-wise rewards practical: Calculating FID on massive datasets is prohibitive. Their clever subset-replacement technique allows for efficient, dense reward signals, making distribution-wise RL feasible.
- Post-hoc model merging is key to bridging SDE/ODE gap: The common practice of using SDEs for RL exploration creates a mismatch with ODE-based inference. Optimizing model merging coefficients with RL, rather than directly fine-tuning the generator, resolves this train-inference inconsistency.
- RL can optimize model merging better than grid search: Their approach demonstrates that RL can find superior model merging weights compared to traditional methods like grid search, leading to further performance gains.
Key Results
- Significant FID improvements:
- For SiT (a diffusion model), FID-50K improved from 8.30 to 5.77.
- For EDM2 (another generative model), FID-50K improved from 3.74 to 3.52 (EDM2-XS) and 2.57 to 2.52 (EDM2-S) using the post-hoc merging approach.
- Enhanced perceptual quality and diversity: Qualitative evaluations showed that their method significantly mitigates visual artifacts and preserves sample diversity, as visualized in the provided figures.
- Reduced computational cost: The subset-replace strategy makes distribution-wise reward calculation efficient, with FID computation being only 8.0% of the total step time.
Limitations and Future Work
- Class-conditional focus: Current experiments are limited to class-conditional ImageNet generation. Extending the subset-replace strategy to open-vocabulary text-to-image settings requires further research on constructing representative reference sets without predefined class labels.
- Hyperparameter tuning: The reference set regeneration interval and size were tuned via ablation. Developing adaptive scheduling mechanisms for these parameters could further improve efficiency.
- Future work: The authors suggest exploring adaptive scheduling for reference set parameters and extending the framework to open-vocabulary generation.
Summary updated