NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Factorized Visual Tokenization and Generation

Zechen Bai, Jianxiong Gao, Ziteng Gao, Pichao Wang, Zheng Zhang, Tong He, Mike Zheng ShouarXiv 2024

Abstract: Visual tokenizers are fundamental to image generation. They convert visual data into discrete tokens, enabling transformer-based models to excel at image generation. Despite their success, VQ-based tokenizers like VQGAN face significant limitations due to constrained vocabulary sizes. Simply expanding the codebook often leads to training instability and diminishing performance gains, making scalability a critical challenge. In this work, we introduce Factorized Quantization (FQ), a novel approach that revitalizes VQ-based tokenizers by decomposing a large codebook into multiple independent sub-codebooks. This factorization reduces the lookup complexity of large codebooks, enabling more efficient and scalable visual tokenization. To ensure each sub-codebook captures distinct and complementary information, we propose a disentanglement regularization that explicitly reduces redundancy, promoting diversity across the sub-codebooks. Furthermore, we integrate representation learning into the training process, leveraging pretrained vision models like CLIP and DINO to infuse semantic richness into the learned representations. This design ensures our tokenizer captures diverse semantic levels, leading to more expressive and disentangled representations. Experiments show that the proposed FQGAN model substantially improves the reconstruction quality of visual tokenizers, achieving state-of-the-art performance. We further demonstrate that this tokenizer can be effectively adapted into auto-regressive image generation.

Introduction

In modern generative AI, visual tokenizers such as VQGAN serve as the essential bridge between continuous pixel space and the discrete token sequences required by Transformer architectures. To improve image fidelity, a common strategy is to increase the tokenizer's vocabulary, or codebook size. However, traditional Vector Quantization (VQ) approaches encounter a "codebook bottleneck": as the number of entries exceeds approximately 16,000, training stability degrades, code utilization drops (the "dead code" problem), and performance gains plateau. This research introduces Factorized Quantization (FQ) and the FQGAN model to overcome these scalability limitations, enabling high-fidelity reconstruction and efficient generation.

Methodology

The FQGAN framework revitalizes VQ-based tokenization through three primary innovations designed to scale codebooks without the typical stability issues.

Factorized Quantization (FQ)

Instead of relying on a single monolithic codebook, FQ decomposes the representation into $k$ independent sub-codebooks. For every image patch, the model predicts $k$ tokens simultaneously. This "divide-and-conquer" approach exponentially increases the conceptual codebook size while significantly reducing the computational complexity of lookups.

Disentanglement and Semantic Guidance

To ensure that sub-codebooks do not learn redundant features, the authors implement Disentanglement Regularization, which encourages orthogonality between codes. Furthermore, the training process incorporates features from pre-trained vision models like CLIP and DINOv2. This semantic guidance allows specific sub-codebooks to specialize in high-level concepts (e.g., object categories) while others focus on low-level details like textures and edges.

The FQGAN architecture decomposes visual tokenization into multiple sub-codebooks with disentanglement and semantic guidance, followed by an auto-regressive generation stage.

Factorized Auto-Regressive (FAR) Head

For image generation, a specialized Factorized AR Head was developed. This component predicts sequences of sub-tokens for each patch, maintaining the necessary dependencies between different levels of visual information captured by the factorized codebooks.

Experimental Results

The model was evaluated primarily on ImageNet-1k, with additional training on OpenImages and evaluation for multimodal tasks on Flickr-30k.

Reconstruction Performance

FQGAN sets a new state-of-the-art in reconstruction quality. The FQGAN-Triple configuration achieved a reconstruction FID (rFID) of 0.76 at 16× downsampling on ImageNet. This is a substantial improvement over the original VQGAN (4.98) and more recent high-performance variants like Open-MAGVIT2 (1.17).

Comparison of reconstruction FID across different codebook sizes, highlighting FQGAN's ability to maintain performance where traditional VQ methods plateau.

Generation and Scaling

In generative tasks, the FAR-Large model achieved a generation FID (gFID) of 3.08 on ImageNet, outperforming established models like LlamaGen. The researchers observed that increasing the number of sub-codebooks (e.g., from Dual to Triple) and extending training duration consistently yielded performance improvements, demonstrating the robustness of the factorization approach. Notably, the model maintained a codebook usage rate near 98%, effectively solving the dead code problem.

Conclusion

FQGAN demonstrates that structured, factorized quantization allows discrete tokenizers to match or exceed the performance of continuous VAEs. While the model currently leads in reconstruction, future work aims to bridge the slight performance gap in generation FID compared to Lookup-Free Quantization (LFQ) methods and further optimize the computational overhead of predicting multiple tokens per patch. The ultimate goal remains a unified tokenizer capable of seamless performance across both image generation and multimodal understanding tasks.

Summary updated

BibTeX
@misc{bai2024factorized,
  author = {Zechen Bai and Jianxiong Gao and Ziteng Gao and Pichao Wang and Zheng Zhang and Tong He and Mike Zheng Shou},
  title = {{Factorized Visual Tokenization and Generation}},
  year = {2024},
  eprint = {2411.16681},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.16681},
}
Figure