Nested AutoRegressive Models

Hongyu Wu, Xuhui Fan, Zhangkai Wu, Longbing CaoarXiv 2025 · DOI

Abstract

Autoregressive (AR) models have emerged as powerful competitors to diffusion models in image generation, yet they often struggle with a trade-off between inference speed and sample diversity. This paper introduces NestAR (Nested AutoRegressive), a hierarchical framework that nests patch-wise generation within multi-scale modules. By exponentially increasing patch sizes across scales, NestAR reduces computational complexity from $O(n)$ to $O(\log n)$. Experimental results on ImageNet-256 demonstrate that NestAR achieves a state-of-the-art Inception Score of 342.4 and an FID of 2.22, while operating up to 20x faster than traditional diffusion models.

The Speed-Diversity Challenge in AR Models

Standard AR models, which generate images token-by-token, suffer from $O(n)$ complexity, making high-resolution generation prohibitively slow. While recent variants like Visual AutoRegressive (VAR) models speed up this process by predicting entire resolutions at once, they often sacrifice sample diversity, leading to repetitive or "safe" outputs. The challenge lies in developing a model that maintains the sequential dependency required for high diversity while achieving the efficiency of resolution-based generation.

Methodology: The NestAR Framework

NestAR addresses this challenge through a two-level nested architecture designed for both speed and creativity.

1. Hierarchical Multi-Scale Modules

Instead of a single monolithic model, NestAR utilizes a series of modules stacked in a hierarchy. Each module is responsible for a specific image scale, with larger-scale modules conditioned on the outputs of smaller ones. This structure allows the model to handle global layout and local details at appropriate resolutions.

Multi-scale image representation across hierarchical resolutions.

2. Nested Patch-wise AR Structure

Within each scale module, NestAR does not generate the entire resolution in a single step. Instead, it employs a second AR structure to generate patches of tokens. This sequential patch-wise generation preserves the local dependencies that drive high diversity in traditional AR models.

Architectural comparison between NestAR, standard AR, and Visual AR (VAR).

Technical Innovations

  • Logarithmic Complexity: By exponentially increasing patch sizes across modules, NestAR reduces the number of evaluation steps to $O(\log n)$. This allows the model to generate high-quality images in approximately 50 steps, compared to the 256+ steps required by previous AR approaches.
  • Continuous Tokens and Flow Matching: To avoid the information loss associated with discrete codebooks (like VQ-VAE), NestAR uses continuous tokens. It employs Flow Matching to predict the "velocity" needed to transform noise into clean image patches, resulting in higher fidelity and fewer artifacts.
  • Coordinating Objective: A specialized loss function ensures that different scales remain synchronized by matching the velocities of consecutive modules, ensuring a consistent direction for image generation.

Experimental Results

NestAR was evaluated on the ImageNet-256 dataset using a pre-trained KL-16 tokenizer. The results highlight a superior balance of speed and quality:

  • State-of-the-Art Diversity: NestAR-H achieved an Inception Score (IS) of 342.4, a 5.9% improvement over the previous state-of-the-art (VAR).
  • High-Fidelity Generation: The model maintained a competitive FID of 2.22, ensuring visual realism alongside diversity.
  • Inference Efficiency: NestAR generates up to 9.5 images per second on a single A100 GPU, making it roughly 20x faster than standard diffusion and traditional AR models like MAR.

Conclusion and Future Work

NestAR demonstrates that hierarchical nesting is a viable path toward efficient, high-diversity image generation. By reducing complexity to $O(\log n)$, it bridges the gap between slow, diverse token-based models and fast, less diverse resolution-based models. Future research may explore scaling this nested approach to video generation or complex 3D scene synthesis, where hierarchical structure is inherently critical.

Summary updated

BibTeX
@misc{wu2025nested,
  author = {Hongyu Wu and Xuhui Fan and Zhangkai Wu and Longbing Cao},
  title = {{Nested AutoRegressive Models}},
  year = {2025},
  eprint = {2510.23028},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.23028},
}
Figure