Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

MambaOut: Do We Really Need Mamba for Vision?

About

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/MambaOut

Weihao Yu, Xinchao Wang• 2024

Related benchmarks

TaskDatasetResultRank
Semantic segmentationADE20K (val)--
3069
Object DetectionCOCO 2017 (val)--
2843
Image ClassificationImageNet-1K 1.0 (val)
Top-1 Accuracy84.2
2238
Instance SegmentationCOCO 2017 (val)--
1275
Semantic segmentationADE20K--
1028
Image ClassificationImageNet-1k (val)
Top-1 Accuracy84.2
708
Object DetectionCOCO 2017
AP (Box)47.4
345
Image ClassificationImageNet-1k 1.0 (test)
Top-1 Accuracy78.9
251
Instance SegmentationCOCO 2017
APm43
236
Object DetectionMS-COCO
AP5069.3
208
Showing 10 of 16 rows

Other info

Code

Follow for update