Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

VMamba: Visual State Space Model

VMamba adapts the Mamba state-space model into a linear-time vision backbone

  • Problem Self-attention cost grows quadratically with token count, which is heavy for large images. Mamba's selective scan needs a fixed order, and image patches have none.
  • Method VMamba stacks VSS blocks that replace Mamba's scan with SS2D. SS2D unfolds the patch grid into four sequences, scans each, and merges them back.
  • Results VMamba-B ran at 646 img/s on an A100 GPU, against 458 img/s for Swin-B.

Why a state space backbone for images

Self-attention gives vision Transformers global reach and input-dependent weights, but its cost grows quadratically with the number of tokens, which becomes a heavy burden on tasks with large spatial resolutions. Cheaper variants that restrict the effective receptive field or replace the softmax with linear attention have either narrowed that reach or lost accuracy across tasks.

Mamba keeps linear cost on long sequences, which makes its core operation attractive for an alternative backbone. Its selective scan, however, consumes data in a fixed order, and image patches have no inherent sequence, so the operation has to be reshaped before it can cover the whole grid.

From state space recurrence to the selective scan

A continuous state space model maps an input u(t) to an output y(t) through a hidden state h(t), with the dynamics given by \( h'(t)=Ah(t)+Bu(t) \) and \( y(t)=Ch(t)+Du(t) \), where A, B, C and D are the weighting parameters. To run such a system inside a deep network, the continuous equations are discretized using a step size Δ, which turns the update into a recurrence over discrete steps.

The discrete form is said to approximate the zero-order hold method, which is commonly used for SSM-based models.

Plain SSMs are linear time-invariant, so their weights stay fixed across inputs and the response can be written as a convolution. Mamba's S6 makes the weights depend on the input, which rules out a convolution, but the recurrence can still be evaluated with associative scan algorithms in linear time.

How SS2D traverses the patch grid

SS2D starts with Cross-Scan, which unfolds the input patches into four sequences along four distinct traversal paths. Each of the four sequences is handled by its own S6 block, and these blocks run in parallel, so each path builds its own compressed hidden state.

Cross-Merge reshapes the four processed sequences and combines them into a single 2D feature map. The authors argue that the complementary 1D paths let each pixel draw information from every other pixel in some direction, which yields a global receptive field in 2D.

The design keeps the input-dependent weights, global reach and linear cost of S6 from the Mamba block. The change relative to S4ND is that S4ND extends the kernel to 2D with an outer product, which fixes the weights, whereas SS2D keeps the selective scan and applies it along four orders.

VSS blocks and the four-stage layout

The input image is partitioned into patches by a stem that gives a feature map at H/4 by W/4, and no positional embeddings are added. Four stages then produce feature maps at H/4, H/8, H/16 and H/32, where every stage after the first begins with a down-sampling layer followed by a stack of VSS blocks.

A VSS block starts from a Mamba block and replaces its S6 module with SS2D. The authors also remove the multiplicative branch, arguing that the selectivity of SS2D already provides the gating effect, so the block becomes a single branch with two residual modules, close to a Transformer block.

VMamba is built at three scales, Tiny, Small and Base, and the layer configurations of each are given in the appendix.

Accelerating the vanilla model

The vanilla VMamba-T reached 82.2% top-1 with 22.9M parameters and 5.6G FLOPs, but its throughput was only 426 images/s. The authors treat this throughput and the high memory cost as the main obstacle to deploying VMamba.

The speed-up is organized as a sequence of steps, each reported as a change in top-1 accuracy and in images per second. Re-implementing Cross-Scan and Cross-Merge in Triton added 41 img/s without changing accuracy, and adapting the selective scan CUDA kernel to take float16 input and produce float32 output raised training throughput from 165 to 184.

Replacing the einsum in the selective scan with a linear layer and switching to a (B, C, H, W) tensor layout added 174 img/s with no accuracy change.

The architectural steps add an MLP and remove the DWConv layers, which costs 0.6% accuracy for 175 img/s, while reducing ssm-ratio from 2.0 to 1.0 and removing the multiplicative branch adds 0.6% and 366 img/s. Restoring DWConv and lowering d_state from 16.0 to 1.0 changes accuracy by 0.3% and throughput by 161 img/s, and the final step changes ssm-ratio to 1.0 while using the layer configuration [2,2,8,2].

The end result listed in the table is VMamba-T at 82.6 top-1 and 1686 throughput.

ImageNet-1K classification

VMamba-T reached 82.6 top-1 on ImageNet-1K with 224 × 224 inputs, at 4.9G FLOPs and 1686 images/s.

VMamba-S reached 83.6 top-1 at 877 images/s.

Throughput was measured with an A100 GPU and an AMD EPYC 7542 CPU, and the table pairs each model's accuracy and throughput with the same row. Under that measurement, VMamba-B ran at 646 img/s while Swin-B ran at 458 img/s.

Against SSM baselines, VMamba-T's throughput is 1.47× that of S4ND-Conv-T and 1.08× that of Vim-S. Its top-1 lead over those two models is 0.4% and 2.1%.

Detection and segmentation on COCO and ADE20K

Under the 1× Mask R-CNN schedule on MSCOCO, VMamba-T, VMamba-S and VMamba-B reached box AP of 47.3, 48.7 and 49.2.

Mask AP for the same 1× setting is 42.7, 43.7 and 44.1 for VMamba-T, VMamba-S and VMamba-B.

On ADE20K with crop size 512, VMamba-T reached 47.9 mIoU in single-scale testing and 48.8 in multi-scale testing, against 44.5 single-scale for Swin-T. The authors report VMamba-T at 3.4 points above Swin-T and 1.9 above ConvNeXt-T in the single-scale setting. VMamba-S and VMamba-B reached 50.6 and 51.0 single-scale mIoU, which the text places 2.6 and 2.5 points above NAT-S and NAT-B.

Both dense tasks use Mask R-CNN for detection and UperNet for segmentation, following the cited frameworks.

Behaviour at larger input resolutions

Without fine-tuning, VMamba reached 74.7% top-1 at a 768 × 768 input resolution, and 79.2% with linear tuning, and the authors describe its drop across resolutions as modest.

The resolution study compares FLOPs, throughput and memory against Swin-T tested with scaled window sizes. The authors report that VMamba keeps linear growth in FLOPs and memory and maintains high throughput as resolution rises, which they connect to Mamba's efficiency on long sequences.

Reading SS2D as attention and checking its receptive field

Consider the SSM variables for a response span of length T, mapped to V, K and Q, where each step's weight w_i is a cumulative product along the scanning path. The mask M is a T by T temporal mask with ones in its lower triangular part and zeros elsewhere.

In Eq. 5, the products of Q, K and V have the same form as self-attention, even though the weight w is included in them.

For a query patch inside a foreground object, the QK^T map activates all earlier scanned foreground tokens. Including w concentrates the map near the query patch, and the per-path map keeps patches scanned early, such as sheep far to the left, active.

Effective receptive fields were compared for the central pixel before and after training. Only DeiT, HiViT, Vim and VMamba show global ERFs in that comparison, and VMamba's ERF is more uniform and 2D-aware than Vim's. The authors note that VMamba has linear cost, while DeiT and HiViT incur quadratic cost in the number of input patches.

Comparing scan orders

Cross-Scan was compared with unidirectional, bidirectional and cascade scanning, where cascade scanning runs row-wise and then column-wise. Feature dimensions were adjusted so that the patterns have similar parameters and FLOPs.

The authors report that Cross-Scan gives better speed and accuracy than the other three patterns, and that removing DWConv further strengthens that advantage. Throughput of Cross-Scan and Bidi-Scan is close in the figure values, so the speed gain over Bidi-Scan is small.

Limitations

Limited computational resources kept the authors from exploring a Large-scale VMamba architecture and from running a fine-grained hyperparameter search. Pre-training on large datasets such as ImageNet-21K was not studied for SSM-based VMamba, and pre-training methods suited to such models remain unexplored.

The authors note that SS2D makes no particular assumption about input layout or modality, but its use in more general tasks was not tested, and a more general scanning pattern for vision tasks is left open. The main experiments follow the hyperparameter settings used for Swin.

Paper info

Authors
Yue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu, Lingxi Xie, Yaowei Wang, Qixiang Ye, Jianbin Jiao, Yunfan Liu
Venue
arXiv · Preprint
First published
2024-1-18
Added
2026-11-12
Updated
2024-12-29
Version
v4
arXiv
2401.10166
Category
cs.CV
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Yue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu, Lingxi Xie, Yaowei Wang, Qixiang Ye, Jianbin Jiao, Yunfan Liu (2024). VMamba: Visual State Space Model. arXiv:2401.10166v4. https://arxiv.org/abs/2401.10166v4

BibTeX
@misc{liu2024vmamba,
  title = {{VMamba: Visual State Space Model}},
  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},
  year = {2024},
  eprint = {2401.10166},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.10166v4}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up