VMamba: Visual State Space Model

Authors: yue  liu
yunjie  tian
yuzhong  zhao
hongtian  yu
lingxi  xie
yaowei  wang
qixiang  ye
jianbin  jiao
yunfan  liu
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-09 10:29:49

Abstract: Designing computationally efficient network architectures remains an ongoing necessity in computer vision. In this paper, we adapt Mamba, a state-space language model, into VMamba, a vision backbone with linear time complexity. At the core of VMamba is a stack of Visual State-Space (VSS) blocks with the 2D Selective Scan (SS2D) module. By traversing along four scanning routes, SS2D bridges the gap between the ordered nature of 1D selective scan and the non-sequential structure of 2D vision data, which facilitates the collection of contextual information from various sources and perspectives. Based on the VSS blocks, we develop a family of VMamba architectures and accelerate them through a succession of architectural and implementation enhancements. Extensive experiments demonstrate VMamba’s
 promising performance across diverse visual perception tasks, highlighting its superior input scaling efficiency compared to existing benchmark models. Source code is available at https://github.com/MzeroMiko/VMamba

Main paper: 
 introduction: 
 Visual representation learning remains as a fundamental research area in computer vision that has witnessed remarkable progress in the era of deep learning. To represent complex patterns in vision data, two primary categories of backbone networks, i.e., Convolutional Neural Networks (CNNs) [49, 27, 29, 53, 37] and Vision Transformers (ViTs) [13, 36, 57, 66] , have been proposed and extensively utilized in a variety of visual tasks. Compared to CNNs, ViTs generally demonstrate superior learning capabilities on large-scale data due to their integration of the self-attention mechanism [58, 13] . However, the quadratic complexity of self-attention w.r.t. the number of tokens imposes substantial computational overhead in downstream tasks involving large spatial resolutions.To address this challenge, significant efforts have been made to improve the efficiency of attention computation [54, 36, 12] . However, existing approaches either restrict the size of the effective receptive field [36] or suffer from notable performance degradation across various tasks [30, 60] . This motivates us to develop a novel architecture for vision data, while maintaining the inherent advantages of the vanilla self-attention mechanism, i.e., global receptive fields and dynamic weighting parameters [23] .Recently, Mamba [17] , a innovative State Space Model (SSM) [17, 43, 59, 71, 48] , in the field of natural language processing (NLP), has emerged as a promising approach for long-sequence modeling with linear complexity. Drawing inspiration from this advancement, we introduce VMamba, a vision backbone that integrates SSM-based blocks to enable efficient visual representation learning. However, the core algorithm of Mamba, i.e., the parallelized selective scan operation, is essentially designed for processing one-dimensional sequential data. This presents a challenge when adapting it for processing vision data, which lacks an inherent sequential arrangement of visual components. To address this issue, we propose 2D Selective Scan (SS2D), a four-way scanning mechanism designed for spatial domain traversal. In contrast to the self-attention mechanism (Figure 1 that each image patch acquires contextual knowledge exclusively through a compressed hidden state computed along its corresponding scanning path (Figure 1 (b) ), thereby reducing the computational complexity from quadratic to linear.Building on the VSS blocks, we develop a family of VMamba architectures (i.e., VMamba-Tiny/Small/Base) and enhance their performance through architectural improvements and implementation optimizations. Compared to benchmark vision models built on CNNs (ConvNeXt [37] ), ViTs (Swin [36] , HiViT [66] ), and SSMs (S4ND [44] , Vim [69] ), VMamba consistently achieves higher image classification accuracy on ImageNet-1K [9] across various model scales. Specifically, VMamba-Base achieves a top-1 accuracy of 83.9%, surpassing Swin by +0.4%, with a throughput exceeding Swin's by a substantial margin over 40% (646 vs. 458). VMamba's superiority extends across multiple downstream tasks, with VMamba-Tiny/Small/Base achieving 47.3%/48.7%/49.2% mAP in object detection on COCO [33] (1× training schedule). This outperforms Swin by 4.6%/3.9%/2.3% and ConvNeXt by 3.1%/3.3%/2.2%, respectively. As for single-scale semantic segmentation on ADE20K [68] , VMamba-Tiny/Small/Base achieves 47.9%/50.6%/51.0% mIoU, which surpasses Swin by 3.4%/3.0%/2.9% and ConvNeXt by 1.9%/1.9%/1.9%, respectively. Furthermore, unlike ViT-based models, which experience quadratic growth in computational complexity with the number of input tokens, VMamba exhibits linear growth in FLOPs while maintaining comparable performance. This demonstrates its state-of-the-art input scalability.The contributions of this study are summarized as follows:• We propose VMamba, an SSM-based vision backbone for visual representation learning with linear time complexity. A series of architectural and implementation improvements are adopted to enhance the inference speed of VMamba.• We introduce 2D Selective Scan (SS2D) to bridge 1D array scanning and 2D plane traversal, enabling the extension of selective SSMs to process vision data.• VMamba achieves promising performance across various visual tasks, including image classification, object detection, and semantic segmentation. It also exhibits remarkable adaptability w.r.t. the length of the input sequence, showcasing linear growth in computational complexity. 
related work: 
 Convolutional Neural Networks (CNNs). Since AlexNet [31] , considerable efforts have been devoted to enhancing the modeling capabilities [49, 52, 27, 29] and computational efficiency [28, 53, 64, 46] of CNN-based models across various visual tasks. Sophisticated operators like depth-wise convolution [28] and deformable convolution [5, 70] have been introduced to increase the flexibility and efficacy of CNNs. Recently, inspired by the success of Transformers [58] , modern CNNs [37] have shown promising performance by integrating long-range dependencies [11, 47, 34] and dynamic weights [23] into their designs.Vision Transformers (ViTs). As a pioneering work, ViT [13] explores the effectiveness of vision models based on vanilla Transformer architecture, highlighting the importance of large-scale pre-training for image classification performance. To reduce ViT's dependence on large datasets, DeiT [57] introduces a teacher-student distillation strategy, transferring knowledge from CNNs to ViTs and emphasizing the importance of inductive bias in visual perception. Following this approach, subsequent studies propose hierarchical ViTs [36, 12, 61, 39, 66, 55, 6, 10, 67, 1] .Another research direction focuses on improving the computational efficiency of self-attention, which serves as the cornerstone of ViTs. Linear Attention [30] reformulates self-attention as a linear dot-product of kernel feature maps, using the associativity property of matrix products to reduce computational complexity from quadratic to linear. GLA [65] introduces a hardware-efficient variant of linear attention that balances memory movement with parallelizability. RWKV [45] also leverages the linear attention mechanism to combine parallelizable transformer training with the efficient inference of recurrent neural networks (RNNs). RetNet [51] adds a gating mechanism to enable a parallelizable computation path, offering an alternative to recurrence. RMT [15] further extends this for visual representation learning by applying the temporal decay mechanism to the spatial domain.State Space Models (SSMs). Despite their widespread adoption in vision tasks, ViT architectures face significant challenges due to the quadratic complexity of self-attention, especially when handling long input sequences (e.g., high-resolution images). In efforts to improve scaling efficiency [8, 7, 45, 51, 41] , SSMs have emerged as compelling alternatives to Transformers, attracting significant research attention. Gu et al. [21] demonstrate the potential of SSM-based models in handling the long-range dependencies using the HiPPO initialization [18] . To improve practical feasibility, S4 [20] proposes normalizing the parameter matrices into a diagonal structure. Various structured SSM models have since emerged, each offering distinct architectural enhancements, such as complexdiagonal structures [22, 19] , support for multiple-input multiple-output [50] , diagonal plus low-rank decomposition [24] , and selection mechanisms [17] . These advancements have also been integrated into larger representation models [43, 41, 16] , further highlighting the versatility and scalability of structured state space models in various applications. While these models primarily target long-range and sequential data such as text and speech, limited research has explored applying SSMs to vision data with two-dimensional structures. 
preliminaries: 
 Formulation of SSMs. Originating from the Kalman filter [32] , SSMs are linear time-invariant (LTI) systems that map the input signal u(t) ∈ R to the output response y(t) ∈ R via the hidden state h(t) ∈ R N . Specifically, continuous-time SSMs can be expressed as linear ordinary differential equations (ODEs) as follows,EQUATIONwhere A ∈ R N ×N , B ∈ R N ×1 , C ∈ R 1×N ,EQUATIONBy sampling with the time-scale parameter ∆ (i.e., dτEQUATIONwhere [a, b] is the corresponding discrete step interval. Notably, this formulation approximates the result obtained by the zero-order hold (ZOH) method, which is frequently utilized in the literature of SSM-based models (please refer to Appendix A for detailed proof). Selective Scan Mechanism. To address the limitation of LTI SSMs (Eq. 1) in capturing the contextual information, Gu et al. [17] propose a novel parameterization method for SSMs, which incorporates an input-dependent selection mechanism (referred to as S6). However, for selective SSMs, the time-varying weighting parameters pose a challenge for efficient computation of hidden states, as convolutions cannot accommodate dynamic weights, making them inapplicable. Nevertheless, since the recurrence relation of h b in Eq. 3 can be derived, the response y b can still be efficiently computed using associative scan algorithms [2, 42, 50] , which has linear complexity (see Appendix B for a detailed explanation).4 VMamba: Visual State Space ModelQuestion: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?Answer: [Yes] Justification: The paper includes the full set of assumptions and correct proofs for each theoretical result, primarily presented in the appendix. Notably, it covers the formulation of State Space Models, the discretization process, the derivation of recurrence relationships, and explanations concerning self-attention computations, ensuring completeness and accuracy in theoretical presentation.Guidelines:• The answer NA means that the paper does not include theoretical results.• All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced. • All assumptions should be clearly stated or referenced in the statement of any theorems.• The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition. • Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material. • Theorems and Lemmas that the proof relies upon should be properly referenced. 
network architecture: 
 We develop VMamba in three scales: Tiny, Small, and Base (referred to as VMamba-T, VMamba-S, and VMamba-B, respectively). An overview of the architecture of VMamba-T is illustrated in Figure 3 (a), and detailed configurations are provided in Appendix E. The VSS blocks serve as the visual counterparts to Mamba blocks [17] (Figure 3 (b)) for representation learning. The initial architecture of VSS blocks (referred to as the 'vanilla VSS Block' in Figure 3 (c)) is formulated by replacing the S6 module. S6 is the core of Mamba and achieves global receptive fields, dynamic weights (i.e., selectivity), and linear complexity. We substitute it with the newly proposed 2D-Selective-Scan (SS2D) module, and more details will be introduced in the following subsection. To further enhance computational efficiency, we remove the entire multiplicative branch (highlighted by the red box in Figure 3 (c)), as the effect of the gating mechanism has already been achieved by the selectivity of SS2D. As a result, the improved VSS block (shown in Figure 3 (d) ) consists of a single network branch with two residual modules, mimicking the architecture of a vanilla Transformer block [58] . All results in this paper are obtained using VMamba models built with VSS blocks in this architecture.While the sequential nature of the scanning operation in S6 aligns well with NLP tasks involving temporal data, it poses a significant challenge when applied to vision data, which is inherently nonsequential and encompasses spatial information (e.g., local texture and global structure). To address this issue, S4ND [44] reformulates SSM with convolutional operations, directly extending the kernel from 1D to 2D through the outer-product. However, such modification restricts the weights from being input-dependent, resulting in a limited capacity for capturing contextual information. Therefore, we adhere to the selective scan approach [17] for input processing and propose the 2D-Selective-Scan (SS2D) module to adapt S6 to vision data without compromising its advantages. Step (a) CSM in TritonStep (b) f16 in & f32 outStep (c) Einsum → Linear Tensor layoutStep (d) + MLP, -DWConv Fewer LayersStep (e.1) + DWConvStep (f) ssm-ratio: Step (e) No Skip BranchStep (e. Figure 2 illustrates that data forwarding in SS2D consists of three steps: cross-scan, selective scanning with S6 blocks, and cross-merge. Specifically, SS2D first unfolds the input patches into sequences along four distinct traversal paths (i.e., Cross-Scan). Each patch sequence is then processed in parallel using a separate S6 block, and the resultant sequences are reshaped and merged to form the output map (i.e., Cross-Merge). Through the use of complementary 1D traversal paths, SS2D allows each pixel in the image to integrate information from all other pixels across different directions. This integration facilitates the establishment of global receptive fields in the 2D space.As shown in Figure 3 (e), the VMamba-T model with vanilla VSS blocks (referred to as 'Vanilla VMamba') achieves a throughput of 426 images/s and contains 22.9M parameters with 5.6G FLOPs. Despite achieving a state-of-the-art classification accuracy of 82.2% (outperforming Swin-T [36] by 0.9% at the tiny level), the low throughput and high memory overhead present significant challenges for the practical deployment of VMamba.In this subsection, we outline our efforts to enhance its inference speed, primarily focusing on improvements in both implementation details and architectural design. We evaluate the models with image classification on ImageNet-1K. The impact of each progressive improvement is summarized as follows, where (%, img/s) denote the gains in top-1 accuracy on ImageNet-1K and inference throughput, respectively. Further discussion is provided in Appendix E.Step (a) (+0.0%, +41 img/s) by re-implementing Cross-Scan and Cross-Merge in Triton.Step (b) (+0.0%, -3 img/s) by adjusting the CUDA implementation of selective scan to accommodate float16 input and float32 output. This remarkably enhances the training efficiency (throughput from 165 to 184), despite slight speed fluctuation at test time.Step (c) (+0.0%, +174 img/s) by substituting the relatively slow einsum in selective scan with a linear transformation (i.e., torch.nn.functional.linear). We also adopt the tensor layout of (B, C, H, W) to eliminate unnecessary data permutations. Step (d) (-0.6%, +175 img/s) by introducing MLP into VMamba due to its computational efficiency. We also discard the DWConv (depth-wise convolutional [23] ) layers and change the layer configuration from [2,2,9,2] to [2,2,2,2] to lower FLOPs.Step (e) (+0.6%, +366 img/s) by reducing the parameter ssm-ratio (the feature expansion factor) from 2.0 to 1.0 (also referred to as Step (d.1)), raising the layer numbers to [2, 2, 5, 2] (also referred to as Step (d.2)), and discarding the entire multiplicative branch as illustrated in Figure 3 (c).Step (f) (+0.3%, +161 img/s) by introducing the DWConv layers (also referred to as Step (e.1)) and reducing the parameter d_state (the SSM state dimension) from 16.0 to 1.0 (also referred to as Step (e.2)), together with raising ssm-ratio back to 2.0.Step (g) (+0.1%, +346 img/s) by reducing the ssm-ratio to 1.0 while changing the layer configuration from [2, 2, 5, 2] to [2, 2, 8, 2] .Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?Answer: [Yes] Justification: All information regarding the key contribution of this paper, i.e., the introduction of selective SSMs (or S6) to processing vision data, as well as architectural and experimental configurations, have been fully disclosed (to the extent that it affects the main claims and/or conclusions of the paper). Furthermore, the implementation of other components within the proposed VMamba framework, such as Vision Transformers and the parallelized Selective Scan operation, is facilitated by the plenty of support available from existing open-source resources within the community. 
experiments: 
 In this section, we present a series of experiments to evaluate the performance of VMamba and compare it to popular benchmark models across various visual tasks. We also validate the effectiveness of the proposed 2D feature map traversal method by comparing it with alternative approaches. Additionally, we analyze the characteristics of VMamba by visualizing its effective receptive field (ERF) and activation map, and examining its scalability with longer input sequences. We primarily follow the hyperparameter settings and experimental configurations used in Swin [36] . For detailed experiment settings, please refer to Appendix E and F, and for additional ablations, see Appendix H. All experiments were conducted on a server with 8 × NVIDIA Tesla-A100 GPUs.We evaluate VMamba's performance in image classification on ImageNet-1K [9] , with comparison results against benchmark methods summarized in Table 1 . With similar FLOPs, VMamba-T achieves a top-1 accuracy of 82.6%, outperforming DeiT-S by 2.8% and Swin-T by 1.3%. Notably, VMamba maintains its performance advantage at both Small and Base scales. For example, VMamba-B achieves a top-1 accuracy of 83.9%, surpassing DeiT-B by 2.1% and Swin-B by 0.4%.In terms of computational efficiency, VMamba-T achieves a throughput of 1,686 images/s, which is either superior or comparable to state-of-the-art methods. This advantage continues with VMamba-S and VMamba-B, achieving throughputs of 877 images/s and 646 images/s, respectively. Compared to SSM-based models, the throughput of VMamba-T is 1.47× higher than S4ND-Conv-T [44] and 1.08× higher than Vim-S [69] , while maintaining a clear performance lead of 0.4% and 2.1% over these models, respectively. In this sub-section, we evaluate the performance of VMamba on downstream tasks, including object detection and instance segmentation on MSCOCO2017 [33] , and semantic segmentation on ADE20K [68] . The training framework is based on the MMDetection [3] and MMSegmenation [4] libraries, following [35] in utilizing Mask R-CNN [26] and UperNet [63] as the detection and segmentation networks, respectively.Object Detection and Instance Segmentation. The results on MSCOCO are presented in Semantic Segmentation. Consistent with previous experiments, VMamba demonstrates superior performance in semantic segmentation on ADE20K with a comparable amount of parameters. As shown in Table 2 , VMamba-T achieves 3.4% higher mIoU than Swin-T and 1.9% higher than ConvNeXt-T in the Single-Scale (SS) setting, and the advantage persists with Multi-Scale (MS) input.For models at the Small and Base levels, VMamba-S/B outperforms NAT-S/B [25] by 2.6%/2.5% mIoU in the SS setting, and 1.7%/1.9% mIoU in the MS setting.The experimental results in this subsection demonstrate VMamba's adaptability to object detection, instance segmentation, and semantic segmentation. In Figure 4 (a), we compare VMamba's performance with Swin and ConvNeXt, highlighting its advantages in handling downstream tasks with comparable classification accuracy on ImageNet-1K. This result aligns with Figure 4 (b) , where VMamba shows the most stable performance (i.e., modest performance drop) across different input image sizes, achieving a top-1 classification accuracy of 74.7% without fine-tuning (79.2% with linear tuning) at an input resolution of 768 × 768. While exhibiting greater tolerance to changes Relationship between SS2D and Self-Attention. To formulate the response Y within the time interval [a, b] of length T , we denote the corresponding SSM-related variablesu i ⊙ ∆ i ∈ R 1×Dv , B i ∈ R 1×D k , and C i ∈ R 1×D k as V ∈ R T ×Dv , K ∈ R T ×D k , and Q ∈ R T ×D k , respectively.Therefore, the j-th slice along dimension D v of y b , denoted as y b (j) ∈ R can be written as Consequently, the j-th dimension of Y, i.e., Y (j) ∈ R T ×1 , can be expressed asEQUATIONEQUATIONwhere M denotes the temporal mask matrix of size T × T with the lower triangular part set to 1 and elsewhere 0. Please refer to Appendix C for more detailed derivations.In Eq. 5, the matrix multiplication process involving Q, K, and V closely resembles the self-attention mechanism, despite the inclusion of w.Visualization of Activation Maps. To gain an intuitive and in-depth understanding of SS2D, we further visualize the attention values in QK ⊤ and (Q ⊙ w) (K/w) ⊤ corresponding to a specific query patch within foreground objects (referred to as the 'activation map'). As shown in Figure 6 (b), the activation map of QK ⊤ demonstrates the effectiveness of SS2D in capturing and retaining traversed information, with all previously scanned tokens in the foreground region being activated. Furthermore, the inclusion of w results in activation maps that are more focused on the neighborhood of query patches (Figure 6 (c )), which is consistent with the temporal weighting effect inherent in the formulation of w. Nevertheless, the selective scan mechanism allows VMamba to accumulate history along the scanning path, facilitating the establishment of long-term dependencies across image patches. This is evident in the sub-figure encircled by a red box (Figure 6 (d)) , where patches of the sheep far to the left (scanned in earlier steps) remain activated. For more visualizations and further discussion, please refer to Appendix D.Visualization of Effective Receptive Fields. The Effective Receptive Field (ERF) [40, 11] refers to the region in the input space that contributes to the activation of a specific output unit. We conduct a comparative analysis of the central pixel's ERF across various visual backbones, both before and after training. The results presented in Figure 7 illustrate that among the models examined, only DeiT, HiViT, Vim and VMamba demonstrate global ERFs, while the others exhibit local ERFs despite their theoretical potential for global coverage. Moreover, VMamba's linear time complexity enhances its computational efficiency compared to DeiT and HiViT, which incur quadratic costs w.r.t. the number of input patches. While both VMamba and Vim are based on the Mamba architecture, VMamba's ERF is more uniform and 2D-aware than that of Vim, which may intuitively explain its superior performance.Diagnostic Study on Selective Scan Patterns. We compare the proposed scanning pattern (i.e. Cross-Scan) to three benchmark patterns: unidirectional scanning (Unidi-Scan), bidirectional scanning (Bidi-Scan), and cascade scanning (Cascade-Scan, scanning the data row-wise and column-wise successively). Feature dimensions are adjusted to maintain similar architectural parameters and Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?Answer: [Yes]Justification: The supplementary material submitted with the manuscript includes open access to all source code and scripts necessary to faithfully reproduce the main experimental results. Instructions for running the code are also provided within the scripts.Guidelines:• The answer NA means that paper does not include experiments requiring code. • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
conclusion: 
 This paper presents VMamba, an efficient vision backbone model built with State Space Models (SSMs). VMamba integrates the advantages of selective SSMs from NLP tasks into visual data processing, bridging the gap between ordered 1D scanning and non-sequential 2D traversal through the novel SS2D module. Furthermore, we have significantly improved the inference speed of VMamba through a series of architectural and implementation refinements. The effectiveness of the VMamba family has been demonstrated through extensive experiments, and its linear time complexity makes VMamba advantageous for downstream tasks with large-resolution inputs.Limitations. While VMamba demonstrates promising experimental results, there is still room for improvement in this study. Previous research has validated the efficacy of unsupervised pre-training on large-scale datasets (e.g., ImageNet-21K). However, the compatibility of existing pre-training methods with SSM-based architectures like VMamba, as well as the identification of pre-training techniques specifically tailored for such models, remain unexplored. Investigating these aspects could serve as a promising avenue for future research in architectural design. Additionally, limited computational resources have prevented us from exploring VMamba's architecture at the Large scale and conducting a fine-grained hyperparameter search to further enhance experimental performance. Although SS2D, the core component of VMamba, does not make specific assumptions about the layout or modality of the input data, allowing it to generalize across various tasks, the potential of VMamba for integration into more generalized tasks remains unexplored. Bridging the gap between SS2D and these tasks, along with proposing a more generalized scanning pattern for vision tasks, represents a promising research direction.Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?Answer: [Yes]Justification: The paper specifies detailed experimental configurations in Section E in Appendix, providing readers with essential information to comprehend the results. Following established conventions in the field of vision backbone models, the evaluation protocol encompasses standard practices commonly found in the relevant literature, ensuring readers can refer to established methodologies.Guidelines:• The answer NA means that the paper does not include experiments.• The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them. • The full details can be provided either with the code, in appendix, or as supplemental material. 
experiment statistical significance: 
 Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?Answer: [No] Justification: We did not include an analysis of the statistical significance of the experiments mainly due to the prohibitively expensive training cost of vision backbone models and our limited computing resources. However, we have provided the code, hyperparameters, and random seeds used in our experiments to facilitate the reproducibility of our findings. We would like to point out that, due to the extensive amount of training data, the statistical patterns of the experiment results are likely to remain consistent across different trials. Consequently, reporting error bars or other information about statistical significance is not a common practice in studies developing deep vision backbones.Guidelines:• The answer NA means that the paper does not include experiments.• The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper. • The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors). • It should be clear whether the error bar is the standard deviation or the standard error of the mean. • It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified. • For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates). • If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text. 
experiments compute resources: 
 Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?Answer: [Yes]Justification: All experiments were carried out on an 8 × A100 GPU server, as detailed at the beginning of the experiment section (Section 5).Guidelines:• The answer NA means that the paper does not include experiments.• The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage. • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute. • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper). 
