Manuscript Offprint
arXiv:2610.34828Transporting Quantiles to Codebook: Scalable Vector Quantization without Codebook Collapse
Abstract
Effective discrete representation learning with VQ-VAE serves as a fundamental component of modern autoregressive generative models. However, it is widely known to suffer from codebook collapse and inefficient code utilization. To address this issue, we propose FlowVQ, a simple yet effective alternative to standard vector quantization by formulating neural quantization as a joint modeling and clustering process. Specifically, we learn the latent space using a lightweight flow matching model alongside training, corresponding to a probability flow ODE that transports an often fixed well-behaved source distribution while preserving probability mass. Based on this, we define the codebook by transporting even-quantile partitioned prior codes from the source space through the learned flow, and obtaining the Voronoi centroids under the induced distribution, leading to a structured discretization. We evaluated on image tokenization and generation, as well as on two tasks requiring high-precision tokenization, demonstrating scalability and improved expressivity of the codebook with full utilization. Code is available at: GitHub repository.
1 Introduction
Vector Quantized Variational AutoEncoder (VQ-VAE), proposed by Van Den Oord et al. [1], [2] demonstrates effective discrete latent representation learning by incorporating Vector Quantization (VQ) into reconstruction. It learns a finite set of codebook vectors and tokenizes continuous data into discrete sequences by mapping to the nearest vectors, enabling large autoregressive models for continuous data generation while leveraging the design, training, and scaling principles behind large language models. By balancing fidelity, expressiveness, and computational efficiency, VQ-VAE remains an essential building block of modern generative models that are adopted across diverse domains, including state-of-the-art models for image generation and video-based world modeling.
With codebook collapse and unscalable model capacity remaining unresolved, existing works have explored numerous ways to mitigate such issues. Early improvements [3–5] involved various training techniques such as random restart, random replacement, and k-means initialization. Williams et al. [6] and Takida et al. [7, 8] proposed stochastic quantization, Zhu et al. [9] and Chang et al. [10] proposed adding an additional projector layer or bridging network after a frozen codebook. With an altered latent space, model performance can be compromised, leading to degenerate reconstruction and representation learning. Recently, Lookup-Free Quantization (LFQ) [11–13] methods proposed an alternative to VQ based on direct scalar quantization with fixed hypercube geometry, rounding values in each dimension to the nearest point, and showed scalable codebook capacity with improved image generation using large vocabulary sizes beyond .
To circumvent codebook collapse, we propose that an ideal codebook should jointly model and cluster the latent space into even partitions alongside reconstruction training. The codebook vectors correspond to the Voronoi centers of these partitions, naturally allocating denser vectors to high-
40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure 1: FlowVQ on a three-mode 2D latent distribution (K = 50): the learned flow transports the approximately equal-mass quantile prior codebook , initialized using Sobol samples here and kept fixed thereafter, to the latent space. Self-correction refines each transported code using the pushed quantile samples , yielding the density-adaptive posterior codebook .
density regions and sparser vectors to low-density regions, regardless of the manifold geometry. This ensures full and balanced utilization, addressing expressiveness and scalability. Based on this principle, we propose a flow-based vector quantization approach without interfering with the representation learning objective.
A flow matching model [14] learns a continuous transport mapping samples from a prior distribution, such as a Gaussian, to an arbitrary data distribution. This transport corresponds to a Probability Flow ODE (PF-ODE) [15, 16], which preserves probability mass and transports prior quantiles to data quantiles. Based on this, we define the prior codebook uniformly in the well-behaved source space, and co-train the flow model with VQ-VAE. The codebook vectors are then obtained as the pushforward of the prior codebook and move toward the Voronoi centers under the estimated density. Experiments show that a lightweight flow model introduces minor overhead relative to VQ-VAE while maintaining full code utilization and improving performance.
In summary, our contributions are as follows:
-
We propose FlowVQ, a novel VQ technique that converts codebook learning into a quantile transport problem, where code utilization emerges as a geometric property of the latent space, enabling balanced usage and avoiding codebook collapse.
-
We show that FlowVQ consistently achieves full codebook utilization across a range of tasks, improving reconstruction and generation quality within a unified tokenizer framework.
Mitigating Codebook Collapse To address the codebook collapse, which leads to unscalable codebook capacity, an active line of work has been proposed to mitigate it. Early work addressed it with various tricks such as random restart or random replacement [3, 5]. Another line of work explored differentiable relaxation [4, 30, 31], most notably using the Gumbel–Softmax [32]. However, these approaches generally underperform and produces lower-quality reconstruction [6]. Takida et al. [7, 8] proposed improving the mode-dropping behavior by switching to stochastic quantization but suffer from similar unrealistic reconstructions. Zhu et al. [9] and Chang et al. [10] addressed the under-utilization issue by adding intermediate projection layer(s) between a frozen codebook and the decoder. In a parallel track, Mentzer et al. [11], Yu et al. [12], and Weber et al. [13] proposed LFQ, which rounds each dimension to the nearest point in a hypercube, and scales the codebook capacity with its size using direct scalar quantization. These methods demonstrate competitive or improved image generation performance, especially with large vocabulary sizes beyond to .
The majority of the existing works mitigate this issue without fundamentally solving it. To our knowledge, the closest work is OptVQ [22], which introduces global information via optimal transport between batch latents and the codebook. However, its cost matrix requires per-batch normalization for numerical stability, which distorts the transport cost inconsistently across batches. Moreover, the resulting doubly stochastic assignment is converted to a hard assignment, which does not guarantee that every code is selected, especially under stronger entropy regularization. Full utilization thus depends on the entropy weight, which trades off quantization accuracy against utilization and may be sub-optimal for a given task as observed in our experiments.
3 Method
3.1 Preliminary
We define a codebook where , is the number of code vectors and is the latent vector dimension. Given an input , the original latent vector is , and the quantized vector is defined as:
With sg() indicating the stop gradient operator, the original VQ-VAE trains with the following objective function. is a training dynamics dependent coefficient that controls the expansion rate of driven by the reconstruction objective, while ensuring the effectiveness of the STE operator in the reconstruction loss:
3.2 Flow-based Codebook
In this work, we propose to define the codebook in the prior space, which we call the prior codebook . The prior space can be arbitrary, as long as it supports uniform sampling. To achieve uniform sampling, we partition the prior space into K equal probability mass quantiles using its cumulative distribution function (CDF) . is then obtained by applying the inverse CDF to the centers of these quantiles:
In higher dimensional latent spaces, as d increases, exact uniform quantile partitioning becomes intractable. We use Sobol sequences, a low-discrepancy quasi-random sequence designed to evenly fill multi-dimensional spaces to generate approximate uniformly distributed quantile centers. Specifically, we first generate K points in the CDF as d-dimensional unit hypercube :
Then obtain the prior codebook for each quantile similarly
We define the learned quantizer flow velocity field as , and the associated flow map as . Let the data distribution be . During VQ-VAE training, it is trained to match the current latent distribution over with the conditional flow matching objective:
(5) where
With latent distribution modeling and clustering handled by a separate flow model, the explicit codebook loss term in Eq (2) is no longer required. The flow matching objective is optimized in a decoupled manner and should introduce minimal interference to the reconstruction and quantization objectives. The overall training objective is then updated to:
(6)
The final codebook used in vector quantization is periodically updated. Each code vector is obtained as the pushforward of the prior codebook through the trained flow :
The codebook structure closely follows the geometry of the latent manifold and adapts to its density, naturally providing sharper resolution in denser regions and coarser in sparser regions. This is in contrast to the original VQ, which is sensitive to both initialization and training dynamics due to its reliance on both codebook and commitment losses between only matched pairs, which are a root cause of codebook collapse. Similarly, fixed-geometry approaches such as LFQ do not adapt to the latent distribution, including empty regions beyond the latent boundaries and holes within it, which limits their expressivity.
3.3 Self-Correction toward Voronoi Centroids
Up to this point, a set of approximately uniform points in the latent space is obtained through Eq (7) as the codebook , which only fulfills the first two key properties of faithful latent modeling and approximately even partitioning. To minimize the approximation error arising from the quasi-random sequence and the non-linear flow mapping, we introduce a self-correction mechanism that updates toward the Voronoi centroids as the Euclidean centers of the transported quantiles, aiming to achieve the final desired property of the codebook. This process can be viewed as transporting each quantile cell through a set of its uniformly spread samples.
The trained flow serves as a proxy for the latent data distribution. Denoting N as a sampling ratio, we uniformly draw NK points from the prior and push them through the flow to the latent space as dense samples similarly, simulating the incoming latent data for vector quantization as \{z_e^'\}.
We then cluster with respect to the current codebook and update each toward the corresponding cluster centroid, implementing a self-correction mechanism that improves codebook alignment with the latent manifold. This process is analogous to k-means clustering initialized with well-chosen centers.
Where denotes the K quantile clusters in the latent space, and corresponds to the current codebook vectors of the quantiles. This process is performed iteratively a few times and deterministic with minimal overhead.
Optionally, we can further correct the codebook online towards the cluster centroids of real latent data during co-training. This could reduce the remaining approximation error due to finite samples and model error. Specifically, this online correction reinstates the codebook loss of in Eq (2) in Eq (6), which can pose a risk of re-introducing codebook collapse between two codebook updates. However, due to the quality of the flow partition and frequent codebook update, we did not observe significant collapse in our experiments and found it can further improve the model slightly over the purely self-corrected version.
4 Experiments
In this section, We evaluate FlowVQ on image reconstruction and generation in terms of generation quality with common metrics such as FID, IS, and codebook quality, measured by its entropy and utilization rate. We first evaluate it on CIFAR-10 [33] in Sec 4.1.1, followed by ImageNet-1K [34] at resolution in Sec 4.1.2.
To further examine the expressivity induced by FlowVQ and its general applicability, we evaluate FlowVQ on two high-precision tasks: crystalline material tokenization in Sec 4.2.1, and action tokenization for robotics in Sec 4.2.2
4.1 Image Tokenization
4.1.1 CIFAR-10
As various design choices affect the final model performance, to understand the sole effect of VQ techniques, we first conduct a set of controlled experiments on CIFAR-10. All models share the same encoder and decoder architecture and training scheme (47M parameters), differing only in the quantizer, i.e., quantization and codebook update. The image is compressed to the latent space by a fixed factor , i.e. from to an patch token grid. We evaluate reconstruction under different codebook sizes and dimensions to examine the codebook scalability.
For baselines, we compare against two most common quantization methods: VQ-GAN [18, 13], and hypercubic LFQ method [12, 13]. We also compare with OptVQ [22]. For a fair comparison with LFQ method, which ties the codebook size to the latent vector dimension , we adjust accordingly for and . We also explored the effect of auxiliary entropy loss, a technique widely adopted to improve codebook utilization in existing works [11-13, 35], which optimizes the mutual information between the latent inputs and codebook, as illustrated in [36, 37]:
| d | rFID↓ | IS ↑ | SSIM↑ | PSNR↑ | LPIPS↓ | MAE↓ | Entropy↑ | Util % ↑ | ||
|---|---|---|---|---|---|---|---|---|---|---|
| VQ-GAN+ | 10 | 1024 | 2.40 | 10.77 | 0.78 | 23.62 | 0.130 | 0.050 | 8.81 | 45.6 |
| 10 | 10240 | 2.65 | 10.70 | 0.75 | 23.27 | 0.143 | 0.052 | 8.07 | 2.7 | |
| w/o | 14 | 16384 | 1.93 | 10.88 | 0.81 | 24.79 | 0.115 | 0.044 | 8.71 | 2.6 |
| 14 | 16384 | 1.65 | 10.87 | 0.81 | 24.82 | 0.114 | 0.044 | 8.57 | 2.8 | |
| LFQ | 10 | 1024 | 3.00 | 10.65 | 0.74 | 23.01 | 0.149 | 0.058 | 8.46 | 50.0 |
| w/o | 14 | 16384 | 2.95 | 10.83 | 0.73 | 22.57 | 0.161 | 0.056 | 5.91 | 0.8 |
| 14 | 16384 | 2.03 | 10.83 | 0.83 | 24.96 | 0.104 | 0.043 | 13.83 | 100.0 | |
| OptVQ | 10 | 1024 | 3.42 | 10.79 | 0.76 | 23.50 | 0.138 | 0.050 | 9.99 | 100.0 |
| 10 | 10240 | 1.95 | 10.88 | 0.85 | 25.31 | 0.091 | 0.041 | 13.27 | 100.0 | |
| 14 | 16384 | 1.72 | 10.93 | 0.85 | 25.78 | 0.087 | 0.039 | 13.94 | 100.0 | |
| FlowVQ | 10 | 1024 | 2.11 | 10.71 | 0.80 | 24.28 | 0.118 | 0.046 | 9.93 | 100.0 |
| 10 | 10240 | 1.87 | 10.68 | 0.83 | 25.39 | 0.100 | 0.040 | 13.28 | 100.0 | |
| 14 | 16384 | 1.40 | 10.72 | 0.86 | 26.50 | 0.086 | 0.036 | 13.97 | 100.0 | |
| w/ | 14 | 16384 | 1.39 | 10.89 | 0.87 | 26.72 | 0.081 | 0.035 | 13.97 | 100.0 |
Table 1: Evaluation of image quality and codebook utilization on CIFAR-10. By default, all baselines optimize the auxiliary entropy loss while FlowVQ does not if not specified. As the entropy maximization is tightly coupled in the OptVQ optimization process, we did not explore removing it.
For FlowVQ, the velocity field is modeled using a lightweight 4-layer MLP with hidden dimension (0.2M extra parameters). We observe this setting to be effective in producing an aligned latent space and fix it across all tasks. We set the source distribution to a normal distribution . The dense prior samples are generated with a ratio . We start the initial codebook construction at the step, then update it every 1000 steps using batch size 128.
Result Analysis The results are summarized in Table 1. We can spot the codebook collapse of the original VQ immediately when increases from 1024 to 10240 with a fixed latent dimension. The number of active codes decreases from to , leading to degenerate overall performance. The entropy regularization drastically improves the utilization rate of LFQ, but does not guarantee full utilization when balancing multiple objectives of minimizing quantization error and maximally filling the hypercube simultaneously. The same conflict applies to OptVQ, which was observed to learn fast in early steps, but plateaus much earlier than methods that are solely driven by the quantization objective, such as VQGAN and FlowVQ here. Nevertheless, we note that VQ-GAN serves as a strong baseline due to its flexibility, which leads to high-quality alignment between the codebook and an evolving latent space.
We observe that FlowVQ achieves significant improvements in both image quality, with rFID = 1.40, reconstruction error MAE of 0.036, and codebook quality with full utilization across all settings. The performance consistently improves with increasing . Explicit optimizing the mutual information further improves the model slightly, though we note the performance is very close between the two. Both variants achieve the highest entropy (13.97, near the maximum ), indicating the most balanced usage across codes, which validates the effectiveness of the proposed method.
Codebook Visualization We next provide visualizations of the latent space on the evaluation set and codebook alignment between FlowVQ and baselines without global information in Fig 2. We can see the codebook collapse pattern in VQ-GAN, where a large number of codes at the bottom left remain unused despite the active codes aligning well with the latent space, while LFQ imposes a hypercube geometry, so holes in latent space inevitably lead to unused codes. FlowVQ, on the contrary, models the geometry flexibly similar to VQ-GAN and imposes no additional regularization on the latent shape, resulting in high code utilization that allows it to scale with the codebook size.

a) VQ-GAN

