TL;DR
Standard video diffusion models struggle to generate long sequences because temporal attention consumes memory quadratically with video length. This paper introduces a bidirectional structured state-space model (SSM) layer augmented with a channel-mixing MLP to replace temporal attention. The resulting architecture scales linearly in memory, easily generating 400-frame videos on standard hardware where traditional attention runs out of memory, while maintaining competitive video quality.
What Problem Does This Paper Address?
Diffusion models have achieved remarkable success in image and short-clip video synthesis. Video Diffusion Models (VDMs) typically insert temporal self-attention layers after spatial 2D U-Net blocks to model dynamics across time. However, self-attention requires memory that grows quadratically with sequence length ($\mathcal{O}(L^2)$).
Because of this quadratic memory wall, generating long video sequences at once on standard hardware leads to out-of-memory (OOM) errors. While state-space models (SSMs) like S4 have emerged as efficient $\mathcal{O}(L)$ sequence backbones in NLP and audio, directly swapping temporal attention with naive SSMs severely degrades generative video quality. This paper tackles how to properly adapt SSMs into temporal diffusion layers to unlock memory-efficient, long-sequence video generation.
Methods
The authors build on the standard 2D U-Net architecture from VDMs and redesign the temporal processing blocks:
- Bidirectional S4D Backbone: Standard SSMs are causal/unidirectional, which hinders diffusion models that need to contextualize both past and future frames simultaneously. The proposed layer runs two diagonal state space (S4D) passes—one forward and one backward (achieved by reversing the sequence with a
Flipoperation)—followed by Gated Linear Units (GLU) and element-wise summation. - Post-SSM Multi-Layer Perceptron (MLP): S4D acts as a single-input single-output (SISO) operator along the temporal dimension, processing each feature channel independently. To restore cross-channel communication and capture complex nonlinear dynamics, the authors add a dual-layer MLP with GeLU activations following the bidirectional SSM.
- Residual Connections: The temporal block retains Layer Normalization and residual skip connections around the SSM and MLP sub-modules, mirroring standard transformer blocks.
Datasets
The authors evaluated their model on two standard video benchmarks:
- UCF101: Used for standard short-sequence evaluation (16 frames at $32 \times 32$ and $64 \times 64$ resolutions) across 13,320 videos.
- MineRL Navigate: Used for long-sequence evaluation (961 training videos of 500 frames each), tested at sequence lengths of 64, 200, and 400 frames at $32 \times 32$ resolution.
No new datasets were introduced.
Key Insights and Ideas
- Bidirectionality is non-negotiable: In ablation experiments, switching from a bidirectional SSM to a unidirectional SSM caused generative quality to crash (UCF101 FVD degraded from 226.4 to 669.6). Full temporal context in both directions is essential for diffusion denoising.
- Channel mixing restores missing cross-feature capacity: Because 1D SSMs treat channels independently, appending an MLP is critical. Pruning the MLP down to a single linear layer or removing it entirely caused a sharp drop in video fidelity.
- Simplicity beats off-the-shelf complex SSM architectures: When benchmarked against recent complex SSM blocks (such as Gated State Space, BiGS, and Bidirectional Mamba), the paper’s streamlined S4D + MLP layer achieved superior Fréchet Video Distance (FVD). Heavy language-oriented SSM architectures proved excessively redundant for temporal modeling inside a spatial U-Net.
- Summation over concatenation: Merging forward and backward SSM passes via element-wise addition outperformed concatenation-based merging.
Key Results
Video quality was evaluated using Fréchet Video Distance (FVD) (lower is better):
- Standard UCF101 (16 frames):
- At $32 \times 32$, the SSM layer achieved an FVD of 226.4, noticeably outperforming standard attention (272.2) and linear attention (286.0).
- At $64 \times 64$, the SSM achieved 634.5, remaining competitive with standard attention (618.0) and beating linear attention (670.8).
- Long Sequences on MineRL Navigate ($32 \times 32$):
- 64 frames: SSM achieved 1132.98 vs. Attention's 1073.34.
- 200 frames: SSM achieved 1116.34 vs. Attention's 1032.51.
- 400 frames: Standard temporal attention crashed with an out-of-memory error on 8 $\times$ 40GB NVIDIA A100 GPUs (capped at around 275 frames). SSM ran smoothly, achieving an FVD of 972.31, outperforming linear attention (1072.00).
- Efficiency: Training memory consumption stayed strictly linear with sequence length, and inference time scaled much more favorably than quadratic attention.
Limitations and Future Work
- Low Spatial Resolution: Experiments were limited to $32 \times 32$ and $64 \times 64$ resolutions to fit experimental constraints.
- Integration with Modern Paradigms: The paper targets pixel-space VDMs; future work could investigate combining temporal SSMs with latent diffusion models (LDMs) or multi-scale spatiotemporal downsampling methods.
- FVD Gap at Intermediate Lengths: On the 64- and 200-frame MineRL benchmarks, standard attention still slightly outperformed the SSM model in raw FVD, indicating room for further architecture tuning.
Summary updated