通过聚类优化视觉标记预测,提升大模型图像生成效率与质量。
Improving Autoregressive Visual Generation with Cluster-Oriented Token Prediction
- 将视觉代码本按相似性聚类重组,增强特征内部一致性。
- 设计簇导向交叉熵损失,即使预测错误也大概率落在正确簇内。
- 适用于多种视觉生成模型,训练提速50%且效果不降。
将大语言模型(LLM)应用于视觉生成已成为研究热点。然而,现有方法多直接迁移LLM架构至视觉领域,忽视了语言与视觉的本质差异,可能导致视觉生成能力未被充分挖掘。本文探索了在LLM框架下视觉嵌入空间的特性,发现视觉嵌入间的相关性有助于实现更稳定、鲁棒的生成结果。为此,我们提出IAR(Improved AutoRegressive Visual Generation),一种改进的自回归视觉生成方法,显著提升基于LLM的视觉生成模型的训练效率与生成质量。首先,我们提出代码本重排策略,利用平衡k-means聚类算法将视觉代码本重构为高内聚簇,确保每簇内视觉特征高度相似。在此基础上,设计簇导向交叉熵损失,引导模型准确预测标记所属簇。该机制使即便预测索引错误,所生成标记仍极大概率位于正确簇中,从而大幅提升生成质量与鲁棒性。大量实验表明,该方法在100M至1.4B参数规模下均有效,训练时间缩短50%,同时保持相同FID指标。该方法可广泛适配各类基于LLM的视觉生成模型,符合缩放定律,为未来研究提供新方向。代码已开源:https://github.com/sjtuplayer/IAR。
原文摘要 · Abstract (English)
Employing LLMs for visual generation has recently become a research focus. However, the existing methods primarily transfer the LLM architecture to visual generation but rarely investigate the fundamental differences between language and vision. This oversight may lead to suboptimal utilization of visual generation capabilities within the LLM framework. In this paper, we explore the characteristics of visual embedding space under the LLM framework and discover that the correlation between visual embeddings can help achieve more stable and robust generation results. We present IAR, an Improved AutoRegressive Visual Generation Method that enhances the training efficiency and generation quality of LLM-based visual generation models. Firstly, we propose a Codebook Rearrangement strategy that uses balanced k-means clustering algorithm to rearrange the visual codebook into clusters, ensuring high similarity among visual features within each cluster. Leveraging the rearranged codebook, we propose a Cluster-oriented Cross-entropy Loss that guides the model to correctly predict the cluster where the token is located. This approach ensures that even if the model predicts the wrong token index, there is a high probability the predicted token is located in the correct cluster, which significantly enhances the generation quality and robustness. Extensive experiments demonstrate that our method consistently enhances the model training efficiency and performance from 100M to 1.4B, reducing the training time by half while achieving the same FID. Additionally, our approach can be applied to various LLM-based visual generation models and adheres to the scaling law, providing a promising direction for future research in LLM-based visual generation. The code is available at: https://github.com/sjtuplayer/IAR.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。