Internet publication
Online clustered codebook
- Abstract:
- Vector Quantisation (VQ) is experiencing a comeback in machine learning, where it is increasingly used in representation learning. However, optimizing the codevectors in existing VQ-VAE is not entirely trivial. A problem is codebook collapse, where only a small subset of codevectors receive gradients useful for their optimisation, whereas a majority of them simply ``dies off'' and is never updated or used. This limits the effectiveness of VQ for learning larger codebooks in complex computer vision tasks that require high-capacity representations. In this paper, we present a simple alternative method for online codebook learning, Clustering VQ-VAE (CVQ-VAE). Our approach selects encoded features as anchors to update the ``dead'' codevectors, while optimising the codebooks which are alive via the original loss. This strategy brings unused codevectors closer in distribution to the encoded features, increasing the likelihood of being chosen and optimized. We extensively validate the generalization capability of our quantiser on various datasets, tasks (e.g. reconstruction and generation), and architectures (e.g. VQ-VAE, VQGAN, LDM). Our CVQ-VAE can be easily integrated into the existing models with just a few lines of code.
- Publication status:
- Published
- Peer review status:
- Not peer reviewed
Actions
Access Document
- Files:
-
-
(Preview, Version of record, pdf, 5.5MB, Terms of use)
-
- Publisher copy:
- 10.48550/arxiv.2307.15139
Authors
- Host title:
- arXiv
- Publication date:
- 2023-07-27
- DOI:
- Language:
-
English
- Pubs id:
-
1771104
- Local pid:
-
pubs:1771104
- Deposit date:
-
2024-09-05
Terms of use
- Copyright holder:
- Zheng and Vedaldi
- Copyright date:
- 2023
- Rights statement:
- ©2023 The Authors. This paper is an open access article distributed under the terms of the Creative Commons Attribution (CC BY-NC-SA) license (http://creativecommons.org/licenses/by-nc-sa/4.0/)
If you are the owner of this record, you can report an update to it here: Report update to this record