paper-with-me

Papers

Restructuring Vector Quantization with the Rotation Trick

2024-10-08 · Christopher Fifty, Ronald G. Junkins, Dennis Duan, Aniketh Iger, Jerry W. 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.

📄 PDF Abstract BibTeX arXiv:2410.06424

Code (3)

cfifty/rotation_trick 공식 구현 pytorch
lucidrains/vector-quantize-pytorch 공식 구현 pytorch
EdoardoBotta/RQ-VAE-Recommender pytorch

Tasks

Quantization

Methods 이 논문이 사용한 방법론

SET Dynamic Sparse Training method where weight mask is updated randomly periodically
VQ-VAE VQ-VAE is a type of variational autoencoder that uses vector quantisation to obtain a discrete latent representation. It differs from…

Similar Papers 제목 키워드 기반

DiVeQ: Differentiable Vector Quantization Using the Reparameterization Trick

2025-09-30 · Mohammad Hassan Vali, Tom Bäckström, Arno Solin arxiv

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 di…

Image CompressionImage Generation

Restructuring TCAD System: Teaching Traditional TCAD New Tricks

2022-04-19 · Sanghoon Myung, Wonik Jang, Seonghoon Jin, Jae Myung Choe 외

Traditional TCAD simulation has succeeded in predicting and optimizing the device performance; however, it still faces a massive challenge - a high computational cost. There have been many attempts to replace TCAD with d…

Deep Learning

Pushing the Limits of Block Rotations in Post-Training Quantization

2026-01-29 · Sai Sanjeet, Ian Colbert, Pablo Monteagudo-Lago, Giuseppe Franco 외 arxiv

Recent post-training quantization (PTQ) methods have adopted block rotations to diffuse outliers prior to rounding. While this reduces the overhead of online full-vector rotations, the effect of block structure on outlie…

Provable Quantization with Randomized Hadamard Transform

2026-05-13 · Ying Feng, Piotr Indyk, Michael Kapralov, Dmitry Krachun 외 arxiv

Vector quantization via random projection followed by scalar quantization is a fundamental primitive in machine learning, with applications ranging from similarity search to federated learning and KV cache compression. W…

Federated Learning

Rotated Binary Neural Network

2020-09-28 · NeurIPS 2020 12 · Mingbao Lin, Rongrong Ji, Zihan Xu, Baochang Zhang 외

Binary Neural Network (BNN) shows its predominance in reducing the complexity of deep neural networks. However, it suffers severe performance degradation. One of the major impediments is the large quantization error betw…

BinarizationQuantization