MambaVision: A Hybrid Mamba-Transformer Vision Backbone

Ali Hatamizadeh, Jan Kautz

Abstract

We propose a novel hybrid Mamba-Transformer backbone, denoted as MambaVision, which is specifically tailored for vision applications. Our core contribution includes redesigning the Mamba formulation to enhance its capability for efficient modeling of visual features. In addition, we conduct a comprehensive ablation study on the feasibility of integrating Vision Transformers (ViT) with Mamba. Our results demonstrate that equipping the Mamba architecture with several self-attention blocks at the final layers greatly improves the modeling capacity to capture long-range spatial dependencies. Based on our findings, we introduce a family of MambaVision models with a hierarchical architecture to meet various design criteria. For Image classification on ImageNet-1K dataset, MambaVision model variants achieve a new State-of-the-Art (SOTA) performance in terms of Top-1 accuracy and image throughput. In downstream tasks such as object detection, instance segmentation and semantic segmentation on MS COCO and ADE20K datasets, MambaVision outperforms comparably-sized backbones and demonstrates more favorable performance.

Introduction

For years, the Vision Transformer (ViT) has served as the gold standard for computer vision backbones. However, the self-attention mechanism inherent to ViTs presents a "quadratic bottleneck": as image resolution increases, the computational cost grows quadratically ($O(L^2)$). Recently, Structured State Space Models (SSMs), specifically Mamba, emerged as a linear-time alternative ($O(L)$) that excels at long-sequence modeling in natural language processing.

Adapting Mamba to vision tasks has historically been challenging. Because Mamba was designed for 1D sequences, it often struggles with the 2D spatial relationships of images. Previous attempts, such as Vim or VMamba, utilized complex bidirectional or cross-scanning techniques that introduced significant latency. MambaVision addresses these issues by redesigning the Mamba block for 2D data and strategically integrating it into a hybrid hierarchical architecture.

Architecture and Methodology

MambaVision utilizes a hierarchical architecture consisting of four distinct stages designed to balance local feature extraction with global context modeling.

  1. CNN-Based Early Stages: Stages 1 and 2 employ standard residual convolutional blocks. This allows for rapid feature extraction at high resolutions where SSMs or Transformers would be computationally prohibitive.
  2. Redesigned Mamba Block: The core Mamba block was modified to be "vision-friendly." The authors replaced causal (one-way) convolutions with regular convolutions and introduced a symmetric parallel branch without an SSM. This parallel path compensates for information potentially lost during the sequential processing of the SSM path.
  3. Hybrid Integration: In Stages 3 and 4, the model employs a mix of Mamba and Transformer blocks. Through extensive ablation, the researchers identified a "sweet spot": using Mamba blocks for the first half of the stage to handle local/mid-range features, followed by Transformer (Self-Attention) blocks in the second half to capture global dependencies.
The hierarchical architecture of MambaVision, integrating CNN, Mamba, and Transformer blocks across four stages.

Key Insights

  • The "Late Attention" Strategy: Self-attention is most effective when applied in the final layers of a stage. By utilizing Mamba for the primary sequence processing and reserving Attention for final global integration, MambaVision captures long-range dependencies without the full quadratic cost of a pure ViT.
  • Symmetry in Feature Representation: The addition of a non-SSM parallel branch in the Mamba block is crucial for learning richer feature representations that sequential SSM processing might otherwise overlook.
  • Scalability: MambaVision represents the first successful scaling of a Mamba-based vision architecture to the ImageNet-21K dataset, proving these models can compete at the scale of modern foundation models.

Experimental Results

MambaVision establishes a new Pareto front for the accuracy-throughput tradeoff, consistently outperforming both pure CNN and Transformer-based architectures.

Top-1 Accuracy vs. Throughput on ImageNet-1K, demonstrating MambaVision's superior performance compared to existing backbones.

ImageNet-1K Classification

MambaVision-B achieves a 84.2% Top-1 accuracy on ImageNet-1K with a throughput of 3,670 images/sec on an NVIDIA A100 GPU. For comparison, ConvNeXt-B achieves 83.8% accuracy at 1,485 img/s, and Swin-B reaches 83.5% at only 535 img/s. MambaVision-B also demonstrates high efficiency, using 56% fewer GFLOPs than MaxViT-B.

Downstream Tasks

The architecture's features generalize effectively to complex spatial tasks. On the MS COCO benchmark, MambaVision-T outperformed Swin-T by +0.7 box AP. Similarly, on the ADE20K semantic segmentation task, it exceeded Swin-T's performance by +1.5 mIoU.

Conclusion

MambaVision successfully bridges the gap between the efficiency of SSMs and the modeling power of Transformers. While the inclusion of self-attention means the model does not achieve pure linear scaling for extreme resolutions, it provides a significantly faster and more accurate alternative to current standards. Future work may explore the application of this hybrid design to video analysis and 3D medical imaging, where Mamba's long-range modeling capabilities could offer even greater advantages.

Summary updated

Abstract

We propose a novel hybrid Mamba-Transformer backbone, denoted as MambaVision, which is specifically tailored for vision applications. Our core contribution includes redesigning the Mamba formulation to enhance its capability for efficient modeling of visual features. In addition, we conduct a comprehensive ablation study on the feasibility of integrating Vision Transformers (ViT) with Mamba. Our results demonstrate that equipping the Mamba architecture with several self-attention blocks at the final layers greatly improves the modeling capacity to capture long-range spatial dependencies. Based on our findings, we introduce a family of MambaVision models with a hierarchical architecture to meet various design criteria. For Image classification on ImageNet-1K dataset, MambaVision model variants achieve a new State-of-the-Art (SOTA) performance in terms of Top-1 accuracy and image throughput. In downstream tasks such as object detection, instance segmentation and semantic segmentation on MS COCO and ADE20K datasets, MambaVision outperforms comparably-sized backbones and demonstrates more favorable performance. Code: https://github.com/NVlabs/MambaVision.
BibTeX
@inproceedings{hatamizadeh2025mambavision,
  author = {Ali Hatamizadeh and Jan Kautz},
  title = {{MambaVision: A Hybrid Mamba-Transformer Vision Backbone}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  url = {https://openreview.net/forum?id=vQy82Vhavu},
}
Figure