State Space Models Challenge Transformers in Diffusion Architectures
A new architecture replaces attention with SSMs, achieving comparable image generation quality at 3.2× lower cost.
Underlying Paper
Scalable Diffusion Models with State Space Backbone
We present a novel architecture that replaces the attention mechanism in diffusion models with structured state space models, achieving linear-time generation while maintaining sample quality. Our approach demonstrates consistent improvements across image generation benchmarks including FID scores on ImageNet 256×256, while reducing computational cost by 3.2× compared to transformer-based alternatives.
The pursuit of scalable generative models has driven a wave of architectural innovation, yet the quadratic cost of attention in transformer-based diffusion models remains a fundamental bottleneck. This paper introduces a compelling alternative: replacing the attention backbone entirely with structured state space models (SSMs).
Core Contribution
The authors demonstrate that Mamba-style SSMs can serve as drop-in replacements for attention layers in the U-Net architecture commonly used for diffusion. The key insight is that the selective scan mechanism of modern SSMs naturally captures the multi-scale spatial dependencies required for high-quality image generation.
Technical Approach
The architecture, dubbed DiS (Diffusion with State Spaces), modifies the standard DiT (Diffusion Transformer) by replacing each attention block with a bidirectional SSM layer. The authors introduce a novel "cross-scan" strategy that processes image patches along four spatial directions simultaneously, aggregating the results to capture both local texture and global structure.
Results and Analysis
On ImageNet 256×256 unconditional generation, DiS achieves an FID of 2.67, comparable to DiT-XL/2 (FID 2.27) while requiring 3.2× fewer FLOPs per denoising step. The gap narrows further at 512×512 resolution, where DiS achieves FID 3.41 vs. DiT's 3.04 — a marginal quality difference that may be acceptable given the substantial computational savings.
Training convergence is notably faster: DiS reaches its best FID in approximately 400K steps compared to DiT's 700K steps under identical training budgets. The linear-time scaling also enables generation at resolutions the transformer variant cannot practically reach without additional engineering.
Figures
Evidence Box
strongKey Claims
- •SSMs achieve comparable FID to transformer diffusion models
- •Linear-time generation reduces compute by 3.2×
- •Faster training convergence (400K vs 700K steps)
Key Results
- •FID 2.67 on ImageNet 256×256 (vs. 2.27 for DiT-XL/2)
- •3.2× FLOPs reduction per denoising step
- •1.7× faster wall-clock generation time
Limitations & Caveats
- •Marginal FID gap remains at higher resolutions
- •Evaluation limited to unconditional generation
- •No comparison with flow-matching variants