b) LFQ

c) FlowVQ
Figure 2: Visualization of (left) the latent vectors on the evaluation set ●; (middle) the codebook ▲; (right) the joint plot of latent vectors ● and codebook vectors ▲ in each plot. For each model, the latent vectors and code vectors are randomly down-sampled to the same number, then jointly reduced to 3D using t-SNE for visualization.
Time Analysis One potential concern for the proposed method is that the pushforward operation can be time-consuming. We measure the average training time per 1000 steps (one codebook update cycle) for all models in robotics VLA model Table 6 in Appendix B. FlowVQ takes on average 618s compared to 535s for VQ-GAN, increased by 15.6% with the difference mostly due to the codebook update, which takes 82.8s on average. This time is expected to further decrease with more GPU memory. Meanwhile, as the prior vectors are pre-defined in the fixed source space, the update is fully deterministic and easily supports distributed execution with minimal communication overhead. We implement the distributed update. It takes 3s per codebook update on 32 NVIDIA A100 GPUs for for large scale training such as ImageNet, thus comparable speed to the original VQ-GAN.
4.1.2 ImageNet-1K

Figure 3: class-conditioned generation on ImageNet-1K trained model. Each image corresponds to a different class. More samples can be found in Appendix C.3.
| Model | Tokenizer | |C| | #tokens | #params | rFID↓ | gFID ↓ | IS ↑ |
|---|---|---|---|---|---|---|---|
| ImageNet-1K val. data [21] | 1.78 | 236.9 | |||||
| LDM-4-G [23] | Continuous* | 8192 | 400M | - | 3.60 | 247.7 | |
| LDM-8-G [23] | Continuous* | 16384 | 506M | - | 7.76 | 209.5 | |
| MAR-L-407M [38] | Continuous | - | 407M | 1.22 | 1.97 | 291.2 | |
| FSQ [11] | LFQ | 1000 | 155M | - | 4.53 | - | |
| MAGVIT-v2 [12] | LFQ | 262144 | 307M | - | 1.78 | 319.4 | |
| Open-MAGVIT2-AR-B [39] | LFQ | 262144 | 343M | 1.67 | 3.08 | 258.3 | |
| BSQ [40] | LFQ | 262144 | 174M | 1.14 | 5.44 | 139.6 | |
| taming-VQGAN | VQ | 1024 | 310M | 7.94 | 5.88 | 304.8 | |
| taming-VQGAN | VQ | 16384 | 310M | 4.98 | - | - | |
| MaskGIT [35] | VQ | 1024 | 227M | 2.28 | 6.18 | 182.1 | |
| SQ-VAE-2 [7] | VQ | 3072 | - | 4.51 | - | - | |
| LlamaGen [41] | VQ | 16384 | 343M | 2.19 | 4.21 | 200.1 | |
| VAR-d16 [21] | VQ | 4096 | 310M | - | 3.30 | 274.4 | |
| VAR-d20 [21] | VQ | 4096 | 600M | - | 2.57 | 302.6 | |
| FlowVQ | VQ | 16384 | 307M | 1.48 | 1.89 | 351.4 |
Table 2: Image reconstruction and generation on ImageNet-1K with classifier free guidance. We compare FlowVQ with the existing works with similar model capacity and their guided or rejection sampling scores. * LDM reconstructs on continuous space, but generation discretizes input to the nearest token.
We next extend the evaluation on ImageNet-1K at a resolution of for both reconstruction and generation. For stage one, the model shares a similar design to Sec 4.1.1 but is constructed deeper using channel multiplier as [1,1,2,2,4], leading to a compression ratio and a token grid. We train the model for 1.35M steps using batch size 256, and a single-cycle cosine scheduler with a base learning rate 1e-4 using the AdamW optimizer [42].
For stage two, we train a Masked Language Model (MLM) to generate images similar to the existing line of works [35, 11, 43, 40, 39, 12]. We use a cosine mask schedule from MaskGIT [35] which demonstrated superior generative performance. The MLM contains 307M parameters, comparable to GPT2-medium capacity. It is trained with the same learning rate and steps as stage one. Following convention, we report FID [44] and IS [45] scores for guided generation. More hyperparameter details can be found in Appendix C.2.
From Table 2, under similar model capacity, FlowVQ achieves a good balance between reconstruction and generation. It achieves the highest IS score and outperforms all models in terms of gFID with 1.89, except MAGVIT-v2 (1.78), where FlowVQ uses only 6.25% of its vocabulary size. The baselines include MAR-L-407M, which uses a slightly larger generator and autoregressively generates images in the original continuous latent space without tokenization, as well as models using advanced VQ techniques such as VAR and SQ-VAE-2, which use multi-scale and residual VQ, respectively. Like other VQ methods, FlowVQ is compatible with those techniques.
For qualitative measure, we plot the generated samples in Figure 3. We also validate generalization of the codebook by reconstructing unseen images from COCO-2017 validation set in Figure 4, where we found FlowVQ can produce more faithful and plausible reconstruction over details and particularly faces.

