Addressing Representation Collapse in Vector Quantized Models with One Linear Layer

Yongxin Zhu, Bocheng Li, Yifei Xin, Linli Xu · DOI

Vector Quantization (VQ) serves as a critical bridge in multimodal AI, enabling models to discretize continuous data like images and audio into tokens compatible with Large Language Models (LLMs). However, VQ-VAEs have long been plagued by "representation collapse," where a significant portion of the codebook remains unused. SimVQ introduces a simple yet powerful architectural modification—a single learnable linear layer—to resolve this issue.

The Challenge of Representation Collapse

In standard VQ-VAE training, the model selects the nearest neighbor from a codebook to represent a data point. Because only the selected vector receives a gradient update, the majority of the codebook often remains "dead" or unoptimized. This creates what the authors term the "cocoon effect," where active vectors move toward the data distribution while unselected ones remain stagnant, effectively trapping the model in a suboptimal latent space.

Illustration of the 'cocoon effect' in vanilla VQ, where only selected vectors (red) receive updates while others (grey) remain stagnant.

Previous attempts to fix this involved complex optimization heuristics or reducing latent dimensionality, which often compromised the model's capacity and reconstruction fidelity.

SimVQ: Joint Latent Space Optimization

SimVQ shifts the optimization target from individual vectors to the entire latent space. The core innovation is a reparameterization of the codebook $C$ as the product of a fixed coefficient matrix and a learnable linear transformation: $C_{new} = C_{fixed}W$.

Key Technical Components:

  • Asymmetric Optimization: The coefficient matrix $C_{fixed}$ is initialized (e.g., from a Gaussian distribution) and frozen. Only the linear layer $W$, acting as a "latent basis," is updated during training.
  • Joint Updates: Because $W$ is shared across the entire codebook, every gradient step updates the entire latent space simultaneously. This ensures that even currently inactive codes are rotated and scaled to better align with the encoder's output distribution.
  • Straight-Through Estimator (STE): SimVQ maintains compatibility with standard VQ workflows by using STE to handle the non-differentiable nearest-neighbor selection.
The SimVQ update mechanism: by updating the latent basis W, the entire codebook is shifted and rotated jointly, ensuring all codes remain active.

Efficiency and Scalability

SimVQ breaks the traditional trade-off between codebook size and optimization stability. While vanilla VQ optimization memory scales with $O(Kd)$ (where $K$ is codebook size and $d$ is dimension), SimVQ scales with $O(d^2)$. This efficiency allows SimVQ to scale to massive codebooks (e.g., 262k tokens) without the performance degradation typically seen in standard VQ models.

Experimental Results

The researchers evaluated SimVQ on ImageNet-1k for vision and LibriTTS for audio reconstruction, yielding several key findings:

  • Codebook Utilization: SimVQ consistently achieves near 100% utilization, a massive leap from the ~1.4% typically observed in vanilla VQGAN.
  • Image Reconstruction: On ImageNet, SimVQ reached an rFID of 1.99 with a 262k codebook, significantly outperforming VQGAN-EMA (3.23).
  • Audio Fidelity: In audio tasks, SimVQ achieved a UTMOS score of 4.03, approaching the ground truth of 4.06 and outperforming established baselines like EnCodec.

Conclusion

By rethinking codebook optimization as a global space transformation rather than a local vector update, SimVQ provides a robust solution to representation collapse. Its simplicity—requiring only one additional linear layer—makes it an easily adoptable standard for future multimodal generative models.

Summary updated

BibTeX
@misc{zhu2024addressing,
  author = {Yongxin Zhu and Bocheng Li and Yifei Xin and Linli Xu},
  title = {{Addressing Representation Collapse in Vector Quantized Models with One Linear Layer}},
  year = {2024},
  eprint = {2411.02038},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.02038},
}
Figure