Straightening Out the Straight-Through Estimator: Overcoming Optimization Challenges in Vector Quantized Networks
Minyoung Huh, Brian Cheung, Pulkit Agrawal, Phillip Isola
Abstract
This work examines the challenges of training neural networks using vector quantization using straight-through estimation. We find that a primary cause of training instability is the discrepancy between the model embedding and the codevector distribution. We identify the factors that contribute to this issue, including the codebook gradient sparsity and the asymmetric nature of the commitment loss, which leads to misaligned codevector assignments. We propose to address this issue via affine re-parameterization of the code vectors. Additionally, we introduce an alternating optimization to reduce the gradient error introduced by the straight-through estimation. Moreover, we propose an improvement to the commitment loss to ensure better alignment between the codebook representation and the model embedding. These optimization methods improve the mathematical approximation of the straightthrough estimation and, ultimately, the model performance. We demonstrate the effectiveness of our methods on several common model architectures, such as AlexNet, ResNet, and ViT, across various tasks, including image classification and generative modeling. Project page: minyoungg.github.io/vqtorch * Equal contribution 1 MIT CSAIL 2 MIT BCS. Correspondence to: Minyoung Huh
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.
Cited by top-tier papers39
- Finite Scalar Quantization: VQ-VAE Made SimpleFabian Mentzer, David Minnen, Eirikur Agustsson, Michael TschannenICLR 2024 · 442 citations
- GFT: Graph Foundation Model with Transferable Tree VocabularyZehong Wang, Zheyuan Zhang, Nitesh V. Chawla, Chuxu Zhang et al.NeurIPS 2024 · 108 citations
- Copilot4D: Learning Unsupervised World Models for Autonomous Driving via Discrete DiffusionLunjun Zhang, Yuwen Xiong, Ze Yang, Sergio Casas et al.ICLR 2024 · 105 citations
- Learning to Act without ActionsDominik Schmidt, Minqi JiangICLR 2024 · 98 citations
- UniAudio 1.5: Large Language Model-Driven Audio Codec is A Few-Shot Audio Task LearnerDongchao Yang, Haohan Guo, Yuanyuan Wang, Rongjie Huang et al.NeurIPS 2024 · 55 citations
Builds on11
- Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray et al.ICML 2021 · 6,356 citations
- Unsupervised Learning of Visual Features by Contrasting Cluster AssignmentsMathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal et al.NeurIPS 2020 · 5,249 citations
- Self-labelling via simultaneous clustering and representation learningYuki Markus Asano, Christian Rupprecht, Andrea VedaldiICLR 2020 · 873 citations
- Vector-quantized Image Modeling with Improved VQGANJiahui Yu, Xin Li, Jing Yu Koh, Han Zhang et al.ICLR 2022 · 753 citations
- When Vision Transformers Outperform ResNets without Pre-training or Strong Data AugmentationsXiangning Chen, Cho-Jui Hsieh, Boqing GongICLR 2022 · 388 citations
Related papers
- Correcting Quantization-Induced Gradient Mismatch in Neural Image CompressionChanghao Peng, Yuqi Ye, Wei GaoAAAI 2026
- Restructuring Vector Quantization with the Rotation TrickChristopher Fifty, Ronald Guenther Junkins, Dennis Duan, Aniketh Iyengar et al.ICLR 2025 · 1 citation
- DiVeQ: Differentiable Vector Quantization Using the Reparameterization TrickMohammad Hassan Vali, Tom Bäckström, Arno SolinICLR 2026 · 6 citations
- Oscillation-free Quantization for Low-bit Vision TransformersShih-Yang Liu, Zechun Liu, Kwang-Ting ChengICML 2023 · 63 citations
- VAEVQ: Enhancing Discrete Visual Tokenization Through Variational ModelingSicheng Yang, Xing Hu, Qiang Wu, Dawei YangAAAI 2026
