Introduction
Video understanding requires capturing both local spatiotemporal features and long-range global dependencies. Traditionally, 3D Convolutional Neural Networks (CNNs) have excelled at local modeling but struggled with long-range context. Conversely, Video Transformers utilize self-attention for global modeling but suffer from quadratic computational complexity ($O(L^2)$) relative to sequence length. This scaling bottleneck makes processing high-resolution or long-duration videos prohibitively expensive.
VideoMamba addresses these challenges by adapting the linear-complexity Selective State Space Model (SSM), specifically the Mamba architecture, to the video domain. It offers a "best of both worlds" solution: the efficiency of convolutions and the global reach of Transformers, achieving linear scaling ($O(L)$).
Architecture and Methodology
VideoMamba follows an isotropic design similar to Vision Transformers (ViT) but replaces the standard attention mechanism with a specialized Mamba block.
Key architectural innovations include:
- Bidirectional Mamba (B-Mamba): To account for the non-causal nature of visual data, VideoMamba employs a bidirectional processing block. This ensures that each spatiotemporal patch can integrate context from both preceding and succeeding frames/patches.
- Spatiotemporal Scanning: The model converts 3D video volumes into 1D sequences. A "Spatial-First" scanning strategy—processing all spatial patches within a single frame before moving to the next—was found to be most effective, likely due to better alignment with 2D image pretraining.
- Self-Distillation and Masked Modeling: To stabilize training at larger scales, the authors used self-distillation from smaller "teacher" models. Additionally, a masked autoencoder (MAE) approach was adapted to enhance the model's ability to learn fine-grained temporal dynamics.
Performance and Efficiency
The primary advantage of VideoMamba is its extreme efficiency without sacrificing accuracy. In comparisons with attention-based models like TimeSformer, VideoMamba demonstrates significant gains in both speed and memory usage as sequence lengths increase.
For a 64-frame video sequence, VideoMamba is 6x faster and consumes 40x less GPU memory than TimeSformer. This efficiency allows the model to process long-form video end-to-end, a task previously requiring fragmented feature extraction.
Benchmark Results
VideoMamba achieves state-of-the-art results across diverse benchmarks:
- Short-term Video: On Kinetics-400, VideoMamba-M reached 83.3% Top-1 accuracy. On Something-Something V2 (SSV2), it achieved 68.4%, outperforming comparable Transformers by 3.0%.
- Long-term Video: On the Breakfast dataset, the model surpassed previous SOTA (ViS4mer) by 6.1%.
- Multi-modal Retrieval: The backbone proved robust for text-video alignment, setting new records on DiDeMo and ActivityNet benchmarks.
Conclusion
VideoMamba proves that the success of modern vision architectures is not solely dependent on the attention mechanism. By leveraging the linear complexity of State Space Models, VideoMamba enables efficient, high-performance video understanding for both short and long sequences. Future work will explore scaling to billions of parameters and extending the architecture to handle hour-level video context and multi-modal inputs.
Summary updated