Towards Accurate Image Coding: Improved Autoregressive Image Generation with Dynamic Vector Quantization

Mengqi Huang, Zhendong Mao, Zhuowei Chen, Yongdong Zhang
2/14/2026

No official code found. Best implementation: CrossmodalGroup/DynamicVectorQuantization (194 stars, MIT, last commit 2023-07-23).

Abstract

Existing vector quantization (VQ) based autoregressive models follow a two-stage generation paradigm that first learns a codebook to encode images as discrete codes, and then completes generation based on the learned code-book. However, they encode fixed-size image regions into fixed-length codes and ignore their naturally different information densities, which results in insufficiency in important regions and redundancy in unimportant ones, and finally degrades the generation quality and speed. Moreover, the fixed-length coding leads to an unnatural rasterscan autoregressive generation. To address the problem, we propose a novel two-stage framework: (1) Dynamic-Quantization VAE (DQ-VAE) which encodes image regions into variable-length codes based on their information densities for an accurate & compact code representation. (2) DQ-Transformer which thereby generates images autoregressively from coarse-grained (smooth regions with fewer codes) to fine-grained (details regions with more codes) by modeling the position and content of codes in each granularity alternately, through a novel stacked-transformer architecture and shared-content, non-shared position input layers designs. Comprehensive experiments on various generation tasks validate our superiorities in both effectiveness and efficiency. Code will be released at https://github.com/CrossmodalGroup/DynamicVectorQuantization.

View on arXivView PDF

Code Implementations(1)

MIT

Official Pytorch Implementation of Our CVPR2023 Paper: "Towards Accurate Image Coding: Improved Autoregressive Image Generation with Dynamic Vector Quantization"

1948PythonMar 9, 20233 years agoMIT

Similar Papers

Cite this paper

@article{huang2026towards,
  title  = {Towards Accurate Image Coding: Improved Autoregressive Image Generation with Dynamic Vector Quantization},
  author = {Mengqi Huang and Zhendong Mao and Zhuowei Chen and Yongdong Zhang},
  year   = {2026},
  eprint = {2305.11718},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2305.11718},
  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.11718.svg)](https://codeofpaper.com/paper/2305.11718)

Discussion