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

An Image is Worth 32 Tokens for Reconstruction and Generation

Qihang Yu, Mark Weber, Xueqing Deng, Xiaohui Shen, Daniel Cremers, Liang-Chieh Chen · DOI

Introduction

In generative AI, images are typically compressed into a smaller latent space of discrete tokens before processing. Traditional methods like VQGAN rely on a 2D grid (e.g., $16 \times 16$ or $32 \times 32$), resulting in hundreds or thousands of tokens. However, these grids are often redundant; adjacent patches in an image frequently contain similar information. Researchers from ByteDance and Technical University Munich have introduced TiTok, a 1D image tokenizer that challenges this paradigm by representing a $256 \times 256$ image using as few as 32 discrete tokens.

TiTok: 1D Tokenization

The core innovation of TiTok (Transformer-based 1-Dimensional Tokenizer) is treating the image latent representation as a flat 1D sequence rather than a 2D grid.

Architecture

TiTok utilizes a Vision Transformer (ViT) for both its encoder and decoder. The encoder processes image patches alongside a small set of "latent tokens." After processing, only these latent tokens are retained as the image's representation. By moving to a 1D sequence, the model is no longer constrained by fixed spatial mappings. This allows each token to capture more global, semantically rich information across the entire image.

Training Strategy

Training a highly compact tokenizer is challenging. To ensure stability and high visual fidelity, the authors employ a two-stage training process:

  1. Proxy Code Stage: TiTok is first trained to predict the discrete codes of a pre-trained, high-quality VQGAN.
  2. Fine-Tuning Stage: The decoder is fine-tuned to reconstruct actual pixels from the 1D tokens.

Key Insights

  • Region Redundancy: 1D tokenization allows a single token to represent semantically related but spatially distant parts of an image, enabling extreme compression.
  • Scaling for Compactness: Interestingly, scaling up the tokenizer model size (e.g., using a larger ViT) allows for a smaller number of tokens. A larger encoder is more effective at distilling an image into a tiny 32-token bottleneck.
  • Semantic Richness: Linear probing reveals that as the token count decreases, the semantic information per token increases. The bottleneck forces the model to prioritize high-level object features over low-level pixel details.

Performance and Efficiency

TiTok achieves high-quality reconstruction and generation with significantly fewer tokens than traditional methods.

TiTok demonstrates state-of-the-art performance on ImageNet-1K benchmarks while offering massive computational savings.

  • Extreme Compression: TiTok-L-32 uses just 32 tokens, a 64x reduction compared to the 2048 tokens often used in diffusion models.
  • Generation Quality: On ImageNet $256 \times 256$, TiTok achieved a generation FID (gFID) of 1.97, outperforming MaskGIT (6.18) and DiT-XL/2 (2.27).
  • Speedup: At $512 \times 512$ resolution, TiTok is 410x faster at generating images than DiT-XL/2, while maintaining superior quality (gFID 2.74 vs 3.04).
  • Reconstruction: Despite the 32-token bottleneck, the reconstruction FID (rFID) of 2.21 is comparable to VQGANs using 8x more tokens.

Conclusion and Future Work

TiTok proves that 1D tokenization can break the efficiency-quality trade-off in image generation. By leveraging semantic redundancy, it achieves high-fidelity results with a fraction of the tokens used by current state-of-the-art models. Future work may extend this 1D approach to Variational Autoencoders (VAEs) and other modalities like video, where temporal redundancy offers even greater opportunities for compression.

Summary updated

BibTeX
@inproceedings{yu2024image,
  author = {Qihang Yu and Mark Weber and Xueqing Deng and Xiaohui Shen and Daniel Cremers and Liang-Chieh Chen},
  title = {{An Image is Worth 32 Tokens for Reconstruction and Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=tOXoQPRzPL},
}
Figure