Equivariant Image Modeling

Ruixiao Dong, Mengde Xu, Zigang Geng, Li Li, Han Hu, Shuyang GuarXiv 2025 · DOI

Modern generative models, such as Autoregressive (AR) or Diffusion-based systems, typically decompose image synthesis into a sequence of subtasks. However, these subtasks are often heterogeneous; for instance, in a standard raster-scan AR model, predicting a corner pixel relies on a fundamentally different context than predicting a center pixel. This non-stationarity leads to optimization conflicts where model parameters must satisfy varying goals across different spatial positions, resulting in training inefficiencies and poor generalization.

To address this, we introduce Equivariant Image Modeling, a framework that ensures the generation rule remains identical across all parts of an image. By leveraging 1D column-wise tokenization and windowed causal attention, the model achieves spatial equivariance, leading to superior training efficiency and remarkable zero-shot extrapolation capabilities.

Methodology

The core of the proposed framework lies in transforming 2D image generation into a spatially invariant 1D sequence task.

  1. 1D Tokenization (Columnization): Instead of traditional 2D grid patching, images are encoded into vertical columns. This "scroll" representation simplifies spatial relationships to a single horizontal axis while naturally preserving vertical structures.
  2. Windowed Causal Attention: Standard AR models suffer from an imbalance where later tokens have access to significantly more context than earlier ones. By employing a fixed-size sliding window, every token is predicted using the same amount of local context. This makes the subtasks identical across the entire sequence.
  3. Flow Matching Backbone: The model utilizes a flow-matching objective on top of a transformer backbone to predict subsequent columns by denoising them from random noise, conditioned on the preceding window.
The Equivariant Image Modeling pipeline, illustrating the 1D tokenizer and the windowed causal attention mechanism within the transformer layers.

Key Insights: The "Scroll" Philosophy

By treating an image as a continuous scroll rather than a fixed-size canvas, the model learns local textures and transitions rather than rigid global templates. This equivariance acts as a form of optimization alignment, eliminating the "tug-of-war" between parameters that occurs in heterogeneous subtask environments.

A significant advantage of this approach is Zero-Shot Extrapolation. Since the model only attends to a fixed window of previous columns, it remains agnostic to the total image length. This allows for the generation of "ultra-long" images—up to 8x the training resolution—that maintain high fidelity and coherence without additional fine-tuning.

Progressive generation of images (landscape and artistic styles) showing the column-by-column synthesis process.

Experimental Results

The Equivariant model demonstrates state-of-the-art efficiency and generalization across several benchmarks:

  • Efficiency: On ImageNet-1k (256x256), the "Ours-L" model achieves a generative FID (gFID) of 4.48 using only 19.66 GFLOPs. This significantly outperforms models like VAR, which requires 105.70 GFLOPs for a gFID of 3.30, providing a much better performance-per-watt trade-off.
  • Generalization: In stress tests involving sequence length extrapolation, the Equivariant model remained stable (gFID 5.57 to 8.99), whereas 2D baselines collapsed (gFID 7.93 to 92.46).
  • Ultra-Long Synthesis: The model successfully generates seamless landscapes up to 2048 pixels wide, demonstrating its ability to learn generalizable generation rules that extend far beyond the training data.

Limitations and Future Work

While highly effective for horizontal equivariance, the current model may be less optimal for images with complex vertical dependencies that exceed a single column's capacity. Additionally, the windowed attention mechanism prevents the maintenance of extremely long-range global constraints, such as a single structure spanning the entire length of an ultra-long image. Future work will explore interactive editing and extending these principles to more complex global structures.

Summary updated

BibTeX
@misc{dong2025equivariant,
  author = {Ruixiao Dong and Mengde Xu and Zigang Geng and Li Li and Han Hu and Shuyang Gu},
  title = {{Equivariant Image Modeling}},
  year = {2025},
  eprint = {2503.18948},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.18948},
}
Figure