Eindige Scalaire Kwantisatie: VQ-VAE Vereenvoudigd
Finite Scalar Quantization: VQ-VAE Made Simple
September 27, 2023
Auteurs: Fabian Mentzer, David Minnen, Eirikur Agustsson, Michael Tschannen
cs.AI
Samenvatting
Wij stellen voor om vectorquantisatie (VQ) in de latente representatie van VQ-VAEs te vervangen door een eenvoudig schema genaamd eindige scalaire quantisatie (FSQ), waarbij we de VAE-representatie terugbrengen tot een beperkt aantal dimensies (meestal minder dan 10). Elke dimensie wordt gequantiseerd naar een kleine set vaste waarden, wat resulteert in een (impliciet) codeboek dat wordt gevormd door het product van deze sets. Door het aantal dimensies en de waarden die elke dimensie kan aannemen zorgvuldig te kiezen, verkrijgen we dezelfde codeboekgrootte als bij VQ. Op basis van dergelijke discrete representaties kunnen we dezelfde modellen trainen die zijn getraind op VQ-VAE-representaties. Bijvoorbeeld autoregressieve en gemaskeerde transformermodellen voor beeldgeneratie, multimodale generatie en dichte voorspellingscomputer vision-taken. Concreet gebruiken we FSQ met MaskGIT voor beeldgeneratie en met UViM voor diepteschatting, inkleuring en panoptische segmentatie. Ondanks het veel eenvoudigere ontwerp van FSQ behalen we competitieve prestaties in al deze taken. Wij benadrukken dat FSQ niet lijdt onder codeboekcollaps en niet de complexe mechanismen nodig heeft die bij VQ worden gebruikt (commitmentverliezen, codeboekherinitialisatie, codesplitsing, entropiestraffen, etc.) om expressieve discrete representaties te leren.
English
We propose to replace vector quantization (VQ) in the latent representation
of VQ-VAEs with a simple scheme termed finite scalar quantization (FSQ), where
we project the VAE representation down to a few dimensions (typically less than
10). Each dimension is quantized to a small set of fixed values, leading to an
(implicit) codebook given by the product of these sets. By appropriately
choosing the number of dimensions and values each dimension can take, we obtain
the same codebook size as in VQ. On top of such discrete representations, we
can train the same models that have been trained on VQ-VAE representations. For
example, autoregressive and masked transformer models for image generation,
multimodal generation, and dense prediction computer vision tasks. Concretely,
we employ FSQ with MaskGIT for image generation, and with UViM for depth
estimation, colorization, and panoptic segmentation. Despite the much simpler
design of FSQ, we obtain competitive performance in all these tasks. We
emphasize that FSQ does not suffer from codebook collapse and does not need the
complex machinery employed in VQ (commitment losses, codebook reseeding, code
splitting, entropy penalties, etc.) to learn expressive discrete
representations.