Mirai: Autoregressive Visual Generation Needs Foresight

Yonghao Yu, Lang Huang, Zerun Wang, Runyi Li, Toshihiko Yamasaki · DOI

Abstract

Autoregressive (AR) visual generators model images as sequences of discrete tokens and are trained with next token likelihood. This strict causality supervision optimizes each step only by its immediate next token, which diminishes global coherence and slows convergence. We ask whether foresight, training signals that originate from later tokens, can help AR visual generation. We conduct a series of controlled diagnostics along the injection level, foresight layout, and foresight source axes, unveiling a key insight: aligning foresight to AR models' internal representation on the 2D image grids improves causality modeling. We formulate this insight with Mirai, a general framework that injects future information into AR training with no architecture change and no extra inference overhead. Extensive experiments show that Mirai significantly accelerates convergence and improves generation quality. For instance, Mirai can speed up LlamaGen-B's convergence by up to 10x and reduce the generation FID from 5.34 to 4.34 on the ImageNet class-condition image generation benchmark.

Introduction

Autoregressive (AR) models, successful in large language modeling, have been adapted for visual generation by flattening images into 1D sequences of tokens. However, unlike text, visual data is inherently 2D and relies heavily on bidirectional spatial contexts. Standard AR training uses strict causal masking, where the model only learns to predict the immediate next token. This local feedback loop often results in slow convergence and poor global coherence, leading to artifacts like disconnected object parts.

The researchers behind Mirai (meaning "future" in Japanese) propose that visual AR models fundamentally need "foresight"—the ability to anticipate future tokens during training to better plan the global layout.

The Mirai Framework

Mirai introduces an auxiliary "foresight alignment" loss during training. Instead of just predicting the next token at the output layer, the model aligns its internal hidden states with representations that contain future information.

The Mirai framework injects foresight by aligning internal representations of the AR model with a foresight encoder.

Key Design Choices

  1. Internal Alignment: Aligning intermediate hidden states is more effective than predicting future tokens at the output layer, which can cause gradient interference.
  2. 2D Spatial Layout: Foresight targets are selected based on their 2D grid coordinates rather than their position in a flattened 1D sequence, preserving spatial locality.
  3. Foresight Sources:
  4. Mirai-E (Explicit): Uses an Exponential Moving Average (EMA) of the AR model to provide explicit foresight from future positions.
  5. Mirai-I (Implicit): Leverages a frozen, pretrained bidirectional vision encoder (DINOv2). Since DINOv2 sees the whole image at once, its representation for any patch implicitly contains global "future" context.

Importantly, the alignment heads are discarded after training. The final model performs standard causal next-token prediction during inference with zero added computational cost.

Experimental Results

Mirai demonstrates significant improvements in both training efficiency and final image quality.

Mirai-I achieves a 10x speedup in convergence compared to the LlamaGen-B baseline, reaching a lower FID in 40 epochs than the baseline does in 400.

Performance Gains

  • Convergence Speed: Mirai-I matches the performance of a 400-epoch baseline in just 40 epochs, representing a 10x speedup. Mirai-E achieves a 5x speedup.
  • Image Quality: On ImageNet 256x256, Mirai-I improves the FID of LlamaGen-B from 5.34 to 4.34. For the larger LlamaGen-XL, it achieves a state-of-the-art FID of 2.59.
  • Compute Efficiency: Despite a minor 6.6% overhead per training step due to the foresight encoder, the massive reduction in required epochs leads to a 9.4x reduction in total training compute to reach baseline quality.

Conclusion

Mirai proves that injecting future-aware signals into the internal representations of AR models during training can overcome the limitations of strict causality. By leveraging 2D spatial context and bidirectional encoders, Mirai enables faster training and higher-quality visual generation without any inference-time penalties. While highly effective, Mirai-E requires a "warm-up" period of standard training because the model's own EMA is initially unstable. Future work may explore applying this foresight-driven approach to other high-dimensional modalities like video generation.

Summary updated

BibTeX
@inproceedings{yu2026mirai,
  author = {Yonghao Yu and Lang Huang and Zerun Wang and Runyi Li and Toshihiko Yamasaki},
  title = {{Mirai: Autoregressive Visual Generation Needs Foresight}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=eQucuwD0dM},
}
Figure