E-CAR: Efficient Continuous Autoregressive Image Generation via Multistage Modeling

Zhihang Yuan, Yuzhang Shang, Hanling Zhang, Tongcheng Fang, Rui Xie, Bingxin Xu, Yan Yan 0002, Shengen Yan, Guohao Dai, Yu WangarXiv 2024 · DOI

Autoregressive (AR) models have long dominated natural language processing, yet adapting the "next-token prediction" paradigm to image generation has faced significant hurdles. While continuous AR models—which bypass discrete codebooks—show promise in output quality, they are often computationally prohibitive. E-CAR (Efficient Continuous Autoregressive) introduces a novel architectural shift, moving from sequential next-token prediction to a hierarchical next-stage prediction, enabling real-time performance without compromising quality.

The Challenge: Sequential Bottlenecks in Image AR

Traditional image AR models operate like a typewriter, generating patches (tokens) in a raster-scan order. This approach suffers from two primary limitations:

  1. Sequential Dependency: Tokens must be generated one by one, leading to $O(n^3)$ complexity for high-resolution images.
  2. Sampling Overhead: Continuous models often require expensive iterative denoising for every single token.
Comparison of image generation paradigms: (a) Typical diffusion, (b) Typical discrete AR, (c) Masked AR (MAR), and (d) the proposed E-CAR.

As shown in Figure 2, while Masked AR (MAR) improves upon standard AR by predicting masked tokens, it still relies on a full denoising process at each step. E-CAR addresses this by decomposing the generation into progressive stages.

Methodology: Multistage Modeling and Flow Matching

E-CAR breaks the "typewriter" bottleneck through two core innovations:

1. Stage-wise Progressive Token Map Generation

Instead of predicting individual tokens, E-CAR predicts entire resolution levels. It begins with a coarse $8 \times 8$ map, which serves as a prefix for a $16 \times 16$ map, followed by a $32 \times 32$ map. This hierarchical approach allows for parallel processing within each stage, reducing complexity from $O(n^3)$ to $O(n^2)$.

2. Multistage Flow-based Denoising

E-CAR integrates denoising directly into the growth process. Rather than a single final decoding step, the model performs "stagewise partial denoising." After each stage, the result is upsampled and "renoised" to maintain distribution consistency before the next refinement stage.

Detailed architecture of E-CAR, illustrating the attention mask for stage-wise prediction and the corresponding denoising models for each stage.

Figure 3 details the training objective, where a flow-matching loss is applied across stages. The AR Transformer uses a specific attention mask to ensure that higher-resolution stages are conditioned on lower-resolution "prefixes."

Key Results and Performance

Evaluated on the ImageNet 256×256 dataset using an SDXL VAE tokenizer, E-CAR demonstrates remarkable efficiency:

  • Inference Speed: On an NVIDIA 4090, E-CAR-L generates an image in 0.94 seconds, a nearly 60× speedup over the MAR-H model (59.54s).
  • Computational Efficiency: The model achieves a 10× reduction in FLOPs compared to standard Diffusion Transformers (DiT-XL/2).
  • Image Quality: E-CAR-L reached an FID of 4.99 within 800k training iterations. While currently trailing the FID of 2.27 set by DiT-XL/2 (trained for 7M iterations), the efficiency-to-quality ratio is unprecedented.

Conclusion and Future Directions

E-CAR demonstrates that the multi-scale, hierarchical nature of images is better suited for stage-wise AR modeling than 1D sequences. While the current model shows a slight quality gap compared to the most mature diffusion models, its training curves suggest significant room for improvement with further scaling. Future work will explore applying this multistage approach to high-resolution (1024px+) synthesis and video generation, where sequential bottlenecks are most severe.

Summary updated

BibTeX
@misc{yuan2024e,
  author = {Zhihang Yuan and Yuzhang Shang and Hanling Zhang and Tongcheng Fang and Rui Xie and Bingxin Xu and Yan Yan and Shengen Yan and Guohao Dai and Yu Wang},
  title = {{E-CAR: Efficient Continuous Autoregressive Image Generation via Multistage Modeling}},
  year = {2024},
  eprint = {2412.14170},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.14170},
}
Figure