Lune

ICML2023Top-tier venue

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 1 MIT CSAIL 2 MIT BCS. Correspondence to: Minyoung Huh

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

39 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Vector-quantized Image Modeling with Improved VQGAN cites Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
  • Vector-quantized Image Modeling with Improved VQGAN cites Zero-Shot Text-to-Image Generation
  • Unsupervised Learning of Visual Features by Contrasting Cluster Assignments cites Self-labelling via simultaneous clustering and representation learning
  • Copilot4D: Learning Unsupervised World Models for Autonomous Driving via Discrete Diffusion cites Zero-Shot Text-to-Image Generation
  • GFT: Graph Foundation Model with Transferable Tree Vocabulary cites Vector-quantized Image Modeling with Improved VQGAN
  • Finite Scalar Quantization: VQ-VAE Made Simple cites Vector-quantized Image Modeling with Improved VQGAN
  • Learning to Act without Actions cites Zero-Shot Text-to-Image Generation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers39

  1. Finite Scalar Quantization: VQ-VAE Made SimpleFabian Mentzer, David Minnen, Eirikur Agustsson, Michael TschannenICLR 2024 · 442 citations
  2. GFT: Graph Foundation Model with Transferable Tree VocabularyZehong Wang, Zheyuan Zhang, Nitesh V. Chawla, Chuxu Zhang et al.NeurIPS 2024 · 108 citations
  3. Copilot4D: Learning Unsupervised World Models for Autonomous Driving via Discrete DiffusionLunjun Zhang, Yuwen Xiong, Ze Yang, Sergio Casas et al.ICLR 2024 · 105 citations
  4. Learning to Act without ActionsDominik Schmidt, Minqi JiangICLR 2024 · 98 citations
  5. 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

  1. Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray et al.ICML 2021 · 6,356 citations
  2. Unsupervised Learning of Visual Features by Contrasting Cluster AssignmentsMathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal et al.NeurIPS 2020 · 5,249 citations
  3. Self-labelling via simultaneous clustering and representation learningYuki Markus Asano, Christian Rupprecht, Andrea VedaldiICLR 2020 · 873 citations
  4. Vector-quantized Image Modeling with Improved VQGANJiahui Yu, Xin Li, Jing Yu Koh, Han Zhang et al.ICLR 2022 · 753 citations
  5. When Vision Transformers Outperform ResNets without Pre-training or Strong Data AugmentationsXiangning Chen, Cho-Jui Hsieh, Boqing GongICLR 2022 · 388 citations

Related papers

  1. Correcting Quantization-Induced Gradient Mismatch in Neural Image CompressionChanghao Peng, Yuqi Ye, Wei GaoAAAI 2026
  2. Restructuring Vector Quantization with the Rotation TrickChristopher Fifty, Ronald Guenther Junkins, Dennis Duan, Aniketh Iyengar et al.ICLR 2025 · 1 citation
  3. DiVeQ: Differentiable Vector Quantization Using the Reparameterization TrickMohammad Hassan Vali, Tom Bäckström, Arno SolinICLR 2026 · 6 citations
  4. Oscillation-free Quantization for Low-bit Vision TransformersShih-Yang Liu, Zechun Liu, Kwang-Ting ChengICML 2023 · 63 citations
  5. VQ-Transplant: Efficient VQ-Module Integration for Pre-trained Visual TokenizersXianghong Fang, Yuan Yuan, Dehan Kong, Tim G. J. RudnerICLR 2026 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines