Skip to main content
QUICK REVIEW

[Paper Review] MambaVision: A Hybrid Mamba-Transformer Vision Backbone

Ali Hatamizadeh, Jan Kautz|arXiv (Cornell University)|Jul 10, 2024
Advanced Vision and ImagingComputer Science27 citations
TL;DR

MambaVision blends redesigned Mamba blocks with Transformer-style attention to create a hierarchical vision backbone that delivers state-of-the-art tradeoffs between accuracy and image throughput on ImageNet-1K and strong results on downstream tasks.

ABSTRACT

We propose a novel hybrid Mamba-Transformer backbone, MambaVision, specifically tailored for vision applications. Our core contribution includes redesigning the Mamba formulation to enhance its capability for efficient modeling of visual features. Through a comprehensive ablation study, we demonstrate the feasibility of integrating Vision Transformers (ViT) with Mamba. Our results show that equipping the Mamba architecture with self-attention blocks in the final layers greatly improves its capacity to capture long-range spatial dependencies. Based on these findings, we introduce a family of MambaVision models with a hierarchical architecture to meet various design criteria. For classification on the ImageNet-1K dataset, MambaVision variants achieve state-of-the-art (SOTA) performance in terms of both Top-1 accuracy and throughput. In downstream tasks such as object detection, instance segmentation, and semantic segmentation on MS COCO and ADE20K datasets, MambaVision outperforms comparably sized backbones while demonstrating favorable performance. Code: https://github.com/NVlabs/MambaVision

Motivation & Objective

  • Redesign the Mamba block to be more suited for vision tasks and improve accuracy and throughput.
  • Systematically study integration patterns of Mamba and Transformer blocks for vision.
  • Propose a hierarchical MambaVision backbone combining CNN-based stages with Mamba and Transformer blocks.
  • Demonstrate state-of-the-art Pareto efficiency on ImageNet-1K and competitive downstream task performance.

Proposed method

  • Introduce a hierarchical 4-stage backbone with CNN-based early stages for high-resolution feature extraction and final stages mixing MambaVision mixer/MLP blocks with Transformer blocks.
  • Replace causal Conv in the SSM branch with regular convolution and add a symmetric non-SSM branch, then concatenate and project outputs.
  • Use a dual-branch MambaVision mixer that combines a 1D convolution path (SSM-based) with a symmetric CNN path, both projected to half the embedding dimension before concatenation.
  • Adopt a hybrid pattern study to evaluate different insertions of self-attention blocks across stages, with final-stage attention found most effective.
  • Apply standard vision training recipes and downstream task pipelines to assess classification on ImageNet-1K and detection/segmentation on MS COCO and ADE20K.
Figure 2 : The architecture of hierarchical MambaVision models. The first two stages use residual convolutional blocks for fast feature extraction. Stage 3 and 4 employ both MambaVision and Transformer blocks. Specifically, given $N$ layers, we use $\frac{N}{2}$ MambaVision and MLP blocks which are
Figure 2 : The architecture of hierarchical MambaVision models. The first two stages use residual convolutional blocks for fast feature extraction. Stage 3 and 4 employ both MambaVision and Transformer blocks. Specifically, given $N$ layers, we use $\frac{N}{2}$ MambaVision and MLP blocks which are

Experimental results

Research questions

  • RQ1How does integrating Vision Transformers with Mamba affect vision backbone performance and efficiency?
  • RQ2What integration pattern (which layers/stages) yields the best accuracy-throughput trade-off for a hybrid Mamba-Transformer backbone?
  • RQ3Can a hierarchical MambaVision backbone outperform existing Mamba and ViT backbones on ImageNet-1K and downstream vision tasks?

Key findings

  • MambaVision variants achieve top-1 accuracies up to 85.3% with high image throughput on ImageNet-1K.
  • MambaVision-T achieves 82.3% Top-1 with 6298 Img/s throughput and 31.8M params.
  • MambaVision-S achieves 83.3% Top-1 with 4700 Img/s throughput and 50.1M params.
  • MambaVision-B achieves 84.2% Top-1 with 3670 Img/s throughput and 97.7M params.
  • MambaVision-L achieves 85.0% Top-1 with 2190 Img/s throughput and 227.9M params.
  • MambaVision-L2 achieves 85.3% Top-1 with 1021 Img/s throughput and 241.5M params.
Figure 3 : Architecture of MambaVision block. In addition to replacing causal Conv layer with their regular counterparts, we create a symmetric path without SSM as a token mixer to enhance the modeling of global context.
Figure 3 : Architecture of MambaVision block. In addition to replacing causal Conv layer with their regular counterparts, we create a symmetric path without SSM as a token mixer to enhance the modeling of global context.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.