Restructuring Vector Quantization with the Rotation Trick
Christopher Fifty, Ronald Guenther Junkins, Dennis Duan, Aniketh Iyengar, Jerry Weihong Liu, Ehsan Amid, Sebastian Thrun, Christopher Ré
摘要
Vector Quantized Variational AutoEncoders (VQ-VAEs) are designed to compress a continuous input to a discrete latent space and reconstruct it with minimal distortion. They operate by maintaining a set of vectors -- often referred to as the codebook -- and quantizing each encoder output to the nearest vector in the codebook. However, as vector quantization is non-differentiable, the gradient to the encoder flows around the vector quantization layer rather than through it in a straight-through approximation. This approximation may be undesirable as all information from the vector quantization operation is lost. In this work, we propose a way to propagate gradients through the vector quantization layer of VQ-VAEs. We smoothly transform each encoder output into its corresponding codebook vector via a rotation and rescaling linear transformation that is treated as a constant during backpropagation. As a result, the relative magnitude and angle between encoder output and codebook vector becomes encoded into the gradient as it propagates through the vector quantization layer and back to the encoder. Across 11 different VQ-VAE training paradigms, we find this restructuring improves reconstruction metrics, codebook utilization, and quantization error. Our code is available at https://github.com/cfifty/rotation_trick.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 19 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- High-Resolution Image Synthesis with Latent Diffusion Models 引用了 Vector-quantized Image Modeling with Improved VQGAN
- Spherical Leech Quantization for Visual Tokenization and Generation 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- Spherical Leech Quantization for Visual Tokenization and Generation 引用了 vq-wav2vec: Self-Supervised Learning of Discrete Speech Representations
- Spherical Leech Quantization for Visual Tokenization and Generation 引用了 Vector-quantized Image Modeling with Improved VQGAN
- Vector-quantized Image Modeling with Improved VQGAN 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- DiVeQ: Differentiable Vector Quantization Using the Reparameterization Trick 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- DiVeQ: Differentiable Vector Quantization Using the Reparameterization Trick 引用了 Vector-quantized Image Modeling with Improved VQGAN
- PathVQ: Reforming Computational Pathology Foundation Model for Whole Slide Image Analysis via Vector Quantization 引用了 Vector-quantized Image Modeling with Improved VQGAN
- Is Space-Time Attention All You Need for Video Understanding? 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- CODA: Repurposing Continuous VAEs for Discrete Tokenization 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
- CODA: Repurposing Continuous VAEs for Discrete Tokenization 引用了 Vector-quantized Image Modeling with Improved VQGAN
引用它的顶会 Paper19
- CODA: Repurposing Continuous VAEs for Discrete TokenizationZeyu Liu, Zanlin Ni, Yeguo Hua, Xin Deng 等ICCV 2025 · 9 次引用
- Spherical Leech Quantization for Visual Tokenization and GenerationYue Zhao, Hanwen Jiang, Zhenlin Xu, Chutong Yang 等CVPR 2026 · 7 次引用
- DiVeQ: Differentiable Vector Quantization Using the Reparameterization TrickMohammad Hassan Vali, Tom Bäckström, Arno SolinICLR 2026 · 6 次引用
- PathVQ: Reforming Computational Pathology Foundation Model for Whole Slide Image Analysis via Vector QuantizationHonglin Li, Zhongyi Shui, Yunlong Zhang, Chenglu Zhu 等NeurIPS 2025 · 6 次引用
- Diffusion Generative Recommendation with Continuous TokensHaohao Qu, Shanru Lin, Yujuan Ding, Yiqi Wang 等WWW 2026 · 5 次引用
它引用的 Paper18
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser 等CVPR 2022 · 13,123 次引用
- Is Space-Time Attention All You Need for Video Understanding?Gedas Bertasius, Heng Wang, Lorenzo TorresaniICML 2021 · 2,927 次引用
- Vector-quantized Image Modeling with Improved VQGANJiahui Yu, Xin Li, Jing Yu Koh, Han Zhang 等ICLR 2022 · 753 次引用
- vq-wav2vec: Self-Supervised Learning of Discrete Speech RepresentationsAlexei Baevski, Steffen Schneider, Michael AuliICLR 2020 · 730 次引用
相关 Paper
- SQ-VAE: Variational Bayes on Discrete Representation with Self-annealed Stochastic QuantizationYuhta Takida, Takashi Shibuya, Wei-Hsiang Liao, Chieh-Hsin Lai 等ICML 2022 · 99 次引用
- Diffusion bridges vector quantized variational autoencodersMax Cohen, Guillaume Quispe, Sylvain Le Corff, Charles Ollion 等ICML 2022 · 16 次引用
- ArcVQ-VAE: A Spherical Vector Quantization Framework with ArcCosine Additive MarginJaeyung Kim, YoungJoon YooICML 2026
- Vector Quantization-Based Regularization for AutoencodersHanwei Wu, Markus FlierlAAAI 2020 · 33 次引用
- Learning to Quantize for Training Vector-Quantized NetworksPeijia Qin, Jianguo ZhangICML 2025