code of ethics: 
 Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines? 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)? Answer: [NA] Justification: The proposed models are vision backbone networks trained on benchmark datasets such as ImageNet-1K, MSCOCO, and ADE20K. These datasets have been extensively used in the computer vision community and have undergone comprehensive safety risk assessments. Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.Justification: This study does not involve any crowdsourcing experiments or research with human subjects. Guidelines:• The answer NA means that the paper does not involve crowdsourcing nor research with human subjects. • Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper. • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review. 
 
 Appendix: In this section, we explore the correlation between the discretized formulations of State Space Models (SSMs) obtained in Sec. 3 and those derived from the zero-order hold (ZOH) method [17] , which is frequently used in studies related to SSMs.Recall the discretized formulation of SSMs derived in Sec. 3 as follows,EQUATIONLet b = a + 1, then the above equation can be re-written asEQUATIONwhere A a := e A∆a is the exact discretized form of the evolution matrix A obtained by ZOH, and B a := B a ∆ a represents the first-order Taylor expansion of the discretized B acquired through ZOH.In this section, we derive the recurrence relation of the hidden state in selective SSMs. Given the expression of h b shown in Eq. 6, let us denote e A(∆a+...+∆i-1) as p i A,a . Then, its recurrence relation can be directly written asEQUATIONFor the second term of Eq. 6, we haveEQUATIONTherefore, with the associations derived in Eq. 8 and Eq. 9, h b = p b A,a h a + p b B,a can be efficiently computed in parallel using associative scan algorithms [2, 42, 50] , which are supported by numerous modern programming libraries. This approach effectively reduces the overall computational complexity to linear, and VMamba further accelerates the computation by adopting a hardware-aware implementation [17] .In this section, we clarify the relationship between SS2D and the self-attention mechanism commonly employed in existing vision backbone models. Subsequently, visualization results are provided to substantiate our explanation.Let T denote the length of the sequence with indices from a to b, we define the following variablesEQUATIONEQUATIONEQUATIONEQUATIONEQUATIONY := [y a+1 ; . . . ; y b ] ∈ R T ×Dv , whereEQUATIONNote that in practice, the parameter A in Eq. 1 is simplified toR 1×D k . Consequently, h ′ (t) = Ah(t) + Bu(t) is simplified to h ′ (t) = A ⊙ h(t) + Bu(t), which is the reason why w i ∈ R D k ×Dv .Based on these notations, the discretized solution of time-varying SSMs (Eq. 6) can be written asEQUATIONwhere ⊙ denotes the element-wise product between matrices, and the division is also elements-wise.Based on the expression of the hidden state h b , the first term of the output of SSM, i.e., y b , can be computed byEQUATIONHere, we drop the skip connection between the input and the response for simplicity. Particularly, the j-th slice along dimension D v of y b , denoted as y b (j) ∈ R can be written asEQUATIONSimilarly, the j-th slice along dimension D v of the overall response Y, denoted as Y (j) ∈ R T ×1 , can be expressed asEQUATIONwhere M := tril(T, T ) ∈ {0, 1} T ×T denotes the temporal mask matrix with the lower triangular portion of a T × T matrix set to 1 and elsewhere 0. It is evident that how matrices Q, K, and V are multiplied in Eq. 21 closely resembles the process in the self-attention module of Vision Transformers. Moreover, if w is in shape (T, D k ) rather than (T, D k , D v ), then Eq. 18 and Eq. 21 reduce to the form of Gated Linear Attention (GLA) [65] , indicating that GLA is also a special case of Mamba.In the preceding subsection, we illustrated how the computational process of selective SSMs shares similarities with self-attention mechanisms, allowing us to delve into the internal mechanism of SS2D through the visualization of its weight matrices.Given the input image shown in Figure 9 (a), illustrations of four scanning paths in SS2D are presented in Figure 9 (d). The visualizations of the corresponding attention maps, calculated using QK ⊤ and (Q ⊙ w) (K/w) ⊤ are shown in Figure 9 (e) and Figure 9 (g) respectively. These results underscore the effectiveness of the proposed scanning approach (i.e., Cross-Scan) in capturing and retaining the traversed information, as each row in a single attention map corresponds to the attention between the current patch and all previously scanned foreground tokens impartially. Additionally, in Figure 9 (f), we showcase the transformed activation maps, where the pixel order corresponds to that of the first route, traversing the image row-wise from the upper-left to the bottom-right.By rearranging the diagonal elements of the obtained attention map in the image space, we derive the visualization results shown in Figure 9 (b) and Figure 9 (c) corresponding to QK ⊤ and (Q ⊙ w) (K/w) ⊤ respectively. These maps illustrate the effectiveness of VMamba in accurately distinguishing between foreground and background pixels within an image.Moreover, given a selected patch as the query, we visualize the corresponding activation map by reshaping the associated row in the attention map (computed by QK ⊤ or (Q ⊙ w) (K/w) ⊤ ) This reflects the attention score between the query patch and all previously scanned patches. To obtain the complete visualization for a query patch, we collect and combine the activation maps from all four scanning paths in SS2D. The visualization results of the activation map for both QK ⊤ and (Q ⊙ w) (K/w) ⊤ are shown in Figure 10 . We also visualize the diagonal elements of attention maps computed by (Q ⊙ w) (K/w) ⊤ , where all foreground objects are effectively highlighted and separated from the background. Network Architecture. The architectural specifications of Vanilla-VMamba are outlined in Table 3 , while detailed configurations of the VMamba series are provided in Table 4 . The Vanilla-VMamba series is constructed using the vanilla VSS Block, which includes a multiplicative branch and does not have feed-forward network (FFN) layers. In contrast, the VSS Block in the VMamba series removes the multiplicative branch and introduces FFN layers. Additionally, we provide alternative architectures for VMamba at Small and Base scales, referred to as VMamba-S[s1l20] and VMamba-B[s1l20], respectively. The notation 'sxly' indicates that the ssm-ratio is set to x and the number of layers in stage 3 is set to y. Consequently, the versions presented in Table 1 can also be referred to as VMamba-S[s2l15] and VMamba-B[s2l15].Experiment Setting. The hyper-parameters for training VMamba on ImageNet are inherited from Swin [36] , except for the parameters related to drop_path_rate and the exponential moving average (EMA) technique. Specifically, VMamba-T/S/B models are trained from scratch for 300 epochs, with a 20-epoch warm-up period, using a batch size of 1024. The training process utilizes the AdamW optimizer [38] with betas set to (0.9, 0.999), an initial learning rate of 1 × 10 -3 , a weight decay of 0.05, and a cosine decay learning rate scheduler. It is noteworthy that this is not the optimal setting for VMamba. With a learning rate of 2 × 10 -3 , the Top-1 accuracy of VMamba-T can reach 80.7%.Additional techniques such as label smoothing (0.1) and EMA (decay ratio of 0.9999) are also applied. The drop_path_ratio is set to 0.2 for Vanilla-VMamba-T and VMamba-T, 0. Throughput Evaluation. Detailed performance comparisons with various models are presented in Table 6 . Throughput (referred to as TP.) was assessed on an A100 GPU paired with an AMD EPYC 7542 CPU, utilizing the toolkit provided by [62] . Following the protocol outlined in [36] , we set the batch size to 128. The training throughput (referred to as Train TP.) is tested on the same device with mix-resolution, excluding the time consumption of optimizers. The batch size for measuring the training throughput is also set to 128.Accelerating VMamba. Table 5 provides detailed configurations of the intermediate variants in the acceleration process from Vanilla-VMamba-T to VMamba-T.Evolution of ERF. We further generate the effective receptive field (ERF) maps throughout the training process for Vanilla-VMamba-T. These maps intuitively illustrate how VMamba's pattern of ERF evolves from being predominantly local to predominantly global, epoch by epoch.In this section, we present the experimental results of Vanilla-VMamba and VMamba on the MSCOCO and ADE20k datasets. The results are summarized in Table 7 and Table 8 , respectively.For object detection and instance segmentation, we adhere to the protocol outlined by Swin [36] and construct our models using the mmdetection framework [3] . Specifically, we utilize the AdamW optimizer [38] and fine-tune the classification models pre-trained on ImageNet-1K for both 12 and 36 epochs. The learning rate is initialized at 1 × 10 -4 and decreased by a factor of 10 at the 9-th Table 3 : Architectural overview of the Vanilla-VMamba series. Down-sampling is performed through patch merging [36] operations in stages 1, 2, and 3. The term Linear refers to a linear layer, while DWConv denotes a depth-wise convolution [23] operation. The proposed 2D-selective-scan is labeled as SS2D. For semantic segmentation, we follow Swin [36] and construct a UperHead [63] network on top of the pre-trained model using the MMSegmentation library [4] . We employ the AdamW optimizer [38] and set the learning rate to 6 × 10 -5 . The fine-tuning process spans a total of 160k iterations with a batch size of 16. The default input resolution is 512 × 512.EQUATIONGiven Mamba's exceptional ability in efficient long sequence modeling, we conduct experiments to assess whether VMamba inherits this characteristic. We evaluate the computational efficiency and classification accuracy of VMamba with progressively larger input spatial resolutions. Specifically, following the protocol in XCiT [1] , we apply VMamba, trained on 224 × 224 inputs, to images with resolutions ranging from 288 × 288 to 768 × 768. We measure the generalization performance in terms of the number of parameters, FLOPs, throughput during both training and inference, and VSSBLock(ssm-ratio=1, mlp-ratio=4) VSSBlock(ssm-ratio=2, mlp-ratio=4) VSSBLock(ssm-ratio=2, mlp-ratio=4)     Linear 192 → ssm-ratio ×192 DWConv 3×3, ssm-ratio ×192 SS2D, dim ssm-ratio ×192 Linear ssm-ratio ×192 → 192 FFN mlp-ratio ×192      ×2      Linear 192 → ssm-ratio ×192 DWConv 3×3, ssm-ratio ×192 SS2D, dim ssm-ratio ×192 Linear ssm-ratio ×192 → 192 FFN mlp-ratio ×192      ×2      Linear 256 → ssm-ratio ×256 DWConv 3×3, ssm-ratio ×256 SS2D, dim ssm-ratio ×256 Linear ssm-ratio ×256 → 256 FFN mlp-ratio ×256      ×2 conv 3×3 stride 2, LayerNorm stage 3 14×14 VSSBLock(ssm-ratio=1, mlp-ratio=4) VSSBlock(ssm-ratio=2, mlp-ratio=4) VSSBLock(ssm-ratio=2, mlp-ratio=4)      Linear 384 → ssm-ratio ×384 DWConv 3×3, ssm-ratio ×384 SS2D, dim ssm-ratio ×384 Linear ssm-ratio ×384 → 384 FFN mlp-ratio ×384      ×8      Linear 384 → ssm-ratio ×384 DWConv 3×3, ssm-ratio ×384 SS2D, dim ssm-ratio ×384 Linear ssm-ratio ×384 → 384 FFN mlp-ratio ×384      ×15      Linear 512 → ssm-ratio ×512 DWConv 3×3, ssm-ratio ×512 SS2D, dim ssm-ratio ×512 Linear ssm-ratio ×512 → 512 FFN mlp-ratio ×512      ×15 conv 3×3 stride 2, LayerNorm stage 4 7×7VSSBLock(ssm-ratio=1, mlp-ratio=4) VSSBlock(ssm-ratio=2, mlp-ratio=4) the top-1 classification accuracy on ImageNet-1K. We also conduct experiments under the 'linear tuning' setting, where only the header network, consisting of a single linear module, is fine-tuned from random initialization using features extracted by the backbone models.VSSBLock(ssm-ratio=2, mlp-ratio=4)      Linear 768 → ssm-ratio ×768 DWConv 3×3, ssm-ratio ×768 SS2D, dim ssm-ratio ×768 Linear ssm-ratio ×768 → 768 FFN mlp-ratio ×768      ×2      Linear 768 → ssm-ratio ×768 DWConv 3×3, ssm-ratio ×768 SS2D, dim ssm-ratio ×768 Linear ssm-ratio ×768 → 768 FFN mlp-ratio ×768      ×2      Linear 1024 → ssm-ratio ×1024 DWConv 3×3, ssm-ratio ×1024 SS2D, dim ssm-ratio ×1024 Linear ssm-ratio ×1024 → 1024 FFN mlp-ratio ×1024      ×2 1×1According to the results summarized in Table 9 , VMamba demonstrates the most stable performance across (i.e., modest performance drop) different input image sizes, achieving a top-1 classification accuracy of 74.7% without fine-tuning (79.2% with linear tuning), while maintaining a relatively high throughput of 149 images per second at an input resolution of 768 × 768. In comparison, Swin [36] achieves the second-highest performance with a top-1 accuracy of 73.1% without finetuning (77.5% under linear tuning) at the same input size, using scaled window sizes (set as the resolution divided by 32). However, its throughput significantly drops to 53 images per second. Furthermore, ConvNeXt [37] maintains a relatively high inference speed (i.e., a throughput of 103 images per second) at the largest input resolution. However, its classification accuracy drops to 69.5% when directly tested on images of size 768 × 768, indicating its limited adaptability to images with large spatial resolutions. Deit-S also shows a dramatic performance drop, primarily due to the interpolation used in the absolute positional embedding. Notably, VMamba displays a linear increase in computational complexity, as measured by FLOPs, which is comparable to CNN-based architectures. This finding aligns with the theoretical conclusions drawn from selective SSMs [17] .In the main submission, we validate the effectiveness of the proposed scanning pattern (referred to as Cross-Scan) in SS2D by comparing it to three alternative image traversal approaches, i.e., Unidi-Scan, Bidi-Scan, and Cascade-Scan (Figure 12 ). Notably, since Unidi-Scan, Bidi-Scan, and Cross-Scan are all implemented in Triton, they exhibit minimal differences in throughput. The results in Table 10 indicate that Cross-Scan demonstrates superior data modeling capacity, as reflected by its higher classification accuracy. This advantage likely stems from the two-dimensional prior introduced by the four-way scanning design. Nevertheless, the practical implementation of Cascade-Scan is significantly constrained by its relatively slow computational pace, primarily due to the inadequate compatibility between selective scanning and high-dimensional data, which is further affected by the multi-step scanning procedure. In our study, we adopted the initialization scheme originally proposed for the SS2D block in S4D [19] . Therefore, it is necessary to investigate the contribution of this initialization method to the effective- ness of VMamba. To explore this further, we replaced the default initialization with two alternative methods: random initialization and zero initialization.For both initialization methods, we set the parameter D in equation 1 to a vector of all ones, mimicking a basic skip connection (thus we have y = Ch+Du). Additionally, the weights and biases associated with the transformation to the dimension D v (which matches the input size), are initialized as random vectors. In contrast, Mamba [17] employs a more sophisticated initialization. The main distinction between random and zero initialization lies in the parameter A in equation 6, which is typically initialized as a HiPPO matrix in both Mamba [17, 19] and our implementation of VMamba. Given that we selected the hyper-parameter d_state to be 1, the Mamba initialization for log(A) can be simplified to all zeros, which aligns with zero initialization. In contrast, random initialization assigns a random vector to log(A). We choose to initialize log(A) rather than A directly to keep A near the all-ones matrix when the network parameters are close to zero, which empirically enhances the training stability.The experimental results in Table 11 indicate that, at least for image classification with SS2D blocks, the model's performance is not significantly affected by the initialization method. Therefore, within this context, the sophisticated initialization method employed in Mamba [17] can be substituted with a simpler, more straightforward approach. We also visualize the ERF maps of models trained with different initialization methods (see Figure 14 ), which intuitively reflect SS2D's robustness across various initialization schemes.Throughout this study, we primarily set the value of d_state to 1 to optimize VMamba's computational speed. To further explore the impact of d_state on the model's performance, we conduct a series of experiments.As shown in Table 12 , with all other hyper-parameters fixed, we increase d_state from 1 to 4. This results in a slight improvement in performance but a substantial decrease in throughput, indicating a significant negative impact on the VMamba's computational efficiency. However, increasing d_state to 8, while reducing ssm-ratio to maintain computational complexity, leads to improved accuracy. Moreover, when d_state is further increased to 16, with ssm-ratio set to 1, performance declines.These findings suggest that modest increases in d_state may not necessarily lead to better performance. Instead, selecting the optimal combination of d_state and ssm-ratio is crucial for achieving a good trade-off between inference speed and performance.In this section, we investigate the trade-offs among ssm-ratio, layer numbers, and mlp-ratio.Experimental results shown in Table 13 indicate that reducing ssm-ratio significantly decreases performance but substantially improves inference speed. Conversely, increasing layer numbers enhances the performance while slowing down the model.As the hyper-parameter ssm-ratio represents the dimension used by the SS2D module, the trade-off between ssm-ratio and layer numbers can be interpreted as a balance between channel-mixing and token-mixing [56] . Furthermore, we reduce mlp-ratio from 4.0 to 2.0 and progressively increase ssm-ratio to maintain constant FLOPs, as shown in Table 14 . The results presented in Tables 13 and 14 highlight the importance of an optimal combination of ssm-ratio, mlp-ratio, and layer numbers for constructing a model that balances effectiveness and efficiency.In VMamba, the SiLU [14] activation function is utilized to build the SS2D block. However, experimental results in Table 15 show that VMamba maintains robustness across different activation functions. This implies that the choice of activation function does not substantially affect the model's performance. Therefore, there is flexibility to choose an appropriate activation function based on computational constraints or other preferences. Justification: We primarily focused on discussing the limitations associated with this study in section 6.Guidelines:• The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper. • The authors are encouraged to create a separate "Limitations" section in their paper.• The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be. • The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated. • The authors should reflect on the factors that influence the performance of the approach.For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon. • The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size. • If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness. • While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.• The answer NA means that the paper does not include experiments.• If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not. • If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable. • Depending on the contribution, reproducibility can be accomplished in various ways.For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed. • While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. , with an open-source dataset or instructions for how to construct the dataset). (d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility.In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.Justification: After carefully reviewing the referenced document, we certify that the research conducted in the paper conforms, in every respect, with the NeurIPS Code of Ethics. Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics. • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 10. Broader Impacts Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed? Answer: [NA] Justification: The paper primarily focuses on vision backbones trained using publicly available datasets that have undergone thorough validation. While the vision backbone itself is not directly applicable to everyday scenarios, it serves as a neutral and valuable toolkit for further development and research. Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 


Decision: This paper introduces VMamba, a new vision backbone model inspired by the Mamba state-space model, designed for efficient visual representation learning with linear computational complexity. The key innovation is the VSS block, which incorporates a 2D-Selective-Scan (SS2D) module, adapting the 1D selective scan of Mamba for 2D image data. Experiments show that VMamba outperforms existing models in image classification, object detection, instance segmentation, and semantic segmentation, demonstrating superior accuracy, scalability, and adaptability. All reviewers are satisfied with the authors' responses.

Reviews: review: paper_summary: paper_summary: ### Summary

This paper proposes VMamba, which adopts the recently proposed selective linear state space model, Mamba, in the domain of computer vision. The paper evaluates variants of VMamba on tasks such as image classification, object detection, and semantic segmentation. To improve performance and efficiency, VMamba incorporates several architectural and implementation enhancements.

---

post-rebuttal: score 6 -> 7
strength_weakness: strength_weakness: ### Weaknesses

- As an architecture exploration paper I don’t see many weaknesses.
questions: questions: ### Questions

1. Is positional embedding used when encoding the patches? Apologize if this is already state somewhere in the paper.
2. If I understand correctly, Figure 3 for section 4.3 shows that performance improved with smaller d_state and expand ratio. This is quite surprising since one might expect degrading performance when network capacity is reduced. Could you provide any insights into this phenomenon?
limitations: limitations: Yes, the author adequately addressed the limitations.
paper_summary: paper_summary: This paper transplants the Mamba (Selective State Space Model), a linear complexity model originally designed for 1D language processing, into VMamba to process image data. It introduces the 2D selective scan and various acceleration techniques to facilitate the modeling of 2D data and enhance the speed of the network. The proposed VMamba model is trained and evaluated on a number of representative downstream tasks including ImageNet-1K classification, COCO object detection, and ASE20K semantic segmentation, and it is compared with strong baselines. A range of analyses and visualizations on the theoretical perspectives, design choices, and behavior of the model are also presented.
strength_weakness: strength_weakness: I didn’t find any critical weakness in this paper. Apart from some limitations that have already been mentioned by the authors, such as large-scale experiments, training strategies, and hyperparameter search, the only part that I hope the paper can show more results is the ablation of some design choices. For instance, the performance change of removing the entire multiplicative branch, where Table 5 does not show a straight ablation because of more than 1 variable change. This problem also exists in some other tables of some other design choices and hyperparameters. But again, I think neither of these weaknesses is critical.
questions: questions: Could the authors explain more on the statement in Lines 153-154, “such modification prevents the weights from being input-independent, resulting in a limited capacity for capturing contextual information”?

Others: Repetitive reference entries: [50] and [51], [50] and [60].
limitations: limitations: The authors adequately discuss the limitations and potential societal impact of this work. This paper also points out several potential improvements and future directions, with which I highly agree.
paper_summary: paper_summary: This paper presents VMamba, a novel vision backbone model inspired by the famous Mamba state-space sequence model. The main contribution of VMamba is its ability to achieve efficient visual representation learning with linear computational complexity. The core of VMamba is the VSS block, which incorporates the 2D-Selective-Scan module (SS2D), thereby extending the Mamba model that is a 1D selective scan good for NLP tasks. With SS2D, we can work nicely with inductive biases associated with 2D image space. 

VMamba's architecture consists of multiple stages with hierarchical representations (similar to ViT). The authors introduce three model sizes: Tiny, Small, and Base. The VSS blocks replace the S6 module from Mamba with the SS2D module, and further enhancements are made by eliminating unnecessary components and optimizing the architecture for better computational efficiency - using the Triton language.

Extensive experiments demonstrate VMamba's promising performance across various visual perception tasks, including image classification on ImageNet-1K, object detection, instance segmentation on MSCOCO, and semantic segmentation on ADE20K. VMamba consistently achieves superior accuracy and throughput compared to existing benchmark models, showcasing its scalability and adaptability to different input resolutions and downstream tasks.
strength_weakness: strength_weakness: * Limited Comparison with Other SSM-based Models: While the paper does compare VMamba with several benchmark models, it would benefit from a more detailed comparison with other state-space models (SSM) in the vision domain. Specifically, models like S4ND and Vim are mentioned, but the comparisons are somewhat brief. Providing more in-depth analysis and results would strengthen the argument for VMamba's superiority.
* Adding more interesting works to Related Work section: There are some interesting works on neuromorphic vision and processing with SSMs that authors should cite and mention:

[1] State Space Models for Event Cameras. Nikola Zubić, Mathias Gehrig, Davide Scaramuzza - CVPR 2024, Spotlight

[2] Scalable Event-by-event Processing of Neuromorphic Sensory Signals With Deep State-Space Models. Mark Schöne, Neeraj Mohan Sushma, Jingyue Zhuge, Christian Mayr, Anand Subramoney, David Kappel - ICONS 2024

* Generalization to Other Tasks: The experiments focus mainly on standard benchmarks for image classification, object detection, and segmentation. However, it is not clear how well VMamba generalizes to other types of visual tasks such as video analysis, 3D vision, or more complex scene understanding. Including some preliminary results or at least discussions on these aspects could highlight the versatility of VMamba further.
* Clarity in Mathematical Derivations: Some of the mathematical derivations, especially in the relationship between SS2D and self-attention, are complex and may not be easily accessible to all readers. Simplifying the explanations or providing more intuitive visual insights alongside the formal derivations could enhance understanding. Also, they are not rigorously mathematically proven.
questions: questions: - Could you provide more detailed comparisons with other state-space models (SSMs) used in the vision domain, such as S4ND and Vim? Specifically, how does VMamba perform in terms of accuracy, computational efficiency, and memory usage compared to these models?
- How well does VMamba generalize to other types of visual tasks beyond image classification, object detection, and segmentation? Have you considered evaluating VMamba on tasks such as video analysis, 3D vision, or more complex scene understanding? How does it scale on these tasks?
- How sensitive is VMamba to various hyperparameters? It would be helpful to know if specific hyperparameters are critical to achieving the reported performance and if there are guidelines or best practices for tuning them.
- How easily can VMamba be integrated into existing deep learning frameworks and pipelines? Are there any specific requirements or modifications needed for seamless integration?
limitations: limitations: Authors addressed everything regarding limitations section.

Comments: title: Final Rating
comment: Thank you for the rebuttal. I will raise my score, this is a good paper.
Thanks to the authors for providing a thorough and solid response to all my concerns. Based on all the reviewers' comments and the rebuttal, I am happy to keep my rating as a Strong Accept (8).
1. Authors did Detailed Comparison with SSM-based Methods along with experiments.
2. They will include works of Zubić et al. and Schoene et al. in the related works section.
3. Authors said that they will discuss more the generalized scanning pattern for vision tasks in the paper as future work, which is very interesting.
4. Authors "have not found any hyperparameter to which VMamba is particularly sensitive". 
5. Pretty robust model to the changes in hyperparameters, they did experiments, for example learning rates, which is great.

Given that the authors have addressed all my concerns with clear and effective experimental evidence, I am updating my score from Accept (7) to Strong Accept (8).