Abstract: Vector quantized diffusion (VQ-Diffusion) is a powerful generative model for text-to-image synthesis, but it can suffer from low-quality samples or weak text-image correlation. We identify these issues as stemming from flawed sampling strategies: the "posterior issue" and the "joint distribution issue." This paper proposes two techniques to address these: a novel implementation of discrete classifier-free guidance and a high-quality inference strategy. Our improved VQ-Diffusion achieves state-of-the-art results, including an 8.44 FID score on MSCOCO and a dramatic improvement from 11.89 to 4.83 FID on ImageNet.
Introduction: The Challenges of Discrete Diffusion
While continuous diffusion models have seen widespread adoption, discrete diffusion models like VQ-Diffusion offer unique advantages by operating on a finite vocabulary of image tokens. This allows for exact probability estimation. However, vanilla VQ-Diffusion faces two primary hurdles:
- The Posterior Issue: The model often relies too heavily on noisy image data, effectively "ignoring" the text prompt. This leads to images that are visually coherent but fail to match the user's description.
- The Joint Distribution Issue: During denoising, the model predicts tokens independently. Without spatial coordination, this results in "glitchy" or inconsistent global structures.
Methodology: Enhancing Guidance and Inference
To overcome these limitations, we introduce two core improvements to the sampling process.
1. Discrete Classifier-Free Guidance (CFG)
In continuous diffusion, CFG is used to amplify the influence of the conditioning signal. We mathematically derive a version of CFG specifically for discrete latent spaces. Unlike standard approaches that use an empty string for unconditional generation, we employ a learnable vector to represent the null condition. This allows the model to better approximate the underlying image distribution and provides a more effective gradient for guidance.
As shown in the figure above, adjusting the classifier-free scale allows for a fine-tuned trade-off between image quality (QS) and diversity (DS), significantly improving FID scores compared to baseline settings.
2. High-Quality Inference Strategy
To address spatial inconsistencies, we propose a two-part sampling refinement:
- Fewer Tokens Sampling: By reducing the number of tokens predicted at each step and increasing the total number of steps, the model has more opportunities to correct spatial errors and ensure global consistency.
- Purity Prior Sampling: We discovered that "purity" (the maximum probability assigned to a token) is a highly reliable indicator of prediction accuracy.
Our empirical analysis (visualized above) confirms that accuracy increases linearly with purity across various time steps. By prioritizing the sampling of high-purity tokens first, the model establishes reliable "anchors" that guide the generation of more complex regions.
Experimental Results
We evaluated the improved VQ-Diffusion across several benchmarks, including MSCOCO, ImageNet, and a massive new 200-million-pair dataset (ITHQ-200M). The quantitative gains are substantial:
- MSCOCO: FID improved from 13.86 to 8.44 (a 39% reduction).
- ImageNet: FID slashed from 11.89 to 4.83.
- Human Evaluation: Qualitative tests confirm that the model produces sharper details and adheres more strictly to complex text prompts.
Conclusion
By addressing the fundamental sampling flaws in discrete diffusion models, we have significantly closed the performance gap with continuous models. The combination of discrete classifier-free guidance and purity-based inference transforms VQ-Diffusion into a highly robust and competitive framework for high-fidelity text-to-image synthesis.
Summary updated