NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

VMamba: Visual State Space Model

Yue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu, Lingxi Xie, Yaowei Wang, Qixiang Ye, Jianbin Jiao, Yunfan Liu

TL;DR

VMamba is a new vision backbone that adapts the efficient State Space Models (SSMs) from NLP to computer vision tasks. It achieves competitive accuracy with significantly improved computational efficiency, especially for high-resolution images, by introducing a novel 2D Selective Scan mechanism.

What Problem Does This Paper Address?

Deep learning models for computer vision, like Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs), have achieved remarkable success. However, ViTs, while powerful, suffer from quadratic computational complexity with respect to input size due to their self-attention mechanism. This makes them computationally expensive for high-resolution images. While some methods aim to improve efficiency, they often compromise performance or receptive field size. The authors aim to develop a vision backbone that retains the strengths of self-attention (global receptive fields, dynamic weighting) while achieving linear time complexity, similar to recent advancements in NLP with models like Mamba.

Methods

The core of VMamba is the Visual State-Space (VSS) block, which replaces the standard self-attention mechanism in traditional vision backbones. The key innovation is the 2D Selective Scan (SS2D) module. Unlike the 1D sequential scanning in NLP models, SS2D adapts the selective scan mechanism to 2D vision data by traversing image patches along four different scanning paths (Cross-Scan). This allows each patch to gather contextual information from various directions, bridging the gap between 1D sequential processing and 2D spatial data. VMamba also incorporates architectural and implementation optimizations to further accelerate inference.

Datasets

VMamba is trained and evaluated on standard computer vision benchmarks:

  • ImageNet-1K: For image classification.
  • MSCOCO2017: For object detection and instance segmentation.
  • ADE20K: For semantic segmentation.

Key Insights and Ideas

  • Bridging 1D and 2D: The SS2D module is crucial for adapting 1D SSMs to 2D vision data. By using four scanning routes, it effectively captures spatial context without the quadratic cost of self-attention.
  • Linear Scalability: VMamba exhibits linear growth in computational complexity (FLOPs) and memory usage with increasing input resolution, a significant advantage over ViTs for high-resolution tasks.
  • Efficiency-Accuracy Trade-off: Through architectural and implementation improvements, VMamba achieves state-of-the-art accuracy while significantly boosting throughput.
  • Global Receptive Fields: The SS2D mechanism, through its multi-directional scanning, effectively establishes global receptive fields, similar to self-attention.

Key Results

  • Image Classification: VMamba-Base achieves a top-1 accuracy of 83.9% on ImageNet-1K, surpassing Swin-B by 0.4%, with a throughput 40% higher than Swin-B.
  • Object Detection & Segmentation: VMamba-T/S/B outperforms Swin-T/S/B and ConvNeXt-T/S/B on MSCOCO for both object detection and instance segmentation tasks. For example, VMamba-T achieves 47.3% mAP for object detection.
  • Semantic Segmentation: VMamba-T achieves 48.0% mIoU on ADE20K, outperforming Swin-T by 3.4%.
  • Scalability: VMamba demonstrates stable performance and linear scaling of FLOPs and memory with increasing input resolutions, outperforming Swin-T and ConvNeXt in throughput and accuracy retention at higher resolutions.

Limitations and Future Work

  • Pre-training: The compatibility of existing unsupervised pre-training methods with SSM-based architectures like VMamba needs further exploration. Developing tailored pre-training techniques for VMamba is a promising direction.
  • Large-Scale Models: The authors did not explore VMamba at a "Large" scale due to computational resource limitations.
  • Generalization: While SS2D is designed to be general, its integration into more generalized tasks and the development of more generalized scanning patterns for vision tasks are open research questions.
  • Initialization: While the paper shows that simpler initialization methods work well for VMamba, further investigation into optimal initialization strategies for SSMs could be beneficial.
  • Hyperparameter Tuning: The authors acknowledge that the reported settings are not necessarily optimal and that further hyperparameter search could improve performance.

Summary updated

BibTeX
@inproceedings{liu2024vmamba,
  author = {Yue Liu and Yunjie Tian and Yuzhong Zhao and Hongtian Yu and Lingxi Xie and Yaowei Wang and Qixiang Ye and Jianbin Jiao and Yunfan Liu},
  title = {{VMamba: Visual State Space Model}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=5cZoCHnHFG},
}
Figure