DiVeQ: Differentiable Vector Quantization Using the Reparameterization Trick
Mohammad Hassan Vali, Tom Bäckström, Arno Solin
Abstract
Vector quantization is common in deep models, yet its hard assignments block gradients and hinder end-to-end training. We propose DiVeQ, which treats quantization as adding an error vector that mimics the quantization distortion, keeping the forward pass hard while letting gradients flow. We also present a space-filling variant (SF-DiVeQ) that assigns input to a curve constructed by the lines connecting codewords, resulting in less quantization error and full codebook usage. Both methods train end-to-end without requiring auxiliary losses or temperature schedules. In VQ-VAE image compression, VQGAN image generation, and DAC speech coding tasks across various data sets, our proposed methods improve reconstruction and sample quality over alternative quantization approaches.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 67289310-2a0f-49b9-adf4-92a58ce9ee27Cited by top-tier papers1
Ask how each one uses itBuilds on19
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
- High-Fidelity Audio Compression with Improved RVQGANRithesh Kumar, Prem Seetharaman, Alejandro Luebs, Ishaan Kumar et al.NeurIPS 2023 · 910 citations
- Vector-quantized Image Modeling with Improved VQGANJiahui Yu, Xin Li, Jing Yu Koh, Han Zhang et al.ICLR 2022 · 753 citations
- Language Model Beats Diffusion - Tokenizer is key to visual generationLijun Yu, José Lezama, Nitesh Bharadwaj Gundavarapu, Luca Versari et al.ICLR 2024 · 609 citations
- PeCo: Perceptual Codebook for BERT Pre-training of Vision TransformersXiaoyi Dong, Jianmin Bao, Ting Zhang, Dongdong Chen et al.AAAI 2023 · 281 citations
Related papers
- Restructuring Vector Quantization with the Rotation TrickChristopher Fifty, Ronald Guenther Junkins, Dennis Duan, Aniketh Iyengar et al.ICLR 2025 · 1 citation
- SQ-VAE: Variational Bayes on Discrete Representation with Self-annealed Stochastic QuantizationYuhta Takida, Takashi Shibuya, Wei-Hsiang Liao, Chieh-Hsin Lai et al.ICML 2022 · 99 citations
- Diffusion bridges vector quantized variational autoencodersMax Cohen, Guillaume Quispe, Sylvain Le Corff, Charles Ollion et al.ICML 2022 · 16 citations
- Differentiable Vector Quantization for Rate-Distortion Optimization of Generative Image CompressionShiyin Jiang, Wei Long, Minghao Han, Zhenghao Chen et al.CVPR 2026 · 3 citations
- Online Clustered CodebookChuanxia Zheng, Andrea VedaldiICCV 2023 · 67 citations
