Introduction
Autoregressive (AR) models have emerged as a powerful paradigm for image generation, mirroring the success of Large Language Models (LLMs) in the textual domain. These models operate by discretizing images into a sequence of visual tokens from a predefined codebook and predicting them sequentially. However, a significant bottleneck in current AR image generation is the use of "flat" vocabularies, where thousands of tokens are treated as independent, unrelated categories. This paper introduces MASC (Manifold-Aligned Semantic Clustering), a framework designed to structure the visual vocabulary into a hierarchical tree that respects the underlying geometry of the data manifold, thereby simplifying the model's prediction task and accelerating training.
The Inefficiency of Flat Vocabularies
In standard AR image models, the vocabulary (or codebook) is typically unstructured. This approach ignores the inherent semantic relationships between tokens. For instance, different textures representing a blue sky are semantically closer to each other than to tokens representing grass. By treating 16,384 or more tokens as independent classes, the model is forced to solve a high-entropy classification problem at every step. This leads to slow convergence, as the model must implicitly re-learn these semantic relationships from scratch during training, wasting significant computational capacity.
The MASC Framework
MASC addresses this by introducing a "structural prior" into the prediction space through a preprocessing framework. The core innovations of MASC include:
1. Manifold-Aligned Similarity Metric
Traditional clustering algorithms like k-means rely on Euclidean distance to a central point (centroid). In high-dimensional spaces, these centroids often fall into "off-manifold" regions—empty spaces that do not correspond to any real data. MASC replaces this with a centroid-free, instance-based average distance. By calculating similarity based on all pairs of tokens between two groups, MASC better respects the curved geometry of the data manifold.
2. Density-Driven Agglomerative Construction
MASC builds its hierarchical tree from the bottom up. Starting with individual tokens, it iteratively merges the most similar pairs. This process naturally prioritizes high-density regions of the manifold, ensuring that semantically coherent tokens are grouped together early in the hierarchy.
3. Vocabulary Reduction and Decoding
The resulting tree is "cut" at a specific level to create $k$ semantic branches. During training, the AR model predicts these coarse-grained branches rather than individual tokens, significantly reducing prediction uncertainty (Shannon entropy). At inference, the model predicts a branch, which is then mapped back to a specific token using strategies like Random Sampling or Hierarchical Decoding.
Experimental Results
The researchers evaluated MASC on the ImageNet-1K benchmark at 256×256 resolution using the LlamaGen family of models. The results demonstrate substantial improvements in both efficiency and quality.
Training Acceleration
MASC achieved massive speedups across all model scales. Most notably, it accelerated the training of LlamaGen-XL by 57%, reaching the baseline's final quality in less than half the time. This efficiency stems from the reduced entropy of the prediction task; the model becomes more confident because it distinguishes between semantically distinct categories rather than thousands of nearly identical tokens.
Image Fidelity
Beyond speed, MASC reached superior final performance. On LlamaGen-XL, it improved the Fréchet Inception Distance (FID) from 2.87 to 2.58 and boosted the Inception Score (IS) from 267.6 to 272.1.
The figures above illustrate the high-quality results achieved by the MASC framework, showcasing its ability to capture complex textures, reflections, and realistic lighting conditions.
Conclusion
MASC demonstrates that how we organize the prediction space is as critical as the model architecture itself. By aligning the visual vocabulary with the data manifold, MASC provides a beneficial inductive bias that makes the learning objective significantly easier. This approach not only slashes training time but also pushes the boundaries of image fidelity in autoregressive generation. Future work may explore dynamic priors that co-evolve with the model or more sophisticated context-aware decoders to further refine fine-grained details.
Summary updated