MambaOut: Do We Really Need Mamba for Vision?
Preprint
Abstract
Mamba, an architecture with RNN-like token mixer of state space model (SSM), was recently introduced to address the quadratic complexity of the attention mechanism and subsequently applied to vision tasks. Nevertheless, the performance of Mamba for vision is often underwhelming when compared with convolutional and attention-based models. In this paper, we delve into the essence of Mamba, and conceptually conclude that Mamba is ideally suited for tasks with long-sequence and autoregressive characteristics. For vision tasks, as image classification does not align with either characteristic, we hypothesize that Mamba is not necessary for this task; Detection and segmentation tasks are also not autoregressive, yet they adhere to the long-sequence characteristic, so we believe it is still worthwhile to explore Mamba's potential for these tasks. To empirically verify our hypotheses, we construct a series of models named MambaOut through stacking Mamba blocks while removing their core token mixer, SSM. Experimental results strongly support our hypotheses. Specifically, our MambaOut model surpasses all visual Mamba models on ImageNet image classification, indicating that Mamba is indeed unnecessary for this task. As for detection and segmentation, MambaOut cannot match the performance of state-of-the-art visual Mamba models, demonstrating the potential of Mamba for long-sequence visual tasks. The code is available at https://github.com/yuweihao/MambaOutKeywords
All Related Versions
This publication has 14 references indexed in Scilit:
- LocalMamba: Visual State Space Model with Windowed Selective Scan2025
- EfficientVMamba: Atrous Selective Scan for Light Weight Visual MambaProceedings of the AAAI Conference on Artificial Intelligence, 2025
- Mamba-ND: Selective State Space Modeling for Multi-dimensional Data2024
- TransNeXt: Robust Foveal Visual Perception for Vision Transformers2024
- Conv2Former: A Simple Transformer-Style ConvNet for Visual RecognitionIEEE Transactions on Pattern Analysis and Machine Intelligence, 2024
- MetaFormer Baselines for VisionIEEE Transactions on Pattern Analysis and Machine Intelligence, 2023
- UniFormer: Unifying Convolution and Self-Attention for Visual RecognitionIEEE Transactions on Pattern Analysis and Machine Intelligence, 2023
- VOLO: Vision Outlooker for Visual RecognitionIEEE Transactions on Pattern Analysis and Machine Intelligence, 2022
- PVT v2: Improved baselines with pyramid vision transformerComputational Visual Media, 2022
- Visual Feature Extraction by a Multilayered Network of Analog Threshold ElementsIEEE Transactions on Systems Science and Cybernetics, 1969