TL;DR
MVAR (Markovian Visual AutoRegressive modeling) introduces scale and spatial Markov assumptions to multi-scale image generation, reducing attention complexity from $O(N^2)$ to $O(Nk)$. By conditioning predictions only on adjacent scales and localized neighborhoods, MVAR slashes GPU memory usage by up to 4.2×, eliminates the need for a KV cache during inference, and achieves superior image generation quality on standard benchmarks.
What Problem Does This Paper Address?
Autoregressive (AR) models have excelled at generating text and images by predicting the "next token" based on all previous tokens. Recently, Visual Autoregressive (VAR) modeling improved on this by shifting from a raster-scan order to a "next-scale" prediction paradigm, generating multi-scale image tokens from coarse to fine.
However, vanilla VAR suffers from severe scale and spatial redundancy. It forces every scale to condition on all preceding scales, and every token to attend globally to all preceding tokens across those scales. This dense, global attention demands quadratic computational complexity ($O(N^2)$) and enormous GPU memory footprints, requiring massive Key-Value (KV) caches during inference and making training on consumer-grade hardware virtually impossible.
Methods
To eliminate these redundancies, the authors propose MVAR, which applies Markovian conditional independence assumptions to both the scale and spatial dimensions of visual generation:
- Scale-Markovian Conditioning: Instead of looking back at every single previous scale, MVAR models the transition probability by conditioning the next scale only on its immediate predecessor. This localized dependency allows the model to use a parallel training strategy across scales, significantly lowering peak memory usage.
- Spatial-Markovian Attention: Within those adjacent scales, MVAR replaces global attention with a localized alternative. Each query token only attends to a compact neighborhood of size $k$ (e.g., $7 \times 7$) at its corresponding position on the adjacent scale.
Together, these changes drop the computational complexity of the attention mechanism from $O(N^2)$ to $O(Nk)$, where $k \ll N$. Crucially, because tokens no longer depend on a long history of past states, MVAR completely eliminates the need for a KV cache during inference.
Datasets
The authors evaluated MVAR across several standard image generation benchmarks:
- ImageNet (at $256 \times 256$ and $512 \times 512$ resolutions) for class-conditional image generation.
- CelebA (at $256 \times 256$ and $512 \times 512$ resolutions) to test scalability up to a 2B-parameter model.
- FFHQ (at $256 \times 256$ resolution) to verify generalization across different data distributions.
Key Insights and Ideas
- The "Aha!" Moment on Scale Redundancy: By analyzing the attention weights of vanilla VAR models, the authors discovered that higher-resolution scales naturally prioritize local refinements and pay negligible attention to non-adjacent, coarser scales. Visual information exhibits strong conditional independence across non-adjacent scales.
- Locality Beats Global Dispersion: Attention maps between adjacent scales show a heavily diagonally dominant pattern. This means that global attention is largely wasted in later stages of visual generation; tokens primarily interact with their immediate geometric neighbors to resolve fine textural details.
Key Results
- Hardware Accessibility: MVAR can be trained from scratch using just eight consumer-grade NVIDIA RTX 4090 GPUs, democratizing multi-scale AR training.
- Memory and Speedups: MVAR reduces inference memory consumption by up to 4.2× compared to VAR-d24 (9,860MB vs. 40,971MB at batch size 64) and achieves an average 3.0× reduction in training memory footprint. It also delivers up to a 1.7× training speedup.
- Generation Quality: On ImageNet $256 \times 256$, MVAR-d16 trained from scratch achieved a Fréchet Inception Distance (FID) of 3.09 and an Inception Score (IS) of 285.5, outperforming the vanilla VAR-d16 baseline (FID 3.55, IS 280.4).
Limitations and Future Work
While MVAR optimizes the transformer learning paradigm, it still relies on the original VQ-VAE tokenizer architecture inherited from VAR. The authors note that integrating more advanced, modern image tokenizers could yield further performance gains. Additionally, while MVAR shows great promise for high-resolution images, extending this localized Markovian framework to video synthesis—where KV cache demands are traditionally catastrophic—remains an exciting but unexplored frontier.
Summary updated