Figure 4: Reconstruction on unseen images from COCO-2017 validation data on ImageNet-1K trained model.
4.2 High Precision Tokenization
To examine the potential of an adaptive and fully utilized codebook for FlowVQ as a general tokenizer, we would like to extend the evaluation beyond the image domain. One natural task to consider is high-precision tokenization, especially where structural representation is missing and generation can greatly benefit from the discretized representation learning. Data containing geometric, motion, and spatial state information usually resides in continuous space, and small numerical differences can lead to significantly different physical states or interaction outcomes. Tokenization needs to allocate sufficient resolution to ensure that distinct physical configurations do not collapse into indistinguishable tokens. The current common practice uses k-means initialized VQ-VAE [27–29]. We consider two representative tasks here: crystalline material tokenization in Sec 4.2.1 and robot action tokenization in Sec 4.2.2.
4.2.1 Crystalline Material Tokenization
We evaluate tokenization techniques for crystalline materials based on their ability to faithfully represent crystal structures using an atom-based encoder–decoder transformer. Crystals exhibit periodic atomic arrangements in 3D space and are commonly represented by a unit cell containing a set of atoms. Each atom is described by a tuple (A, X, L), where A is its one-hot atom type vector, X is its 3D fractional coordinates, and L is the lattice information. These components are then concatenated into a single vector before being fed into the model.
We evaluate on MP-20 [46] with and . As VQ-VAE and OptVQ benefit from an aligned initialization [27-29], and to isolate the effect of the quantizer, we initialize their codebooks with k-means centroids of the training-set latents from the same autoencoder at epoch , when FlowVQ quantization begins. All methods also start from the same encoder and decoder weights. For evaluation, we follow prior work [47] by comparing each reconstructed material with its ground-truth material using StructureMatcher from PyMatgen [48] and reporting the resulting match rate. We do not report codebook utilization rate for this task because MP-20 is a relatively small dataset, and the evaluation distribution does not fully cover the training distribution, which is reflected as only 7,408 of the 8,192 codes derived from the training data k-means clusters were actively used on the evaluation set. This number can further vary with the latent geometry evolving during training. We analyze the number of actively utilized codes instead.
| VQVAE | LFQ | OptVQ(ε=10*) | KM-VQVAE | KM-OptVQ(ε=10) | KM-OptVQ(ε=1) | FlowVQ | FlowVQ(w/ oc) | |
|---|---|---|---|---|---|---|---|---|
| Match Rate ↑ | 47.16 % | 24.63% | 10.81% | 78.38% | 17.85% | 53.27% | 90.81 % | 90.66 % |
- in Eq. 8 of the original paper, where is the open-source configuration across all tasks and used for table 1 experiments.
Table 3: Match rate between the reconstructed and ground-truth material on MP-20.
FlowVQ significantly outperforms all baseline methods, including k-means initialized techniques. It achieves the highest match rate (90.81%) with 7178 actively utilized codes on average, compared to the second best method KM-VQVAE as 78.38% with the average actively used code number as 3192. LFQ and OptVQ generally perform poorly on this task. For k-means initialized OptVQ, reducing from 10 to 1, which strengthens the entropy regularization as its weight scales with , improves the match rate from 17.85% to 53.27% but significantly reduces the number of active codes from 7110 to 1311, consistent with our analysis in Sec 2. More details on the experiment setting can be found in Appendix D.
4.2.2 Robotics Action Tokenization
Robot actions in foundation models [49–52] have recently been represented as action chunks [53, 54], as fixed-length sequences of actions. Each action is represented as a vector defining the next delta movement. We evaluate on the DROID dataset [55] and compare with common action tokenizers: 1) FAST+ [56], which applies the Discrete Cosine Transform (DCT) to each action dimension of a chunk, quantizes the coefficients by scaling and rounding, flattens them from low to high frequency, and compresses the resulting sequence with a pretrained Byte-Pair Encoding (BPE) [57, 58] vocabulary, 2) K-means initialized VQ-VAE. Similar to Sec 4.2.1, we use an encoder-decoder transformer with quantization applied in the latent space. is set to 2048 for fair comparison with existing tokenizers, latent dimension d = 8, and more details can be found in Appendix E.
| FAST+ | KM-VQVAE | FlowVQ | |
|---|---|---|---|
| MSE(e-4) ↓ | 2.40 | 1.88 | 1.71 |
| Utilization ↑ | 97.02% | 10.89% | 100% |
Table 4: Trajectory reconstruction error of 50-step action chunks on DROID dataset.
From Table 4, we observe FlowVQ achieves full codebook utilization on validation trajectories throughout the training, and reaches the lowest reconstruction error of . KM-VQVAE starts with full utilization, but gradually drops to during training. Both FlowVQ and KM-VQVAE yield a more accurate reconstruction of action compared to FAST+.
4.3 Ablation Study
To better understand the contribution of the learned transport and of each codebook correction mechanism, we ablate FlowVQ on CIFAR-10 and MP-20 and report the best model performance in Table 5. On both tasks, the prior codebook transport can deliver more accurate tokenization compared to baseline methods reflected as lower FID score and higher material match rate (FID 1.49 vs 1.65 in Table 1; 88.15% vs 78.38% in Table 3), and adding self-correction stabilizes the training with less fluctuation observed. Adding online correction on top further improves image tokenization slightly, while performing on par on material tokenization.
(a) Image Tokenization: CIFAR-10
| FID ↓ | IS ↑ | SSIM ↑ | PSNR ↑ | LPIPS ↓ | MAE ↓ | Entropy ↑ | Util ↑ | |
|---|---|---|---|---|---|---|---|---|
| 1.49 | 10.79 | 0.856 | 26.11 | 0.086 | 0.038 | 13.92 | 100% | |
| 1.52 | 10.70 | 0.841 | 25.73 | 0.094 | 0.039 | 13.97 | 100% | |
| 1.40 | 10.72 | 0.861 | 26.50 | 0.086 | 0.036 | 13.97 | 100% |
(b) Crystalline Material Tokenization: MP-20
| MP-20 Match Rate | |||
|---|---|---|---|
| Match Rate ↑ | 88.15% | 90.81% | 90.66% |
Table 5: Ablation study on FlowVQ components on CIFAR-10 image tokenization and MP-20 material tokenization tasks. With details in Sec 3.3, sc refers to self-correction mechanism, and oc refers to the optional online-correction mechanism.
5 Conclusion
To summarize, we introduced FlowVQ, a vector quantization technique that reformulates codebook learning in classic VQ-VAE as a quantile-based transport process, where balanced code utilization is governed by the geometry of the latent space rather than a byproduct of auxiliary optimization objectives. By constructing the codebook via deterministic pushforwards from a uniform prior and refining them through self-correction, FlowVQ achieves stable and balanced code usage while avoiding codebook collapse. We conducted experiments across a range of tokenization and generation tasks, demonstrating consistently improved reconstruction and generation quality. We hope the proposed method will serve as a useful tool, especially in fields where features are naturally continuous or hybrid, and benefit from learned representations.
Limitations and Future Work In addition to the slight increase in training time, FlowVQ primarily focuses on addressing codebook collapse, while another important limitation of VQ-VAE lies in the reliance on the biased STE for backpropagation through discrete quantization. Recent works have shown that this gradient mismatch can be alleviated through simple rotation tricks [59], but more effective alternatives remain largely unexplored. Another direction worth exploring is to investigate FlowVQ together with recent architectures on flexible-length [60, 61] or flexible-resolution [62] embedding learning, which may enable more adaptive token allocation to regions with higher semantic or structural complexity, leading to further improvements.
Acknowledgments We thank the anonymous reviewers for their constructive feedback and suggestions, which improved the paper. We thank Liu Nian for sharing his code for k-means initialized VQ-VAE for crystalline material tokenization, which enabled an insightful comparison during the development. Zekun Shi is partially supported by the Singapore Economic Development Board through the Industrial Postgraduate Programme.
References
[1] Aaron Van Den Oord, Oriol Vinyals, et al. Neural discrete representation learning. Advances in neural information processing systems, 30, 2017.
[2] Ali Razavi, Aaron Van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with vq-vae-2. Advances in neural information processing systems, 32, 2019.
[3] Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, and Ilya Sutskever. Jukebox: A generative model for music. arXiv preprint arXiv:2005.00341, 2020.
[4] Eirikur Agustsson, Fabian Mentzer, Michael Tschannen, Lukas Cavigelli, Radu Timofte, Luca Benini, and Luc V Gool. Soft-to-hard vector quantization for end-to-end learning compressible representations. Advances in neural information processing systems, 30, 2017.
[5] Chuanxia Zheng and Andrea Vedaldi. Online clustered codebook. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 22798–22807, 2023.
[6] Will Williams, Sam Ringer, Tom Ash, David MacLeod, Jamie Dougherty, and John Hughes. Hierarchical quantized autoencoders. Advances in Neural Information Processing Systems, 33: 4524–4535, 2020.
[7] Yuhta Takida, Takashi Shibuya, WeiHsiang Liao, Chieh-Hsin Lai, Junki Ohmura, Toshimitsu Uesaka, Naoki Murata, Shusuke Takahashi, Toshiyuki Kumakura, and Yuki Mitsufuji. SQ-VAE: Variational bayes on discrete representation with self-annealed stochastic quantization. In International Conference on Machine Learning, 2022.
[8] Yuhta Takida, Yukara Ikemiya, Takashi Shibuya, Kazuki Shimada, Woosung Choi, Chieh-Hsin Lai, Naoki Murata, Toshimitsu Uesaka, Kengo Uchida, Wei-Hsiang Liao, et al. Hq-vae: Hierarchical discrete representation learning with variational bayes. Trans. Mach. Learn. Res., 2024.
[9] Lei Zhu, Fangyun Wei, Yanye Lu, and Dong Chen. Scaling the codebook size of vq-gan to 100,000 with a utilization rate of 99%. Advances in Neural Information Processing Systems, 37: 12612–12635, 2024.
[10] Yifan Chang, Jie Qin, Limeng Qiao, Xiaofeng Wang, Zheng Zhu, Lin Ma, and Xingang Wang. Scalable training for vector-quantized networks with 100% codebook utilization. International Conference on Learning Representations, 2026.
[11] Fabian Mentzer, David Minnen, Eirikur Agustsson, and Michael Tschannen. Finite scalar quantization: Vq-vae made simple. In The Twelfth International Conference on Learning Representations, 2024.
[12] Lijun Yu, José Lezama, Nitesh Bharadwaj Gundavarapu, Luca Versari, Kihyuk Sohn, David Minnen, Yong Cheng, Agrim Gupta, Xiuye Gu, Alexander G Hauptmann, et al. Language model beats diffusion-tokenizer is key to visual generation. In ICLR, 2024.
[13] Mark Weber, Lijun Yu, Qihang Yu, Xueqing Deng, Xiaohui Shen, Daniel Cremers, and Liang-Chieh Chen. Maskbit: Embedding-free image generation via bit tokens. Transactions on Machine Learning Research, 2024.
[14] Yaron Lipman, Ricky TQ Chen, Heli Ben-Hamu, Maximilian Nickel, and Matt Le. Flow matching for generative modeling. arXiv preprint arXiv:2210.02747, 2022.
[15] Dimitra Maoutsa, Sebastian Reich, and Manfred Opper. Interacting particle solutions of fokker–planck equations through gradient–log–density estimation. Entropy, 22(8):802, 2020.
[16] Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020.
[17] Aaron Van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelcnn decoders. Advances in neural information processing systems, 29, 2016.
[18] Patrick Esser, Robin Rombach, and Bjorn Ommer. Taming transformers for high-resolution image synthesis. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 12873–12883, 2021.
[19] Doyup Lee, Chiheon Kim, Saehoon Kim, Minsu Cho, and Wook-Shin Han. Autoregressive image generation using residual quantization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 11523–11532, 2022.
[20] Chuanxia Zheng, Tung-Long Vuong, Jianfei Cai, and Dinh Phung. Movq: Modulating quantized vectors for high-fidelity image generation. Advances in Neural Information Processing Systems, 35:23412–23425, 2022.
[21] Keyu Tian, Yi Jiang, Zehuan Yuan, Bingyue Peng, and Liwei Wang. Visual autoregressive modeling: Scalable image generation via next-scale prediction. Advances in neural information processing systems, 37:84839–84865, 2024.
[22] Borui Zhang, Wenzhao Zheng, Jie Zhou, and Jiwen Lu. Preventing local pitfalls in vector quantization via optimal transport. arXiv preprint arXiv:2412.15195, 2024.
[23] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 10684–10695, 2022.
[24] Sander Dieleman, Aaron Van Den Oord, and Karen Simonyan. The challenge of realistic music generation: modelling raw audio at scale. Advances in neural information processing systems, 31, 2018.
[25] Wilson Yan, Yunzhi Zhang, Pieter Abbeel, and Aravind Srinivas. Videogpt: Video generation using vq-vae and transformers. arXiv preprint arXiv:2104.10157, 2021.
[26] Jake Bruce, Michael D Dennis, Ashley Edwards, Jack Parker-Holder, Yuge Shi, Edward Hughes, Matthew Lai, Aditi Mavalankar, Richie Steigerwald, Chris Apps, et al. Genie: Generative interactive environments. In Forty-first International Conference on Machine Learning, 2024.
[27] Mahdi Pourmirzaei, Alex Morehead, Farzaneh Esmaili, Jarett Ren, Mohammadreza Pourmirzaei, and Dong Xu. Gcp-vqvae: A geometry-complete language for protein 3d structure. bioRxiv, pages 2025–10, 2025.
[28] Shuqi Lu, Haowei Lin, Lin Yao, Zhifeng Gao, Xiaohong Ji, Linfeng Zhang, Guolin Ke, et al. Uni-3dar: Unified 3d generation and understanding via autoregression on compressed spatial tokens. arXiv preprint arXiv:2503.16278, 2025.
[29] ZiJie Qiu, Luozhijie Jin, Zijian Du, Hongyu Chen, Yan Cen, Siqi Sun, Yongfeng Mei, and Hao Zhang. Vqcrystal: Leveraging vector quantization for discovery of stable crystal structures. arXiv preprint arXiv:2409.06191, 2024.
[30] Alexei Baevski, Steffen Schneider, and Michael Auli. vq-wav2vec: Self-supervised learning of discrete speech representations. In International Conference on Learning Representations, 2020.
[31] Shiyin Jiang, Wei Long, Minghao Han, Zhenghao Chen, Ce Zhu, and Shuhang Gu. Differentiable vector quantization for rate-distortion optimization of generative image compression. arXiv preprint arXiv:2604.10546, 2026.
[32] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In International Conference on Learning Representations, 2017.
[33] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
[34] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee, 2009.
[35] Huiwen Chang, Han Zhang, Lu Jiang, Ce Liu, and William T Freeman. Maskgit: Masked generative image transformer. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 11315–11325, 2022.
[36] Andreas Krause, Pietro Perona, and Ryan Gomes. Discriminative clustering by regularized information maximization. Advances in neural information processing systems, 23, 2010.
[37] Aren Jansen, Daniel PW Ellis, Shawn Hershey, R Channing Moore, Manoj Plakal, Ashok C Popat, and Rif A Saurous. Coincidence, categorization, and consolidation: Learning to recognize sounds with minimal supervision. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 121–125. IEEE, 2020.
[38] Tianhong Li, Yonglong Tian, He Li, Mingyang Deng, and Kaiming He. Autoregressive image generation without vector quantization. Advances in Neural Information Processing Systems, 37:56424–56445, 2024.
[39] Zhuoyan Luo, Fengyuan Shi, Yixiao Ge, Yujiu Yang, Limin Wang, and Ying Shan. Open-magvit2: An open-source project toward democratizing auto-regressive visual generation. arXiv preprint arXiv:2409.04410, 2024.
[40] Yue Zhao, Yuanjun Xiong, and Philipp Kraehenbuehl. Image and video tokenization with binary spherical quantization. In The Thirteenth International Conference on Learning Representations, 2025.
[41] Peize Sun, Yi Jiang, Shoufa Chen, Shilong Zhang, Bingyue Peng, Ping Luo, and Zehuan Yuan. Autoregressive model beats diffusion: Llama for scalable image generation. arXiv preprint arXiv:2406.06525, 2024.
[42] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019.
[43] Lijun Yu, Yong Cheng, Kihyuk Sohn, José Lezama, Han Zhang, Huiwen Chang, Alexander G Hauptmann, Ming-Hsuan Yang, Yuan Hao, Irfan Essa, et al. Magvit: Masked generative video transformer. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10459–10469, 2023.
[44] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017.
[45] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. Advances in neural information processing systems, 29, 2016.
[46] Anubhav Jain, Shyue Ping Ong, Geoffroy Hautier, Wei Chen, William Davidson Richards, Stephen Dacek, Shreyas Cholia, Dan Gunter, David Skinner, Gerbrand Ceder, et al. Commentary: The materials project: A materials genome approach to accelerating materials innovation. APL materials, 1(1), 2013.
[47] Chaitanya K Joshi, Xiang Fu, Yi-Lun Liao, Vahe Gharakhanyan, Benjamin Kurt Miller, Anuroop Sriram, and Zachary Ward Ulissi. All-atom diffusion transformers: Unified generative modelling of molecules and materials. In Forty-second International Conference on Machine Learning, 2025.
[48] Shyue Ping Ong, William Davidson Richards, Anubhav Jain, Geoffroy Hautier, Michael Kocher, Shreyas Cholia, Dan Gunter, Vincent L Chevrier, Kristin A Persson, and Gerbrand Ceder. Python materials genomics (pymatgen): A robust, open-source python library for materials analysis. Computational Materials Science, 68:314–319, 2013.
[49] Moo Jin Kim, Karl Pertsch, Siddharth Karamcheti, Ted Xiao, Ashwin Balakrishna, Suraj Nair, Rafael Rafailov, Ethan P Foster, Pannag R Sanketi, Quan Vuong, et al. Openvla: An open-source vision-language-action model. In 8th Annual Conference on Robot Learning, 2024.
[50] Physical Intelligence, Kevin Black, Noah Brown, James Darpinian, Karan Dhabalia, Danny Driess, Adnan Esmail, Michael Equi, Chelsea Finn, Niccolo Fusai, et al. : a vision-language-action model with open-world generalization. arXiv preprint arXiv:2504.16054, 2025.
[51] Jose Barreiros, Andrew Beaulieu, Aditya Bhat, Rick Cory, Eric Cousineau, Hongkai Dai, Ching-Hsin Fang, Kunimatsu Hashimoto, Muhammad Zubair Irshad, Masha Itkina, et al. A careful examination of large behavior models for multitask dexterous manipulation. Science Robotics, 11(113):eaea6201, 2026.
[52] Han Xue, Jieji Ren, Wendi Chen, Gu Zhang, Yuan Fang, Guoying Gu, Huazhe Xu, and Cewu Lu. Reactive diffusion policy: Slow-fast visual-tactile policy learning for contact-rich manipulation. In Proceedings of Robotics: Science and Systems (RSS), 2025.
[53] Tony Z Zhao, Vikash Kumar, Sergey Levine, and Chelsea Finn. Learning fine-grained bimanual manipulation with low-cost hardware. arXiv preprint arXiv:2304.13705, 2023.
[54] Lucy Lai, Ann ZX Huang, and Samuel J Gershman. Action chunking as conditional policy compression. Cognition, 264:106201, 2025.
[55] Alexander Khazatsky, Karl Pertsch, Suraj Nair, Ashwin Balakrishna, Sudeep Dasari, Siddharth Karamcheti, Soroush Nasiriany, Mohan Kumar Srirama, Lawrence Yunliang Chen, Kirsty Ellis, et al. Droid: A large-scale in-the-wild robot manipulation dataset. arXiv preprint arXiv:2403.12945, 2024.
[56] Karl Pertsch, Kyle Stachowicz, Brian Ichter, Danny Driess, Suraj Nair, Quan Vuong, Oier Mees, Chelsea Finn, and Sergey Levine. Fast: Efficient action tokenization for vision-language-action models. arXiv preprint arXiv:2501.09747, 2025.
[57] Philip Gage. A new algorithm for data compression. C Users Journal, 12(2):23–38, 1994.
[58] Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of the 54th annual meeting of the association for computational linguistics (volume 1: long papers), pages 1715–1725, 2016.
[59] Christopher Fifty, Ronald Guenther Junkins, Dennis Duan, Aniketh Iyengar, Jerry Weihong Liu, Ehsan Amid, Sebastian Thrun, and Christopher Re. Restructuring vector quantization with the rotation trick. In The Thirteenth International Conference on Learning Representations, 2025.
[60] Keita Miwa, Kento Sasaki, Hidehisa Arai, Tsubasa Takahashi, and Yu Yamaguchi. One-d-piece: Image tokenizer meets quality-controllable compression. arXiv preprint arXiv:2501.10064, 2025.
[61] Roman Bachmann, Jesse Allardice, David Mizrahi, Enrico Fini, Oğuzhan Fatih Kar, Elmira Amirloo, Alaaeldin El-Nouby, Amir Zamir, and Afshin Dehghan. Flextok: Resampling images into 1d token sequences of flexible length. In Forty-second International Conference on Machine Learning, 2025.
[62] Yucheng Mao, Zeyuan Chen, Xiaojun Shan, Xiang Zhang, Divyansh Srivastava, Bingnan Li, and Zhuowen Tu. Quadtok: Quadtree visual tokenizer for autoregressive image generation. arXiv preprint arXiv:2610.10497, 2026.
[63] Nian Liu, Yuwei Zeng, Ryoji Kubo, Nikita Kazeev, Stephen Gregory Dale, Artem Maevskiy, Pengru Huang, Thomas Laurent, Kostya S Novoselov, and Xavier Bresson. Composable crystals: Controllable materials discovery via concept learning. arXiv preprint arXiv:2605.14769, 2026.
[64] Claudio Zeni, Robert Pinsler, Daniel Zügner, Andrew Fowler, Matthew Horton, Xiang Fu, Zilong Wang, Aliaksandra Shysheya, Jonathan Crabbé, Shoko Ueda, et al. A generative model for inorganic materials design. Nature, 639(8055):624–632, 2025.
[65] Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. The faiss library. IEEE Transactions on Big Data, 2025.
Appendix
A Algorithm
Here we now present the pseudocode of the complete training scheme for FlowVQ in Algorithm 1.
Algorithm 1 Flow-based Vector Quantization (FlowVQ)
Require: Dataset , Encoder , Decoder , Quantizer Require: -total steps, -codebook size, -codebook dimension, -dense sample ratio -starting steps, -codebook update frequency, - coefficient
1: Initialize prior codebook and dense samples:
2: for to do 3: if then 4: 5: 6: else 7: if then 8: while not converged do 9: for 10: 11: end while 12: end if 13: if then 14: 15: 16: end if 17: 18: 19: 20: 21: end if 22: end for
B Training Time Comparison
Here we report the mean training time per 1000 steps as one codebook update cycle using .
For training time, the relatively higher variance of FlowVQ is due to the usage of adaptive ODE solver Dopri45, where we did not investigate alternative solvers in this work. In particular, fixed-step Euler integration may offer further speedups without significantly compromising performance, a possibility that remains to be explored.
| 」 | VQ-GAN | LFQ | OptVQ | FlowVQ w/ sc |
|---|---|---|---|---|
| t (s)↓ |
Table 6: Runtime per 1,000 steps (one codebook update cycle) on a single NVIDIA A5000 GPU, with no other processes running and .
C Image Tokenization
C.1 Image Reconstruction
The hyper-parameters for image tokenization tasks for both CIFAR-10 and ImageNet-1K are listed in Table 7:
| Config | CIFAR-10 Reconstruction | ImageNet-1k Reconstruction |
|---|---|---|
| input size | ||
| latent size | ||
| batch size | 128 | 256 |
| Data Augmentation | False | True |
| random cropping | [0.8, 1.0] | |
| random aspect ratio | ||
| resize to input size | True | |
| random horizontal flip | True | |
| Optimizer | AdamW | |
| base lr | ||
| beta | [0.9, 0.999] | |
| weight decay | ||
| warmup step | 0 | 5000 |
| scheduler | Cosine | |
| gradient clipping norm | 1.0 | |
| total steps | 1.35M | |
| Model | ||
| hidden dimension | 128 | |
| channel multiplier | [1, 2, 4] | [1, 1, 2, 2, 4] |
| residual blocks | 2 | 2 |
| Loss Coefficients | ||
| discriminator start step | 20k | |
| 0.25 | ||
| weight | 4.0 | |
| 0.02 | ||
| 0.1 | ||
| 0.001 | ||
| 0.02 | ||
| 1 | ||
| GPU | A5000 | A100 |
Table 7: Hyperparameters for image reconstruction.
C.2 Masked Language Model
The hyper-parameters for image generation using masked language model is listed here for ImageNet-1K are listed in Table 8 below:
| Config | |
|---|---|
| #Tokens | 16 × 16 |
| batch size | 1024 |
| Data Augmentation | |
| random cropping | [0.8, 1.0] |
| resize to input size | True |
| random horizontal flip | True |
| Optimizer | AdamW |
| base lr | |
| beta | [0.9, 0.96] |
| weight decay | 0.045 |
| warmup step | 5000 |
| scheduler | Cosine |
| gradient clipping norm | 1.0 |
| total steps | 1.35M |
| Model | |
| hidden dimension | 4096 |
| attention heads | 16 |
| depth | 24 |
| dropout | 0.1 |
| label dropout | 0.1 |
| class label smoothing | 0.1 |
| mask schedule | arccos |
| classifier free sampling | |
| temperature | 9.0 |
| guidance | 7.6 |
| scale power | 2.5 |
| GPU | A100 |
Table 8: Hyperparameters for masked language model on image generation.

