StableVQ:稳定矢量量化分词器训练的实用指南

·

研究论文 · 2026/09/23

向量量化(VQ)是离散视觉分词器的基础,支撑着现代自回归和掩码图像生成模型。尽管近期共享投影码本方法显著提升了码本利用率,但训练稳定性仍是关键且未被充分探索的挑战。作者认为根本原因在于编码器-解码器与码本训练的纠缠:由于两个模块都无法独立可靠地履行自身职责,系统只有在两者恰好协作时才能工作——这种脆弱条件在训练压力最大时恰恰会崩溃。为此提出StableVQ,重新审视每个模块的适当学习目标,并解决各自独立训练时出现的问题。具体包括:(1)动态STE纠正编码器学习目标的不稳定性,使其即使在码本利用率低时也能在离散正则化下稳健优化重建空间;(2)区域VQ损失重新构思码本的学习目标,使其能独立保证完全跟踪编码器输出分布,而不依赖编码器振荡来驱动激活;(3)解耦调度认识到编码器-解码器和码本的不同职责需要不同的优化动态,为各自分配独立的学习率调度以确保稳健的系统级行为。StableVQ构建在共享投影码本之上,轻量且不引入可学习参数。在ImageNet上的实验表明,在不同码本大小和初始化设置下,训练稳定性、码本利用率和重建质量均得到一致提升。

该论文针对离散视觉分词器训练不稳定的关键问题,提出了轻量且无需额外参数的解决方案,并在ImageNet上验证了其有效性,对提升自回归和掩码图像生成模型的训练可靠性具有实用价值。

Vector Quantization (VQ) is fundamental to discrete visual tokenizers that power modern autoregressive and masked image generation models. While recent shared-projection codebook methods have substantially advanced codebook utilization, training stability remains a critical and underexplored challenge. We argue that the root cause lies in the entanglement of the Encoder--Decoder and Codebook training: because neither module can reliably fulfill its own responsibility in isolation, the system can only function when the two subsystems happen to cooperate---a fragile condition that breaks down precisely when training is most stressed. We propose StableVQ, which revisits the proper learning objective of each module and resolves the problems that arise when each is trained to fulfill its own role independently. Concretely, (1) Dynamic STE corrects the instability in the Encoder's learning objective, enabling it to robustly optimize the reconstruction space under discrete regularization even when codebook utilization is low. (2) Region VQ Loss reconceives the Codebook's learning objective so that it can independently guarantee full tracking of the encoder output distribution, without relying on encoder oscillations to drive activation. (3) Decoupled Schedule recognizes that the distinct responsibilities of the Encoder--Decoder and the Codebook demand distinct optimization dynamics, and assigns each an independent learning rate schedule to ensure robust system-level behavior. Built on top of shared-projection codebooks, StableVQ is lightweight and introduces no learnable parameters. Experiments on ImageNet demonstrate consistent improvements in training stability, codebook utilization, and reconstruction quality across diverse codebook sizes and initialization settings.

阅读原文

参与讨论