Vector Quantized Variational Autoencoders (VQ-VAEs) are fundamental to modern generative modeling, yet they often suffer from training instability and "codebook collapse" due to the inherent coupling of representation learning and discrete codebook optimization. In this paper, we propose VP-VAE (Vector Perturbation VAE), a novel paradigm that decouples representation learning from discretization by eliminating the need for an explicit codebook during training. Our key insight is that, from the neural network's viewpoint, performing quantization primarily manifests as injecting a structured perturbation in latent space. Accordingly, VP-VAE replaces the non-differentiable quantizer with distribution-consistent and scale-adaptive latent perturbations generated via Metropolis--Hastings sampling. This design enables stable training without a codebook while making the model robust to inference-time quantization error. Moreover, under the assumption of approximately uniform latent variables, we derive FSP (Finite Scalar Perturbation), a lightweight variant of VP-VAE that provides a unified theoretical explanation and a practical improvement for FSQ-style fixed quantizers. Extensive experiments on image and audio benchmarks demonstrate that VP-VAE and FSP improve reconstruction fidelity and achieve substantially more balanced token usage, while avoiding the instability inherent to coupled codebook training.
Figures & tables
Method
Codebook Size
Image (COCO)
Audio (LibriSpeech)
CVU
LPIPS ↓
PSNR ↑
SSIM ↑
CVU
PESQ ↑
STOI ↑
VQ-VAE
256
0.3679
0.2053
23.1662
0.6704
-
-
-
SimVQ
256
0.9429
0.1846
23.5356
0.6918
0.0040
1.2524
0.4112
TokenBridge
256
0.9888
0.6075
11.5386
0.2026
0.9888
1.1802
0.2881
FSQ
256
0.8607
0.2101
22.9390
0.6689
0.0960
1.2763
0.7973
FSP
256
0.8852
0.1884
23.8131
0.6940
0.1372
2.2653
0.9083
Table 1: In-domain reconstruction results. Models are trained and evaluated on COCO (image) and LibriSpeech (audio). “ - ” indicates training failure due to severe codebook collapse. VP-VAE and FSP demonstrate consistent stability and high fidelity across both modalities, whereas baselines often degrade in specific task.
Method
Codebook Size
Image (ImageNet)
Audio (Common Voice)
CVU
LPIPS ↓
PSNR ↑
SSIM ↑
CVU
PESQ ↑
STOI ↑
VQ-VAE
256
0.3617
0.2121
23.5942
0.6704
-
-
-
SimVQ
256
0.9363
0.1927
23.6599
0.6827
0.0041
1.2103
0.3781
TokenBridge
256
0.9887
0.6079
11.6525
0.2024
0.9887
1.0967
0.2688
FSQ
256
0.8574
0.2182
23.4555
0.6645
0.1690
1.2064
0.7630
FSP
256
0.8819
0.1989
23.7919
0.6736
0.2860
1.8148
0.8537
Table 2: Out-of-distribution generalization results. Models trained on COCO/LibriSpeech are evaluated on unseen datasets: ImageNet (image) and Common Voice (audio). Our decoupled training paradigm yields superior generalization compared to baseline methods.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Setting
CVU
LPIPS ↓
PSNR ↑
SSIM ↑
VP-VAE (full)
0.8102
0.1717
23.8878
0.7182
w/o Lnorm
0.8052
0.1850
24.0219
0.7167
w/o MH (always accept)
0.7467
0.1756
23.8053
0.7138
Appendix
Table 3: Ablation on VP-VAE components. We evaluate the contribution of latent normalization and Metropolis–Hastings mechanism on image reconstruction ( K=1024 ). Both components contribute to reconstruction quality and codebook balance.
Setting
CVU
LPIPS ↓
PSNR ↑
SSIM ↑
FSP (Tanh)
0.8515
0.1722
24.1910
0.7177
FSP (Normal CDF)
0.8663
0.1689
24.2945
0.7254
FSP (Laplace CDF)
0.8390
0.1685
24.2433
0.7263
Appendix
Table 4: FSP activation functions on images. We compare three CDF-like activations, which affect how well the “approximately uniform” assumption holds and thus the effectiveness of FSP ( K=1024 ).
Setting
CVU
PESQ ↑
STOI ↑
FSP (Tanh)
0.0810
2.4458
0.9191
FSP (Normal CDF)
0.0654
2.3772
0.9154
FSP (Laplace CDF)
0.0751
2.3760
0.9198
Appendix
Table 5: FSP activation functions on audio. We evaluate three CDF-like activations on audio ( K=1024 ).
Figure 1: Codebook utilization during training. CVU curves for different methods on image reconstruction ( K=1024 ). VQ-VAE and FSQ exhibit an initial rise followed by a decline. VP-VAE and FSP maintain stable, high utilization throughout training.
Figure 2: Output distributions of fixed quantization schemes. Given a uniform latent distribution, we compare the quantized output distributions produced by FSQ, FSQ with noise, symmetric FSQ with noise, and FSP. They are all configured with L=4 quantization levels. FSP produces a more uniform output distribution, aligning with the Lloyd–Max optimality principle.
Vector Quantization (VQ) underpins many modern generative frameworks such as VQ-VAE, VQ-GAN, and latent diffusion models. Yet, it suffers from the persistent problem of codebook collapse, where a large fraction of code vectors remains unused during training. This work provides a new theoretical explanation by identifying the nonstationary nature of encoder updates as the fundamental cause of this phenomenon. We show that as the encoder drifts, unselected code vectors fail to receive updates and gradually become inactive. To address this, we propose two new methods: Non-Stationary Vector Quantization (NSVQ), which propagates encoder drift to non-selected codes through a kernel-based rule, and Transformer-based Vector Quantization (TransVQ), which employs a lightweight mapping to adaptively transform the entire codebook while preserving convergence to the k-means solution. Experiments on the CelebA-HQ dataset demonstrate that both methods achieve near-complete codebook utilization and superior reconstruction quality compared to baseline VQ variants, providing a principled and scalable foundation for future VQ-based generative models. The code is available at: https://github.com/CAIR- LAB- WFUSM/NSVQ-TransVQ.git
Hao Lu, Onur C. Koyun, Yongxin Guo +3
Wake Forest University School of Medicine, Winston-Salem, NC, USA
Vector quantization is central to modern generative modeling pipelines, but large-codebook VQ models often suffer from codebook collapse. We identify encoder drift as a key driver of this failure: as the encoder moves the latent distribution, sparsely updated code vectors can lag behind, lose assignments, and increase quantization error, creating a feedback loop through the straight-through estimator. We propose NSVQ, a non-stationary-aware VQ training strategy that combines a dense non-stationary embedding loss, codebook replacement, and stage-wise encoder freezing. NSVQ first helps the codebook track encoder drift during early training, then freezes the encoder to consolidate the codebook under a fixed latent geometry, and finally reintroduces adversarial refinement. Experiments on ImageNet-1k show that NSVQ improves reconstruction quality while maintaining full codebook utilization. On ImageNet-1k at 128×128 with 65,536 codes, NSVQ reduces rFID from 2.39 to 2.10 compared with SimVQ, while both methods maintain 100% utilization. Additional latent diffusion experiments show that NSVQ also improves downstream ImageNet generation FID.
Hao Lu, Yongxin Guo, Onur Koyun +3
Wake Forest University School of Medicine / Advocate Health · Wake Forest University School of Medicine · Advocate Health
Vector Quantization (VQ) is fundamental to discrete visual tokenizers that power modern autoregressive and masked image generation models. While recent shared-projection codebook methods have substantially advanced codebook utilization, training stability remains a critical and underexplored challenge. We argue that the root cause lies in the entanglement of the Encoder--Decoder and Codebook training: because neither module can reliably fulfill its own responsibility in isolation, the system can only function when the two subsystems happen to cooperate---a fragile condition that breaks down precisely when training is most stressed. We propose StableVQ, which revisits the proper learning objective of each module and resolves the problems that arise when each is trained to fulfill its own role independently. Concretely, (1) Dynamic STE corrects the instability in the Encoder's learning objective, enabling it to robustly optimize the reconstruction space under discrete regularization even when codebook utilization is low. (2) Region VQ Loss reconceives the Codebook's learning objective so that it can independently guarantee full tracking of the encoder output distribution, without relying on encoder oscillations to drive activation. (3) Decoupled Schedule recognizes that the distinct responsibilities of the Encoder--Decoder and the Codebook demand distinct optimization dynamics, and assigns each an independent learning rate schedule to ensure robust system-level behavior. Built on top of shared-projection codebooks, StableVQ is lightweight and introduces no learnable parameters. Experiments on ImageNet demonstrate consistent improvements in training stability, codebook utilization, and reconstruction quality across diverse codebook sizes and initialization settings.
Bao Tang, Jiahao Guo, Haoxiang Cao +4
Huazhong University of Science and Technology · KlingAI Research · South China Normal University