Scaling Image Tokenizers with Grouped Spherical Quantization

Jiangtao Wang, Zhen Qin, Yifan Zhang, Vincent Tao Hu, Björn Ommer, Rania Briq, Stefan KesselheimarXiv 2024 · DOI

Introduction

Modern generative models rely on image tokenizers to compress high-resolution images into discrete visual sequences. However, existing methods often struggle with the "curse of dimensionality" during aggressive compression (e.g., 16× or 32× downsampling) and suffer from codebook collapse, where much of the model's capacity remains unused. This paper introduces Grouped Spherical Quantization (GSQ), a novel approach that stabilizes and scales image tokenization by normalizing latent vectors onto a spherical surface and decomposing them into smaller, manageable groups.

Methodology: Grouped Spherical Quantization

GSQ addresses the limitations of standard Vector Quantization (VQ) through three primary innovations:

  1. Spherical Constraints: By initializing and regularizing codebook vectors onto a unit sphere using $\ell_2$ normalization, GSQ ensures stable distance calculations (cosine similarity). This approach leads to 100% codebook utilization from the start of training, eliminating the "dead code" problem.
  2. Grouped Decomposition: To handle high-dimensional latents without falling into the "equidistance" trap of high-dimensional Euclidean space, GSQ partitions large vectors into $G$ smaller sub-vectors. Quantization is performed on these lower-dimensional sub-spaces, maintaining high representational capacity while keeping the lookup process efficient.
  3. Optimized Training Recipe: The authors streamlined the training process by identifying the most effective components, such as the Dino Discriminator, and removing unnecessary auxiliary losses like entropy loss.

Experimental Results

The models were evaluated on ImageNet at 128×128 and 256×256 resolutions. GSQ demonstrates significant improvements in both reconstruction quality and training efficiency.

State-of-the-Art Reconstruction

At 16× spatial downsampling, GSQ-GAN achieves a record-low reconstruction FID (rFID) of 0.50, substantially outperforming previous state-of-the-art methods like MagVit2 and LlamaGen.

Comparison of rFID across various image tokenization methods on ImageNet 256x256. GSQ (Ours) achieves the lowest rFID at G=8.

Training Efficiency and Scalability

A key advantage of GSQ is its rapid convergence. The method achieves superior results in just 20 epochs, compared to the 270+ epochs required by competing methods. This efficiency is attributed to the spherical constraint, which creates a more favorable optimization landscape.

Training dynamics of GSQ compared to other quantization methods. GSQ (G=8) converges faster and to a lower rFID than RVQ, FSQ, and standard VQ.

Furthermore, GSQ enables extreme compression ratios. The authors successfully trained a 32× downsampling tokenizer—a task where traditional VQ-GANs typically fail to produce recognizable reconstructions. At 8× downsampling, the results are virtually indistinguishable from the original images, with an rFID of 0.03.

Key Insights

  • Dimensionality Management: Lower-dimensional latent spaces or grouped high-dimensional spaces are more effective for quantization. GSQ's grouping mechanism prevents the "equidistance" problem that plagues standard high-dimensional VQ.
  • Simplified Architectures: Extensive ablations revealed that many common "tricks," such as complex learning rate decays or Adaptive Group Norm, often hinder performance. A constant learning rate and a simplified architecture yielded the best results.

Conclusion and Future Work

GSQ provides a robust and efficient framework for scaling image tokenizers. While it sets new benchmarks for reconstruction quality, future research will focus on integrating GSQ tokens into large-scale autoregressive and diffusion-based generative pipelines to evaluate their impact on downstream image synthesis tasks.

Summary updated

BibTeX
@misc{wang2024scaling,
  author = {Jiangtao Wang and Zhen Qin and Yifan Zhang and Vincent Tao Hu and Björn Ommer and Rania Briq and Stefan Kesselheim},
  title = {{Scaling Image Tokenizers with Grouped Spherical Quantization}},
  year = {2024},
  eprint = {2412.02632},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.02632},
}
Figure