Improving GFlowNets for Text-to-Image Diffusion Alignment

Dinghuai Zhang, Yizhe Zhang, Jiatao Gu, Ruixiang Zhang, Joshua M. Susskind, Navdeep Jaitly, Shuangfei Zhai

Introduction

Text-to-image diffusion models have revolutionized generative AI, yet aligning these models with specific human preferences remains a significant challenge. Standard fine-tuning often relies on Reinforcement Learning (RL) to optimize models against reward functions, such as aesthetic scorers. However, traditional RL methods like PPO or DDPO frequently suffer from two major hurdles: extreme sample inefficiency and "mode collapse," where the model loses its creative diversity in pursuit of a single high-reward output.

The DAG Framework

To address these limitations, researchers from Apple introduced Diffusion Alignment with GFlowNets (DAG). This framework reformulates the denoising process as a Generative Flow Network (GFlowNet). Unlike standard RL, which seeks to find a single "best" image, DAG treats the denoising trajectory as a Markov Decision Process where the goal is to sample images with a probability proportional to their reward. This fundamental shift allows the model to explore a wider variety of high-quality outputs while maintaining the inherent diversity of the original diffusion model.

Key Innovations

The DAG framework introduces two primary training objectives: DAG-DB (Detailed Balance) and DAG-KL. The latter is a novel contribution that reformulates the GFlowNet objective into a KL-divergence minimization problem. This allows researchers to leverage established RL optimization machinery, such as importance sampling and PPO-style clipping, to enhance training stability and performance.

A critical component of DAG is the Denoising-Specific Forward-Looking (FL) reward mechanism. Because intermediate noisy states in a diffusion process lack semantic meaning for standard reward models, DAG uses the model’s internal prediction of the final clean image ($\hat{x}_0$) at each step. This provides a consistent and informative reward signal throughout the entire generation trajectory, drastically reducing gradient variance and accelerating convergence.

Experimental Results

The researchers evaluated DAG using Stable Diffusion v1.5 across several benchmarks, including HPSv2 (Human Preference Score), ImageReward, and LAION Aesthetics.

Quantitative Performance and Efficiency

DAG demonstrated superior sample efficiency compared to state-of-the-art RL baselines like DDPO. In evaluations using the HPSv2 metric, DAG-KL reached significantly higher reward plateaus in fewer training steps, demonstrating its ability to align more effectively with human preferences.

DAG-KL achieves significantly higher HPSv2 rewards compared to DDPO over the same number of training steps.

Qualitative and Diversity Gains

Beyond numerical scores, DAG-trained models produce images that are more vibrant and better aligned with complex spatial prompts. Crucially, DAG avoids the mode collapse typical of RL. By sampling proportional to reward, the model preserves the ability to generate diverse interpretations of a single prompt, maintaining the "creative" utility of the diffusion model.

Qualitative comparison showing the transition from standard diffusion outputs (top) to high-reward, aligned outputs (bottom) generated via DAG.

Conclusion

Diffusion Alignment with GFlowNets represents a significant step forward in fine-tuning generative models. By bridging the gap between RL and GFlowNet theory, DAG provides a robust, efficient, and diversity-preserving method for aligning large-scale diffusion models with human intent. Future work will focus on optimizing memory usage for multi-step transitions and exploring the integration of differentiable rewards.

Summary updated

BibTeX
@article{zhang2025improving,
  author = {Dinghuai Zhang and Yizhe Zhang and Jiatao Gu and Ruixiang Zhang and Joshua M. Susskind and Navdeep Jaitly and Shuangfei Zhai},
  title = {{Improving GFlowNets for Text-to-Image Diffusion Alignment}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure