Papers
Topics
Authors
Recent
Search
2000 character limit reached

Gaussian Mixture VQ: Probabilistic Vector Quantization

Updated 3 January 2026
  • Gaussian Mixture VQ (GM-VQ) is a probabilistic vector quantization framework that employs a Gaussian mixture prior to map continuous representations to discrete codebooks, improving generative modeling.
  • It introduces an aggregated categorical posterior ELBO (ALBO) that replaces per-sample entropy with the entropy of the aggregated posterior, ensuring effective codebook utilization.
  • GM-VQ optimizes the network end-to-end without separate commitment losses, demonstrating significant reduction in reconstruction error and robust performance on benchmarks like CIFAR-10 and CelebA.

Gaussian Mixture Vector Quantization (GM-VQ) is a probabilistic framework extending vector quantized variational autoencoders (VQ-VAE) for mapping continuous representations to discrete codebooks, crucial for generative modeling, information bottlenecking, and discrete tokenization in machine learning. GM-VQ introduces a Gaussian mixture as the generative prior, utilizes adaptive variances to capture complex data structure, and replaces heuristic objectives in prior VQ-VAE works with a unified Bayesian optimization approach. The introduction of the Aggregated Categorical Posterior Evidence Lower Bound (ALBO) enables improved codebook utilization and reduced reconstruction error without reliance on handcrafted regularization or codebook management heuristics (Yan et al., 2024).

1. Probabilistic Generative Model and Inference

GM-VQ defines a hierarchical latent variable model comprising a categorical latent code c{1,,C}c \in \{1, \dots, C\} with prior p(c)=πcp(c) = \pi_c, typically uniform (πc=1/C\pi_c = 1/C). Conditional on cc, a continuous latent zRLz \in \mathbb{R}^L is drawn from an isotropic Gaussian: p(zc)=N(z;μc,σz2I)p(z|c) = \mathcal{N}(z; \mu_c, \sigma_z^2 I), where {μc}c=1C\{\mu_c\}_{c=1}^C serves as the codebook of latent means and σz2\sigma_z^2 is a fixed variance hyper-parameter (the limit σz20\sigma_z^2 \to 0 recovers deterministic VQ). Observed data xRDx \in \mathbb{R}^D are generated by a decoder p(c)=πcp(c) = \pi_c0 as p(c)=πcp(c) = \pi_c1. The joint generative model factorizes as p(c)=πcp(c) = \pi_c2.

Inference is performed via a variational posterior p(c)=πcp(c) = \pi_c3. The discrete component p(c)=πcp(c) = \pi_c4 is parameterized with categorical logits p(c)=πcp(c) = \pi_c5 derived from a Mahalanobis‐style distance between an encoder “proxy” p(c)=πcp(c) = \pi_c6 and codebook entry p(c)=πcp(c) = \pi_c7, scaled by an adaptive per-sample weight p(c)=πcp(c) = \pi_c8:

p(c)=πcp(c) = \pi_c9

πc=1/C\pi_c = 1/C0

The continuous posterior πc=1/C\pi_c = 1/C1 uses a diagonal covariance πc=1/C\pi_c = 1/C2, with adaptive variance

πc=1/C\pi_c = 1/C3

This yields a “soft-assignment” of πc=1/C\pi_c = 1/C4 to each codeword, alongside adaptive uncertainty per assignment.

2. Aggregated Categorical Posterior ELBO (ALBO)

GM-VQ introduces an alternative to the standard evidence lower bound (ELBO) by aggregating the categorical posterior over data. Standard ELBOs include the term πc=1/C\pi_c = 1/C5, incentivizing high entropy that conflicts with effective low-temperature Gumbel-Softmax sampling. GM-VQ replaces this per-example entropy with entropy of the aggregated posterior πc=1/C\pi_c = 1/C6, yielding the ALBO objective:

πc=1/C\pi_c = 1/C7

This objective aligns the variational posterior with the generative model and eliminates the adverse entropy component.

3. Loss Function and Optimization

The practical GM-VQ loss is formulated as:

πc=1/C\pi_c = 1/C8

