Preventing Local Pitfalls in Vector Quantization via Optimal Transport

Borui Zhang, Wenzhao Zheng, Jie Zhou, Jiwen Lu
12/19/2024
cs.CVcs.LG

No official code found. Best implementation: Neur-IO/OptVQ (95 stars, MIT, last commit 2025-07-14).

Abstract

Vector-quantized networks (VQNs) have exhibited remarkable performance across various tasks, yet they are prone to training instability, which complicates the training process due to the necessity for techniques such as subtle initialization and model distillation. In this study, we identify the local minima issue as the primary cause of this instability. To address this, we integrate an optimal transport method in place of the nearest neighbor search to achieve a more globally informed assignment. We introduce OptVQ, a novel vector quantization method that employs the Sinkhorn algorithm to optimize the optimal transport problem, thereby enhancing the stability and efficiency of the training process. To mitigate the influence of diverse data distributions on the Sinkhorn algorithm, we implement a straightforward yet effective normalization strategy. Our comprehensive experiments on image reconstruction tasks demonstrate that OptVQ achieves 100% codebook utilization and surpasses current state-of-the-art VQNs in reconstruction quality.

View on arXivView PDF

Code Implementations(1)

Neur-IO/OptVQCommunity100%
MIT

Towards training VQ-VAE models robustly!

952PythonNov 27, 20241 years agoMIT
optimal-transportvector-quantizationvector-quantizedvq-vaevqgan+1 more

Similar Papers

Cite this paper

@article{zhang2024preventing,
  title  = {Preventing Local Pitfalls in Vector Quantization via Optimal Transport},
  author = {Borui Zhang and Wenzhao Zheng and Jie Zhou and Jiwen Lu},
  year   = {2024},
  eprint = {2412.15195},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.15195v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.15195.svg)](https://codeofpaper.com/paper/2412.15195)

Discussion