Figure 5: goldfish, Carassius auratus
C.3 More Generated Samples
In this section, we present more samples using classifier free guidance. The model is given the same label in the batch size 25. We reshape the output to and plot here over different classes:

Figure 6: ostrich, Struthio camelus

Figure 7: tree frog, tree-frog

Figure 8: tusker

Figure 9: king penguin, Aptenodytes patagonica

Figure 10: lion, king of beasts, Panthera leo

Figure 11: mongoose

Figure 12: cab, hack, taxi, taxicab

Figure 13: carpenter's kit, tool kit
D Material Tokenization
We follow [63] for the data processing, model design and training for crystalline material tokenization using atom only features without using atom neighbor information. Each material is represented by its minimum repeating unit, containing the lattice information as 3 lattice base vectors , and a set of atoms within, represented using a one-hot atom type A and continuous 3D coordinate in the fractional coordinate. Following Mattergen [64], a normalized rotational invariant representation is used, where and are the left and right singular vectors of , respectively, and is the diagonal matrix of singular values.
We used a transformer-based encoder-decoder architecture, where the encoder contains 6 and decoder contains 2 transformer blocks. The hidden dimension is 512 and each transformer block uses 8 attention heads. We set the starting epoch W to 500, and update the codebook at every M = 5 epochs. The model is trained using Adam optimizer, with constant learning rate and batch size 128. The codebook size K = 8192 and vector size d = 8. The loss function is defined as follows where is enabled only when online correction is used, and is chosen for both VQ-VAE and FlowVQ to keep all loss terms on comparable scales:
For baseline models, we performed k-means clustering on the training data latent vectors of the autoencoder at epoch W using FAISS [65] , and used the resulting cluster centroids to initialize VQ-VAE and Opt-VQ codebook vectors. To ensure consistency with the initial latent space, and fair comparison from the same starting point, we also initialized the encoder and decoder weights using those of the autoencoder. For LFQ, we used the implementation from vector-quantize-pytorch library .
E Action Tokenization
The action tokenization is evaluated on the DROID dataset [55], which contains 76k successful demonstration trajectories. We split the original trajectories into 80% train, 10% validation and 10% test set, then further processed them into non-overlapping chunks of 50 steps. The codebook size K is set to 2048 for fair comparison with existing tokenizers, and vector size d = 8. The codebook construction starts at step , and is update at every steps using batch size 512. The model contains 8 transformer blocks for both encoder and decoder, using 8 attention heads and hidden dimension as 512. Similarly, we train the model using a constant learning rate and Adam optimizer.
For the baseline FAST+ tokenizer, we use the weight downloaded from its original HuggingFace repository .
https://github.com/facebookresearch/faiss