Introduction
High-fidelity image generation has long been a cornerstone of computer vision research, yet it remains a challenging balancing act between computational efficiency and visual quality. Traditional approaches often fall into two camps: Autoregressive (AR) models, which offer high-quality results but suffer from sequential biases and massive parameter counts, and Continuous Diffusion Models (DDPM), which capture global context but are computationally prohibitive due to their operation in high-resolution pixel space.
VQ-DDM (Vector Quantised Discrete Diffusion Model) introduces a novel middle ground. By applying a discrete diffusion process to the latent space of a Vector Quantised Variational AutoEncoder (VQ-VAE) and optimizing the codebook through a "ReFiT" strategy, the authors achieve state-of-the-art results with significantly reduced complexity.
The Limitations of Current Architectures
Generating images typically involves navigating the "trap of lacking global information" or the "excessive time" requirements of iterative sampling.
- Autoregressive Models: Models like PixelCNN or Transformers predict latent codes sequentially. This "progressive scan" (top-left to bottom-right) creates a directional bias, making it difficult for the model to capture global relationships effectively. Furthermore, these models often scale to billions of parameters to maintain quality.
- Continuous Diffusion Models: These models generate images by reversing a Gaussian noise-adding process. While they excel at capturing global structure, they operate directly on pixel space, requiring thousands of sampling steps across high-dimensional data, which is extremely slow.
The VQ-DDM Framework
VQ-DDM addresses these issues by operating in a two-stage pipeline that combines efficient compression with parallelized latent generation.
Stage 1: Discrete Representation and ReFiT
The first stage compresses an image into a $16 \times 16$ grid of discrete latent codes using a VQ-VAE. A common failure mode in VQ-VAEs is "codebook collapse," where a large portion of the available codes remain unused or "dead." To combat this, the authors introduce ReFiT (Re-build and Fine-tune). This strategy uses k-means clustering on sampled image features to rebuild a high-utilization codebook, followed by a decoder fine-tuning phase. This process ensures that nearly every entry in the codebook contributes to the final image reconstruction.
Stage 2: Discrete Diffusion
Instead of predicting codes one-by-one, VQ-DDM uses a Discrete Diffusion Model to predict the joint distribution of the latent grid. Unlike continuous diffusion, this process uses a transition matrix to gradually replace latent codes with a "mask" or uniform noise. During generation, the model starts from pure noise and iteratively recovers the global structure of the $16 \times 16$ grid in parallel, allowing it to "see" the entire image context at every step.
Key Insights: Global Context and Codebook Efficiency
- Eliminating Directional Bias: Because the diffusion process updates the entire latent grid simultaneously, it removes the scan-order constraints of AR models. This is particularly beneficial for tasks like image inpainting, where the model can leverage context from any direction (top, bottom, or sides) to fill in missing regions.
- The Power of ReFiT: The authors found that codebook quality is a primary bottleneck for generative performance. ReFiT increased codebook usage from approximately 32% to over 97%, allowing a small codebook (e.g., 512 entries) to outperform much larger, poorly-utilized ones. On CelebA-HQ, ReFiT alone reduced the reconstruction FID from 10.18 to 5.64.
- Latent Space Acceleration: By performing diffusion on a compressed $16 \times 16$ grid rather than a $256 \times 256$ pixel grid, VQ-DDM is 10 to 100 times faster than standard pixel-space diffusion models.
Experimental Results
VQ-DDM was evaluated on CelebA-HQ, LSUN-Church, and ImageNet, demonstrating exceptional efficiency and quality.
- Efficiency: VQ-DDM achieves competitive results with only 120M parameters, significantly outperforming VQ-VAE-2 models that utilize nearly 10B parameters.
- Generation Quality: On CelebA-HQ ($256 \times 256$), the model achieved an FID score of 13.2, placing it among top-tier likelihood-based models despite its lower complexity.
- Inpainting: The model's ability to capture global relationships allows it to handle arbitrary masks without specialized training, a task where AR models frequently struggle if the missing data is "downstream" in the sequence.
Conclusion and Future Work
VQ-DDM successfully bridges the gap between the efficiency of latent space modeling and the high-quality global context of diffusion processes. While it still requires more sampling steps than "one-shot" GANs, its speed and parameter efficiency mark a significant step forward. Future work may extend this discrete diffusion approach to other modalities, such as audio and video, where global temporal context is equally critical.
Summary updated