Here, πc=1/C\pi_c = 1/C9, cc0, and cc1, cc2 are positive hyper-parameters absorbing fixed decoder and latent variances (cc3, cc4). This loss is optimized fully end-to-end without handcrafted commitment losses or codebook management steps.

4. Training Procedure

The GM-VQ training pipeline for each mini-batch involves:

  • Encoding cc5 via the encoder to produce cc6, compute Mahalanobis-style logits cc7, and evaluate soft assignments cc8.
  • Sampling “soft” one-hot vectors cc9 using Gumbel-SoftmaxzRLz \in \mathbb{R}^L0, with annealing zRLz \in \mathbb{R}^L1 from zRLz \in \mathbb{R}^L2 to zRLz \in \mathbb{R}^L3 throughout training.
  • Drawing zRLz \in \mathbb{R}^L4 for straight-through approximation.
  • Decoding to zRLz \in \mathbb{R}^L5.
  • Computing zRLz \in \mathbb{R}^L6 and backpropagating gradients through parameters zRLz \in \mathbb{R}^L7, zRLz \in \mathbb{R}^L8, and codebook zRLz \in \mathbb{R}^L9 directly.
  • Optimization is performed via AdamW with a cosine schedule and linear warm-up.

No separate exponential moving average, commitment loss, or post-hoc clustering is necessary.

5. Empirical Evaluation

Experimental results on CIFAR-10 and CelebA benchmark datasets demonstrate substantial performance improvement by GM-VQ over previous VQ-VAE approaches:

Model MSE (CIFAR-10 / CelebA) Perplexity (CIFAR-10 / CelebA)
VQ-VAE 5.65 / 10.02 14.0 / 16.2
VQ-VAE + replace 4.07 / 4.77 109.8 / 676.4
GM-VQ 3.13 / 1.38 731.9 / 338.6
GM-VQ + Entropy 3.11 / 0.97 878.7 / 831.0

GM-VQ achieves approximately 50% reduction in reconstruction error relative to vanilla VQ-VAE and attains high codebook perplexity, indicating usage of nearly the full codebook (perplexity p(zc)=N(z;μc,σz2I)p(z|c) = \mathcal{N}(z; \mu_c, \sigma_z^2 I)0). Entropy regularization parameter p(zc)=N(z;μc,σz2I)p(z|c) = \mathcal{N}(z; \mu_c, \sigma_z^2 I)1 produces higher perplexity and slightly lower MSE as p(zc)=N(z;μc,σz2I)p(z|c) = \mathcal{N}(z; \mu_c, \sigma_z^2 I)2 increases, indicating stronger codebook utilization.

6. Analysis, Extensions, and Limitations

By adopting a Gaussian mixture prior over latent codes and maintaining learnable, small conditional variances, GM-VQ generalizes deterministic quantization to a fully probabilistic model in which codebook entries, mixing weights, and variances are optimized under a unified objective. The aggregated categorical posterior mitigates conflicts arising in gradient estimation when using Gumbel-Softmax and high-entropy code assignments; the harmful p(zc)=N(z;μc,σz2I)p(z|c) = \mathcal{N}(z; \mu_c, \sigma_z^2 I)3 term is removed from the training objective. GM-VQ eliminates the need for post-hoc codebook replacement heuristics, commitment losses, and cluster management found in previous VQ-VAE frameworks. Code collapse is naturally prevented.

Potential extensions include end-to-end learning of p(zc)=N(z;μc,σz2I)p(z|c) = \mathcal{N}(z; \mu_c, \sigma_z^2 I)4 and mixture weights p(zc)=N(z;μc,σz2I)p(z|c) = \mathcal{N}(z; \mu_c, \sigma_z^2 I)5, as well as architectural hierarchies formed by stacked GM-VQ layers. Key limitations remain: decoder variance p(zc)=N(z;μc,σz2I)p(z|c) = \mathcal{N}(z; \mu_c, \sigma_z^2 I)6 is fixed, effectiveness depends on the accuracy of Gumbel-Softmax straight-through approximation, and further bias reduction may be achievable via control variates. A plausible implication is that the principled Bayesian framework enables broadening of quantized representations without sacrificing tractable training or differentiation (Yan et al., 2024).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Gaussian Mixture VQ (GM-VQ).