Autoregressive Image Generation with Linear Complexity: A Spatial-Aware Decay Perspective

Yuxin Mao, Zhen Qin, Jinxing Zhou, Hui Deng, Xuyang Shen, Bin Fan, Jing Zhang, Yiran Zhong, Yuchao DaiarXiv 2025 · DOI

Introduction

Autoregressive (AR) models have emerged as a powerful paradigm for image generation, successfully adapting the sequence-modeling capabilities of Large Language Models (LLMs) to visual data. However, the standard Transformer architecture's quadratic complexity ($O(N^2)$) with respect to sequence length creates a significant computational bottleneck, especially for high-resolution images. While linear attention mechanisms ($O(N)$) offer a potential solution, their direct application to vision tasks has historically led to poor performance. This paper introduces LASADGen, a model that achieves linear complexity without sacrificing image quality by incorporating a "Spatial-Aware Decay" mechanism.

The Spatial Mismatch Problem

The primary challenge in applying linear attention to images lies in the flattening of 2D spatial data into 1D sequences. Most AR models use a raster-scan order, which places the end of one row adjacent to the start of the next. In NLP-focused linear attention, decay mechanisms are used to prioritize local context. When applied to images, these mechanisms cause information to "bleed" across row boundaries, destroying the spatial coherence required for high-quality synthesis. For instance, standard linear attention can result in an FID as high as 50.86, compared to 5.46 for a standard Transformer.

Linear Attention with Spatial-Aware Decay (LASAD)

The proposed LASAD mechanism addresses this dimensional mismatch by introducing a spatial-aware mask. Instead of a continuous decay, the model explicitly resets the decay factor at every row boundary of the flattened image. This ensures that the model respects the 2D topology of the image, preventing inappropriate information flow between spatially distant regions that happen to be adjacent in the 1D sequence.

The Spatial-Aware Decay mechanism resets the decay factor at row boundaries during the 1D flattening process to preserve 2D spatial relationships.

Experimental Results

LASADGen was evaluated on the ImageNet1K dataset at 256x256 resolution. The model family scales from 111M to 1.4B parameters, demonstrating consistent improvements over the baseline LlamaGen architecture.

Performance and Scaling

LASADGen-L (Large) achieved an FID of 2.90, significantly outperforming the baseline LlamaGen-L's 3.80. The largest variant, LASADGen-XXL, reached an FID of 2.36. These results indicate that the spatial-aware prior is a critical component for scaling linear attention in vision.

FID and Training Loss curves show consistent improvement and scaling across different model sizes (B, L, XL, XXL).

Efficiency

Due to its $O(N)$ complexity, LASADGen provides substantial inference speedups. It outperforms both standard AR models and Diffusion-based models (like DiT) in terms of throughput at equivalent parameter counts, making it a viable candidate for high-resolution and large-scale image generation tasks.

Conclusion

LASADGen demonstrates that the limitations of linear attention in vision are not due to model capacity but rather a lack of spatial awareness. By introducing a simple yet effective row-boundary reset, LASADGen achieves state-of-the-art performance with linear complexity. Future research will focus on extending this approach to variable-resolution generation and video synthesis.

Summary updated

BibTeX
@misc{mao2025autoregressive,
  author = {Yuxin Mao and Zhen Qin and Jinxing Zhou and Hui Deng and Xuyang Shen and Bin Fan and Jing Zhang and Yiran Zhong and Yuchao Dai},
  title = {{Autoregressive Image Generation with Linear Complexity: A Spatial-Aware Decay Perspective}},
  year = {2025},
  eprint = {2507.01652},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.01652},
}
Figure