SQ-VAE: Variational Bayes on Discrete Representation with Self-annealed Stochastic Quantization
Yuhta Takida, Takashi Shibuya, WeiHsiang Liao, Chieh-Hsin Lai, Junki Ohmura, Toshimitsu Uesaka, Naoki Murata, Shusuke Takahashi, Toshiyuki Kumakura, Yuki Mitsufuji
TL;DR
SQ-VAE introduces stochastic dequantization/quantization into the VAE/VQ-VAE framework, using trainable posteriors to realize self-annealing where quantization becomes increasingly deterministic during training. It provides Gaussian and von Mises–Fisher variants to handle continuous and categorical data, respectively, all within a standard variational Bayes objective, avoiding heuristic tricks like stop-gradient or EMA. Empirically, SQ-VAE improves codebook utilization and reconstruction quality across vision and speech tasks, and the vMF variant particularly excels on categorical data, underscoring the method’s versatility for discrete latent representations. The work suggests strong potential for improved data compression and scalable discrete latent modeling without manual hyperparameter tuning.
Abstract
One noted issue of vector-quantized variational autoencoder (VQ-VAE) is that the learned discrete representation uses only a fraction of the full capacity of the codebook, also known as codebook collapse. We hypothesize that the training scheme of VQ-VAE, which involves some carefully designed heuristics, underlies this issue. In this paper, we propose a new training scheme that extends the standard VAE via novel stochastic dequantization and quantization, called stochastically quantized variational autoencoder (SQ-VAE). In SQ-VAE, we observe a trend that the quantization is stochastic at the initial stage of the training but gradually converges toward a deterministic quantization, which we call self-annealing. Our experiments show that SQ-VAE improves codebook utilization without using common heuristics. Furthermore, we empirically show that SQ-VAE is superior to VAE and VQ-VAE in vision- and speech-related tasks.
