Not All Image Regions Matter: Masked Vector Quantization for Autoregressive Image Generation

Mengqi Huang, Zhendong Mao, Quang Wang, Yongdong Zhang
2/14/2026

No official code found. Best implementation: CrossmodalGroup/MaskedVectorQuantization (68 stars, MIT, last commit 2023-07-21).

Abstract

Existing autoregressive models follow the two-stage generation paradigm that first learns a codebook in the latent space for image reconstruction and then completes the image generation autoregressively based on the learned codebook. However, existing codebook learning simply models all local region information of images without distinguishing their different perceptual importance, which brings redundancy in the learned codebook that not only limits the next stage's autoregressive model's ability to model important structure but also results in high training cost and slow generation speed. In this study, we borrow the idea of importance perception from classical image coding theory and propose a novel two-stage framework, which consists of Masked Quantization VAE (MQVAE) and Stackformer, to relieve the model from modeling redundancy. Specifically, MQ-VAE incorporates an adaptive mask module for masking redundant region features before quantization and an adaptive de-mask module for recovering the original grid image feature map to faithfully reconstruct the original images after quantization. Then, Stackformer learns to predict the combination of the next code and its position in the feature map. Comprehensive experiments on various image generation validate our effectiveness and efficiency. Code will be released at https://github.com/CrossmodalGroup/MaskedVectorQuantization.

View on arXivView PDF

Code Implementations(1)

MIT

Official Pytorch Implementation of Our CVPR2023 Paper: "Not All Image Regions Matter: Masked Vector Quantization for Autoregressive Image Generation"

683PythonMar 16, 20233 years agoMIT

Similar Papers

Cite this paper

@article{huang2026image,
  title  = {Not All Image Regions Matter: Masked Vector Quantization for Autoregressive Image Generation},
  author = {Mengqi Huang and Zhendong Mao and Quang Wang and Yongdong Zhang},
  year   = {2026},
  eprint = {2305.13607},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2305.13607},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.13607.svg)](https://codeofpaper.com/paper/2305.13607)

Discussion