atlas

Research map / Image generation / Autoregressive and latent generation

Scaling the Codebook Size of VQ-GAN to 100,000 with a Utilization Rate of 99%

NeurIPS 2024 · Image generation › Autoregressive and latent generation · approach: Generative latent space tooling

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes VQGAN-LC, which freezes a 100K codebook initialized by K-means over CLIP ViT-L/14 features and trains only a linear projector, reaching over 99% utilization and better reconstruction/generation than VQGAN-FC and VQGAN-EMA.

Problem

Standard VQGAN codebooks cannot be scaled beyond about 16K entries: entries are randomly initialized and only a few get updated, so utilization collapses (e.g., 11.2% for VQGAN-FC at 16K) and performance saturates or degrades.

Approach

Instead of optimizing codebook entries, initialize a large static codebook from K-means centers of pretrained vision-encoder (CLIP ViT-L/14) patch features and train only a linear projector that maps the whole codebook into the encoder's latent space, so nearly all entries stay active.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
replace the standard quantizer with VQGAN-LC using a 100,000-entry codebookVQGAN · ImageNet-1K reconstruction, 256 tokensrFID: 3.41 -> 2.62Helped
replace the standard quantizer with VQGAN-LC using a 100,000-entry codebookVQGAN · FFHQ reconstruction, 256 tokensrFID: 4.79 -> 3.81Helped
use VQGAN-LC tokens instead of VQGAN-FC tokensGPT-404M on FFHQ · FFHQ generationFID: 3.23 -> 2.61Helped
increase VQGAN-LC codebook size from 1,000 to 100,000 (ablation)VQGAN-LC · ImageNet reconstructionrFID: 4.98 -> 2.62Helped
increase codebook size from 100,000 to 200,000 (ablation)VQGAN-LC · ImageNet reconstructionrFID: 2.62 -> 2.66Hurt
initialize the frozen codebook with random values instead of extracted and clustered image features (ablation)VQGAN-LC · ImageNet reconstructionrFID: 2.62 -> 108.7Hurt
use ViT-L rather than ViT-B features for codebook initialization (ablation)VQGAN-LC · ImageNet reconstructionrFID: 2.70 -> 2.62Helped
use ViT-L rather than ResNet-50 features for codebook initialization (ablation)VQGAN-LC · ImageNet reconstructionrFID: 2.71 -> 2.62Helped
use K-means clustering rather than random feature selection for initialization (ablation)VQGAN-LC with ViT-L features · ImageNet reconstructionrFID: 2.95 -> 2.62Helped
add a trainable projector for the static codebook (ablation)VQGAN-LC · ImageNet reconstructionrFID: 18.6 -> 2.62Helped
make initialized codebook entries trainable instead of keeping them static (ablation)VQGAN-LC with a projector · ImageNet reconstructionrFID: 2.62 -> 2.65No clear effect
increase projected codebook dimension from 8 to 16 (ablation)VQGAN-LC · ImageNet reconstructionrFID: 2.66 -> 2.36Helped

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1K FFHQ

Benchmarks: ImageNet-1K FFHQ

Metrics: rFID LPIPS PSNR SSIM codebook utilization top-1 accuracy FID

Baselines: VQGAN VQGAN-FC VQGAN-EMA RQVAE DQVAE DF-VQGAN DiVAE ViT-VQGAN RQTransformer DQTransformer Stackformer LDM

Builds on: VQGAN VQGAN-FC (ViT-VQGAN factorized codes) VQGAN-EMA (VQVAE-2 EMA update) latent diffusion models DiT SiT

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy