Exploring Token Pruning in Vision State Space Models

Authors: zheng  zhan
zhenglun  kong
yifan  gong
yushu  wu
zichong  meng
hangyu  zheng
xuan  shen
stratis  ioannidis
wei  niu
pu  zhao
yanzhi  wang
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-12 22:16:33

Abstract: State Space Models (SSMs) have the advantage of keeping linear computational complexity compared to attention modules in transformers, and have been applied to vision tasks as a new type of powerful vision foundation model. Inspired by the observations that the final prediction in vision transformers (ViTs) is only based on a subset of most informative tokens, we take the novel step of enhancing the efficiency of SSM-based vision models through token-based pruning. However, direct applications of existing token pruning techniques designed for ViTs fail to deliver good performance, even with extensive fine-tuning. To address this issue, we revisit the unique computational characteristics of SSMs and discover that naive application disrupts the sequential token positions. This insight motivates us to design a novel and general token pruning method specifically for SSM-based vision models. We first introduce a pruning-aware hidden state alignment method to stabilize the neighborhood of remaining tokens for performance enhancement. Besides, based on our detailed analysis, we propose a token importance evaluation method adapted for SSM models, to guide the token pruning. With efficient implementation and practical acceleration methods, our method brings actual speedup. Extensive experiments demonstrate that our approach can achieve significant computation reduction with minimal impact on performance across different tasks. Notably, we achieve 81.7\% accuracy on ImageNet with a 41.6\% reduction in the FLOPs for pruned PlainMamba-L3. Furthermore, our work provides deeper insights into understanding the behavior of SSM-based vision models for future research.

Main paper: 
 introduction: 
 Recent years have witnessed the rapid evolvement of the computer vision field in the era of deep learning. Significant research efforts have been devoted to designing effective and efficient architectures of deep neural networks (DNNs) for visual tasks. Convolution Neural Networks (CNNs) [29, 12, 23, 30] and Vision Transformers (ViTs) [6, 22, 31, 43] are two representative categories of backbone networks. Though ViTs exhibit superior modeling capabilities with the incorporation of the self-attention mechanism [6, 32] , the complexity of self-attention grows quadratically as the input size increases. Inspired by the great potential of State Space Models (SSMs) for long sequence modeling with linear complexity in natural language processing (NLP) tasks [9, 24, 33, 44] , the latest backbone network designs for visual tasks [10, 21] leverage SSM-based blocks. Particularly, VMamba [21] reduces the complexity of attention computation with the selective scan mechanism presented in the S6 model [9] and matches the performance with existing foundation models.technique for CNNs [34, 13, 17, 14, 38, 7, 8, 35, 40] , token pruning [27, 26, 39, 28, 16, 41, 5] proves to be an effective way to enhance the efficiency of ViTs due to the independent patch processing design. Given that the SSM-based blocks also process input by dividing it into patches like ViTs, the existing token pruning techniques [18] for ViTs can be applied as a straightforward approach to boost the SSM efficiency. However, as shown in Figure 2 , although enjoying certain benefits of faster inference with less tokens, this naive token pruning application for SSMs suffers from significant accuracy drops. Even after extensive fine-tuning efforts, its accuracy is still not able to recover from the token pruning with non-marginal gaps compared with the original accuracy. This indicates that the direct application of token pruning designed for ViTs permanently harms the performance of SSM-based vision models.Given this observation, we conduct a thorough analysis of the computation patterns in SSM-based blocks, aiming to find the root cause and provide a foundation for efficient token pruning design in SSMs. Unlike ViTs whose attention mechanism computes the correlation between each pair of patches, SSM-based blocks follow traversal paths and thus the paths are sensitive to their adjacent patches. The direct application of token pruning techniques from ViT disrupts the patch locations/neighborhood in SSM-based blocks, thus incurring massive accuracy drops.Based on our analysis, the question naturally arises whether we can keep the sequential property of tokens/batches in SSM-based vision models while pruning tokens to accelerate the forward computation. A successful solution not only improves the computational efficiency, but also provides more insights into the interpretability of SSM scan/token for future research. We take the first novel step towards this direction by proposing a general token pruning method for SSM-based vision models. Specifically, we propose a token importance evaluation method adapted for SSM models to guide the token pruning process based on a comprehensive analysis of SSM-based models. More importantly, to address the root cause of the above significant accuracy drop, we introduce a pruning-aware hidden state alignment method to reform the scan mechanism in SSMs for pruned and remaining tokens, thus stabilizing the neighborhood of remaining tokens and enhancing performance. Following the token pruning designs, we explore the efficient implementation and practical acceleration methods. With our tailored design, the computations can be significantly reduced with high accuracy performance. Notably, we achieve 81.7% accuracy on ImageNet for token pruned PlainMamba-L3, with 41.4% FLOPs reduction. We summarize our contributions as follows:• After observing the incapability of directly applying token-based pruning techniques from ViTs for vision SSMs, we conduct a comprehensive analysis of SSM-based blocks to identify the failure reason, as well as provide more insights for the SSM scan mechanism in vision tasks, shedding lights on future research on SSM-based vision models.• Based on our analysis, we propose a general token pruning method for SSM-based vision models, incorporating an adapted token importance evaluation to determine the pruned tokens, a pruning-aware hidden state alignment method to reform the SSM scan mechanism for pruned and remaining tokens, and practical implementation for efficient inference.• We take the first step towards accelerating vision SSM models with token-based pruning. Our extensive and comprehensive experiments for image classification and object detection demonstrate the effectiveness of our proposed method for vision SSMs.Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?Answer: [Yes]Justification: We explain method and summarize the contribution in introduction.Guidelines:• The answer NA means that the abstract and introduction do not include the claims made in the paper. • The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers. • The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings. • It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper. 
related work: 
 State Space Models. SSMs [9, 24, 33] were first proposed to tackle long sequence modeling in the NLP community. The design has the strength to model complex systems by focusing on how the input, output, and state variables evolve over time. Recent progress has demonstrated that the variants of SSMs can be applied to visual tasks as an alternative to CNNs and ViTs with promising results. S4ND [25] is the first work that applies the state space mechanism to visual tasks and shows the potential to achieve competitive performance with ViTs [6] . The design expands the S4 model [10] and normalizes the parameters into a diagonal structure. But it fails to efficiently capture image information in an input-dependent manner. ViM [46] proposes a novel vision backbone with bidirectional Mamba. Based on that, PlainMamba [37] invents a continuous 2D scanning to enhance spatial continuity by ensuring adjacency of tokens in the scanning sequence. VMamba [21] introduce Cross-Scan Module (CSM) to enable 1D selective scan, matching the performance with existing foundation models including ResNet [12] , ViT [6] , Swin [22] , and ConvNext [23] . The great accomplishments demonstrate the potential of vision SSMs as an emerging fantastic foundation model family.Token Pruning. Token pruning is an effective strategy to enhance computational efficiency by reducing the number of processed tokens or patches. It enables significant acceleration without requiring additional weights or specialized hardware, aiming to selectively retain the most informative tokens and sparsify the sequence. It is also vital for dense prediction tasks where sequence sizes are extensive. Several innovative approaches have been developed for vision transformers. For example, EViT [18] uses the attentiveness of the [CLS] token with respect to other tokens to identify the most important tokens. DynamicViT [27] and SPViT [15] add layers that employ the Gumbel-Softmax trick to selectively prune less informative tokens. IA-RED2 [26] drops redundant tokens with a multi-head interpreter. PS-ViT (T2T) [39] discard useless patches in a top-down paradigm. PATCHMERGER [28] uses spatial attention to generate a small set of tokens adaptive to the input. ToMe [2] measures dot product similarity between token keys to determine redundancy and prune accordingly. However, the dynamics of information flow between tokens and the learning mechanisms in models like Mamba [9] remain largely unexplored. Unlike ViTs that reply on attention features, the absence of attention layers in Mamba makes current pruning methods ineffective. Furthermore, the inclusion of the SSM module prevents the effective use of existing token pruning methods [42] .3 Preliminary and MotivationQuestion: Does the paper discuss the limitations of the work performed by the authors?Answer: [Yes]Justification: The limitation is included in conclusion section.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. 
state space models: 
 State Space Models (SSMs) are sequential models that map an input sequence x(t) ∈ R L to an output sequence y(t) ∈ R L through a hidden state h(t) ∈ R N as follows,EQUATIONwhere L denotes the length of the sequence, N denotes the number of representation dimensions, A ∈ R N ×N is the evolution matrix, B ∈ R N ×L , and C ∈ R L×N are the projection matrices.The Mamba model [9] represents a discrete version of the continuous system for SSMs and incorporates a timescale parameter ∆ to facilitate the transformation of continuous parameters with the zero-order hold (ZOH) as follows,EQUATIONAfter obtaining the discretized A and B, the discretization of Equation ( 1) can be rewritten as follows,EQUATIONFinally, the Mamba model computes the output through a global convolution as follows,EQUATIONwhere y denotes the output sequence, L denotes the length of the input sequence x, and K ∈ R L denotes a structured convolutional kernel.3.2 Failure of Applying ViT Token Pruning for ViMs (Observation) After applying token pruning method to an SSM-based vision model, the Zero-shot performance will drop significantly. Moreover, this process will permanently harm the model's performance, even after extensive fine-tuning.Epic failure of traditional token pruning for vision SSMs. To explore the token sparsity in vision SSMs, we first prune tokens in SSM-based models with the 'must-try' baseline, which directly applies the token pruning techniques designed for ViTs. Specifically, we prune the tokens using selector metrics of EViT [18] on both transformer-based ViT-S [6] and SSM-based ViM-S models [46] . Given N input tokens for one layer, with token pruning, K tokens remain while the other N -K tokens are pruned. The remaining tokens are relabeled as {x j } K-1 j=0 and their hidden states are obtained following Equation (3) . In this way, the number of the tokens and the corresponding hidden states are reduced, condensing token matrix to save computation costs, as shown in Figure 1 . After pruning tokens based on the token selector, we evaluate the performance in terms of zero-shot and fine-tuning accuracy. The results are shown in Figure 2 . As observed, the direct application of token pruning from ViTs is not capable of delivering satisfying performance on ViMs. Specifically, direct token pruning suffers from substantial zero-shot accuracy degradation on ViM-S (with over 68% accuracy drop compared with the original accuracy), despite its success for ViT-S with merely 1.4% accuracy drop. Furthermore, even after extensive fine-tuning for the pruned model, its accuracy is not restored still with a 5.7% accuracy gap compared with the original ViM-S model, while it can boost the accuracy to a competitive level on ViT-S after fine-tuning. The significant performance degradation in ViM-S demonstrates that the direct application of token pruning hurts the underlying computations in SSM-based blocks, with permanent negative effects which can hardly be restored after fine-tuning. Observing the great success for ViT-S and epic failure for ViM-S with the same method, we are motivated to revisit the unique computation characteristics of SSMs and rethink the token pruning strategy in ViMs. To figure out the reason of failure, we look into the token computation patterns in SSM-based blocks. Given the input data, SSM-based blocks first unfold image patches/tokens into sequences along traversal paths (i.e., cross-scan, as shown in Figure 1 with ViM scan), process each token sequence using a separate computation block in parallel, and subsequently reshape and merge the resultant sequences to form the output map (i.e., cross-merge). The traversal paths facilitate the integration of information from all image pixels in various directions with linear complexity, enhancing the model's understanding.Reason for the failure. However, the unique traversing along the sequence paths in ViM makes each token sensitive to its neighboring tokens. This is not a problem for ViT as the quadratic design of the attention mechanism calculates the correlation between the target token and all other tokens in the image, eliminating the sensitivity to adjacent tokens. As shown in Figure 1 , introducing a token pruning strategy within an SSM-based block disrupts the original token positions in the SSM scan. Consequently, tokens that were not previously adjacent become neighbors during the scan in different directions or paths, leading to a distorted scan functionality and a significant accuracy degradation. Especially considering that the tokens are actually image patches in visual tasks with semantic information, disrupting their positions during the scan brings great difficulties to understand their relationship and the overall semantics.In response to the limitations of directly applying existing token pruning methods designed for ViTs, we aim to address the following question:(Question) Can we prune tokens in SSM-based vision models to accelerate their forward computation without disrupting the original sequential token positions in different directions during the scan?Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?Answer 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). 
methodology: 
 To address the above Question, we propose a general token pruning method tailored for SSMbased vision models. Specifically, we propose a pruning-aware hidden state alignment method to stabilize the neighborhood of remaining tokens during the scan, addressing the distorted scan functionality in traditional token pruning and thus enhancing accuracy performance. Furthermore, based on our detailed analysis of SSM-based vision models, we propose a token importance evaluation method adapted for SSM models, to guide the token pruning. Moreover, we discuss the efficient implementation and practical acceleration methods for token-pruned SSM-based vision models.To maintain the sequential property of SSM tokens during the scan and tackle the Question, we propose the following novel pruning-aware hidden state alignment technique to align the sequential positions or neighbourhood of tokens before and after token pruning during the scan, thus maintaining the model performance under token pruning. For SSM-based vision models, the input token sequence for the l th layer is denoted as T l-1 ∈ R B×N ×D , where B, N , and D are the batch size, token number, and hidden state dimension, respectively. The tokens in one batch of the sequence can be unfolded as {x j } N -1 j=0 with N tokens in total. After applying token pruning (Section 4.2), K tokens are kept while the other N -K tokens are removed from the input token sequence. We adopt different strategies to align the hidden states of remained tokens and pruned tokens during the scan as detailed below.Alignment of hidden states for remaining tokens. We denote the set of the remaining token indices as {q j } K-1 j=0 with K elements and q s < q t if s < t. Formally, the pruning-aware hidden states during the scan corresponding to the remained tokens can be represented asEQUATIONAs shown in Equation ( 5), the hidden states of remained tokens depend on its current token and all previous remaining tokens. The pruned tokens are not effective in the hidden states.Alignment of hidden states for pruned tokens. As observed in Figure 1 and 2, if one token is pruned, removing its position during the scan disrupts the neighbourhood of its adjacent tokens, leading to significant zero-shot accuracy drop which can hardly be compensated even after extensive fine-tuning. To mitigate this problem, our pruning-aware hidden state alignment maintains the position gap from pruned tokens during the scan to stabilize the neighbourhood of all remaining tokens. Specifically, to make the problem tractable, for two adjacent remaining tokens x qi and x qi+1 , if q i+1 -q i > 1, meaning there are tokens pruned between x qi and x qi+1 , we denote the number of pruned tokens between x qi and x qi+1 as K i (K i ≥ 1) and their indices can be represented as {q i + j} Ki j=1 . We have q i < (q i ) + 1 < ... < (q i ) + K i < q (i+1) . To highlight the difference between q i+1 and q i + 1, we use round brackets in the expression (e.g., q (i+1) and (q i ) + 1) without changing their meanings. Thus, the hidden states for the pruned tokens between two remaining adjacent tokens can be represented as follows,EQUATIONFor pruned tokens with indices smaller than q 0 , their hidden states are set to zero. For pruned tokens with indices larger than q K-1 , their hidden states can still be obtained following Equation (6) . As shown in Equation ( 6), if a token is pruned, we do not simply remove its corresponding hidden state during the scan as it leads to substantial accuracy degradation shown in Figure 1 and 2. Instead, its hidden state in the scan can be obtained by using the previous state with one step forward, i.e.,h ′ (qi)+1 = Ah ′ (qi) + Bx (qi)+1 = Ah ′ (qi)where the token x (qi)+1 is pruned. In this way, the hidden states corresponding to pruned tokens are aligned with that of the original unpruned tokens to maintain the sequential positions of the original tokens without disrupting their neighbours.Comparison with traditional token pruning. As discussed in Section 3.2, in traditional ViT token pruning, the remaining tokens are relabeled as {x j } K-1 j=0 (disrupting their neighbours due to removal of pruned indices) and their hidden states are obtained following Equation (3). Different from ViT token pruning, we still keep the original indices of all tokens (including remaining and pruned tokens) to record their original sequential positions and neighbourhood. During the scan, the hidden states of pruning tokens becomes completely zero in ViT token pruning, which is different from our adapted scan mechanism in Equation ( 6) to keep a copy from its previous unpruned neighbour.In SSM-based vision models such as ViM, for the l th layer, the input token sequenceT l-1 ∈ R B×N ×D is first projected to X ′ ∈ R B×N ×D ′, and then goes through bidirectional SSMs for datadependent global visual context modeling. It processes X ′ from the forward and backward scan via:EQUATIONwhere y m ∈ R B×N ×D ′ is the output of SSM. Then y m is gated to obtain y ′ forward and y ′ backward . The token sequence output of the l th layer can be obtained as follows:EQUATIONTherefore, the output of SSM can directly reflect the token importance. The Mamba architecture, with its high-dimensional channel space, allows for a finer-granularity analysis of attention across numerous channels. Unlike Transformers that produce a single attention matrix per head, Mamba models exploit their extensive channel capacity for a more detailed attention distribution, enhancing the model's ability to discern subtle features and interactions among tokens. Thus, we aggregate the clipped values across all channels for each token to evaluate token importance as follows,EQUATIONwhere [•] ::d denotes the d th feature map in the feature dimension with size D ′ . We use S as the token importance metric to guide the pruning process, ensuring that only the most contextually relevant tokens are retained, thereby optimizing computational resources. Given the sparsity requirement for the token pruning, we sort S and prune the corresponding less important tokens. To make a comprehensive study, we compare the performance with other token importance metrics, including the ℓ 1 norm, ℓ 2 norm, as well as unclipped values without the max operation. We find that using clipped values in Equation ( 9) as the token importance metric can constantly yield better results.Efficient implementation for the SSM scan. Based on the pruning-aware hidden state alignment technique discussed in Section 4.1, we propose the pruning-aware hidden state alignment kernel for practical acceleration. It utilizes a position map to guide the SSM operator, ensuring the correctness of computations. The position map is the token pruning indicator based on {q j } K-1 j=0 in Section 4.1, which inherits from token importance evaluation and records the location of remained tokens and pruned tokens. The pruning-aware hidden state alignment kernel takes the pruned dense sequences and the position map as its inputs. During the scan, it switches between the token remaining pattern and the token pruned pattern based on the remaining/pruning state of the token indexed by the position map. The token remaining pattern in the kernel follows the computations in Equation (5) . Similarly, following Equation ( 6), the token pruned pattern still updates the hidden states but ignores computations related to the current token. The kernel switches to another pattern if it detects a corresponding change in token pruning state. A pseudo-code for our pruning-aware hidden state alignment is demonstrated in Appendix A. Thus, the pruning-aware hidden state alignment kernel can effectively accelerate the SSM scan under token pruning.Practical acceleration for the whole model.Note that the SSM scan only takes up around 10∼20% computations in the whole model. With less tokens, other parts in the model can be accelerated directly due to less computations from pruned tokens, leading to significant inference speedup performance as demonstrated in our experiments. 
experiment results: 
 We conduct comprehensive experiments on ImageNet-1K [4] , COCO 2017 [20] and ADE20K [45] datasets. All experiments are conducted on 4 NVIDIA V100s. "-EViT" means apply EViT token pruning method. "-prune" means apply our token pruning method. We report average results of multiple runs for all experimental sections, and different runs do not vary much. For ViM-T, we prune after the 10th and 20th layers. For ViM-S, we prune after the 5th, 10th, 15th, and 20th layers. For PlainMamba-L1, we prune after the 5th and 10th layers. For PlainMamba-L2, we prune after the 5th, 10th and 15th layers. For PlainMamba-L3, we prune after the 5th, 11th, 17th, and 23th layers.Settings. We finetune both the ViM and PlainMamba for 30 epochs on the ImageNet-1K dataset. The top-1 accuracy on the validation set is reported. For ViM, we set a patch extraction stride of 8 while keeping the patch size unchanged, a constant learning rate of 10 -5 , and a weight decay of 10 -8 . For PlainMamba, we use a warm-up period of 5 epochs. The weight decay is set to 1e-8, the base learning rate to 2e-5, the warm-up learning rate to 2e-8, and the minimum learning rate to 2e-7.Results. The comparison results of our token pruning models against benchmark backbone models on ImageNet-1K are summarized in Table 1 . One advantage of our method is that it is general and can be applied to a wide range of SSM-based vision model architectures to reduce computation complexity with a minor loss of performance. We evaluate our method on five base models including ViM-T, ViM-S, PlainMamba-L1, PlainMamba-L2, and PlainMamba-L3. We report the top-1 accuracy and FLOPs. Compared to directly applying the EViT method on vision state space models, using our pruning-aware hidden state alignment and token importance metric constantly outperforms EViT across various models of different scales. Specifically, On ViM, our method surpasses EViT by 3.8% on ViM-T and 4.0% on ViM-S. On PlainMamba, our method exceed EViT by 2.4% on PlainMamba-L1, 2.7% on PlainMamba-L2, and 2.8% on PlainMamba-L3.Settings. Following previous works, we conduct experiments for object detection and instance segmentation on the COCO 2017 dataset. The COCO 2017 dataset contains 118K images for training, 5K images for validating, and 20K images for testing. We use both the two-stage Mask R-CNN [11] and the single-stage RetinaNet [19] . For both models, we report the results of both 1× schedule. Following [37] , we use ViTAdapter [3] to compute multi-scale features to fit the FPN network structure. Results. We used our pruned PlainMamba models as the backbone and compared them with existing token pruning methods and dense backbones. As shown in Table 2 , our token pruning method maintains similar performance to dense models (less than 0.5%). When compared to existing token pruning methods, specifically for PlainMamba-L1, our pruning method outperforms EViTbased pruning by an average of 1.59% across all six precision metrics. For PlainMamba-L2, our method surpasses EViT by an average of 1.63% across all six precision metrics. Additionally, for PlainMamba-L3, our method exceeds EViT by an average of 1.30% across all six precision metrics.Settings. We conduct experiments for semantic segmentation on the ADE20K dataset [45] . ADE20K contains 150 fine-grained semantic categories, with 20K, 2K, and 3K images for training, validation, and testing, respectively. We choose UperNet [36] as our base framework. We train all models for 160 iterations with batch size 16 and set the default training image size to 512×512. Results. We show the results of semantic segmentation on ADE20K in Table 3 . The results indicate that our method also works well for the semantic segmentation task by greatly reducing the computation costs while maintaining satisfying performance. For instance, our token pruned PlainMamba-L1 reaches a mIoU of 44.1%, which is the same as the unpruned PlainMamba-L1. Our PlainMamba-L3-prune has a mIoU of 48.6%, which is better than current state-of-the-art model architectures including LocalVim-S and VMamba-T.In Table 4 , we study on the impact of different token importance metrics, focusing on pruning-aware hidden state alignment. We test on two models: ViM-S and PlainMamba-L3. For the ViM-S model, both ℓ 1 -norm and ℓ 2 -norm methods achieve an accuracy of 78.6%, while the method without clipping (w/o Clip) results in a lower accuracy of 77.4%. The proposed clipping method (Clip) achieves the highest accuracy of 78.8%. For the L3 model, similar trends are observed: the ℓ 1 -norm and ℓ 2 -norm methods yield accuracies of 81.6% and 81.5%, respectively. The non-clipping approach results in a decrease in accuracy to 80.5%, whereas the clipping method provides a better enhancement, achieving 81.7%. These results suggest that the clipping mechanism in token importance metrics offers a consistent improvement in model accuracy, particularly in the context of pruning-aware hidden state alignment. It can potentially mitigate the adverse effects of extreme token importance values.Evaluation of pruning-aware hidden state alignment. In Table 5 , we compare the performance of different pruning methods across two models: ViM-S and PlainMamba-L3. Our pruning method without the alignment process reduces the FLOPs to 3.57G but also lowers the accuracy to 75.4%, resulting in an improved throughput of 1.30×. In contrast, adding the align matrix achieves a much higher accuracy of 78.8%, with a similar throughput of 1.27×.For the PlainMamba-L3 model, our pruning method without the alignment reduces FLOPs to 8.35G but decreases accuracy to 79.3%, while increasing throughput to 1.47×. Equipping the alignment process improves accuracy to 81.7% and achieves a throughput of 1.43×. These results demonstrate that the proposed pruning method with the alignment process can effectively balance computational efficiency and model accuracy, outperforming the baseline pruning approach. To further interpret token pruning in SSM-based vision models and understand the pruning-aware hidden state alignment behavior of our approach, we present attention visualizations based on zeroshot results in Figure 3 . Our pruning-aware hidden state alignment effectively aligns the hidden states of pruned tokens in the SSM scan, maintaining similar visual representations and attention regions as the dense model. In contrast, pruning without our alignment shows significantly different attention regions, which could explain the huge accuracy drop. This demonstrates the effectiveness of our proposed pruning-aware hidden state alignment. The visualization tool is adopted from [1] .Figure 4 : visualizations of locations of pruned token. We use the output after the final layer to visualize this reduction results. We further visualize the token reduction results of our method within Fig. 4 . show the input images along with their sparsification results. The masked regions represent the tokens that have been pruned. Our method can gradually drop less informative tokens during forward pass and preserve the tokens that contain representative regions with an adaptive pruned region for each image. 
conclusion and limitation: 
 In this paper, we take the first step toward accelerating vision SSM models with token-based pruning. We analyze SSM-based blocks to understand the failure of direct token pruning and propose a general token pruning method for SSM-based vision models. This method includes an adapted token importance evaluation, a pruning-aware hidden state alignment, and practical implementations for efficient inference. Our extensive experiments confirm the effectiveness of our method and provide deeper insights into the SSM scan mechanism, guiding future research on SSM-based vision models. Though our method is general, the efficiency is limited by baseline model architecture design.NeurIPS Paper Checklist 
broader impacts: 
 Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?Answer: [NA] Justification: Our paper is not highly related to societal impacts.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). 
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: Our paper poses no such risks. Our work does not release a new model.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. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?Answer: [Yes] Justification: CC-BY 4.0, and we referenced the works that we used to implement our code.Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided. • If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. 
 
 Appendix:  


Decision: This paper proposes a novel technique to prune State-State Models (SSMs) tokens for vision tasks based on insights specific to SSMs. Experiments are conducted on ImageNet-1K, COCO 2017, and ADE20K datasets.

Upon the rebuttal and the authors-reviewers discussion, the reviews were slightly diverging, and three were borderline: 1x borderline reject, 2x borderline accept, and 1x weak accept.

The AC summarizes these main aspects:

(1) The paper is clear.

(2) The proposed model compression by token pruning for SSMs-based vision models is novel. This virtue mainly stems from considering the recent hot trend of SSMs. Although token pruning is well known, the paper provides insights into applying the technique to SSMs, which are informative and not trivial.

(3) The performance improvement is satisfactory. The majority of reviewers and the AC reckon the compromise between computation reduction and accuracy is analyzed thoroughly, demonstrating the proposed technique's quality. Two reviewers have demanded comparisons against more baselines other than the comparison with EViT in the submitted paper. The authors could not provide a comparison with AViT [cvpr'22] and STViT [cvpr'23], which one reviewer suggested, but they provided a comparison with ToMe (ICLR'23) and LTMP (TMLR'23). One of the reviewers deems this is sufficient, and the AC seconds this statement but encourages the authors to complete the performance evaluation and consider those baselines if they can manage before the camera-ready submission deadline.

Overall, the AC stands with the favorable opinion of most reviewers and recommends this paper for acceptance.

Reviews: review: paper_summary: paper_summary: This paper presents a token pruning method for vision state space models. The goal of this paper is to expand the token pruning methods for ViTs to recent SSM-based vision backbones. The authors observed that token pruning will change the computational characteristics of SSMs and lead to significant accuracy drop. To solve this problem, a hidden state alignment method is designed to explicitly adjust the hidden states of SSMs after token pruning. Experiments are conducted on on ImageNet, COCO and ADE20k to show the effectiveness of the method.
strength_weakness: strength_weakness: - There are still noticeable accuracy drop even after finetuning.  Although there is no previous work on token pruning in SSM-based vision models, many methods are proposed for ViT token pruning and achieved nearly no accuracy drop when reducing around 20% FLOPs. But I find the proposed method will lead to around 0.5 accuracy drop. The results are not that impressive.

- The actual speed-up is not reported. One key advantage of ViT token pruning compared to traditional channel pruning is hardware friend structures after pruning to easily lead to actual speed-up. If the proposed method can also achieve similar results, the method will be much more useful.
questions: questions: - How to determine the pruning protocol mentioned in line 262-265? It seems that the models are not uniformly partitioned. So it is better to show more details behind the partition strategy used in the experiments. 

- How about the results with different pruning ratios? The paper only demonstrate one pruning ratio for each model and the ratios are different for different models. 

Overall, I find there are some interesting observations and results presented in the paper. But the experimental studies look a bit weak and the results are not that impressive/useful. Therefore, I would rate this paper as "Borderline reject".
limitations: limitations: The limitations have been discussed in Section 6.
paper_summary: paper_summary: This paper explores the token pruning in vision state space models. It gives the observations that utilizing the token pruning techniques designed for ViTs leads to significant performance drop in SSMs. The main reason is that naive application disrupts the sequential token positions. To solve this, this paper introduces a pruning-aware hidden state alignment method and a token importance evaluation method to guide the token pruning while maintain better performance. Extensive experiments on ImageNet classification and object detection demonstrates the effectiveness of the proposed methods.
strength_weakness: strength_weakness: This paper gives interesting observations about the token-pruning in vision state space models. However, I have some concerns about the analysis and the token-pruning methods designed for SSMs.

1、	Fig. 1 illustrates the token computation difference between ViT and ViM. This introduces the large performance gap when adopting the traditional token-pruning techniques. Is there any more quantitative analysis result here to prove the impact of token computation patterns on performance of SSMs, such as randomly exchanging the order of adjacent tokens.

2、	What inspires the design of token importance in Eq(9). I can’t understand the reason of this design. Why adopting value 0 as the clipped threshold? Why does a larger S correspond to the most contextually relevant tokens? The result in Table 3 doesn’t indicate much superiority of the algorithm. In the traditional token-pruning method, the importance of a token should be represented by its’ impact on the loss value.

3、	This paper also introduces the efficient implementation for the SSM scan. The FLOPs and Params are provided to demonstrates the computations reduction. I think we care more about the actual running latency. This information is necessary for us to evaluate the practicality of the methods. The improvement of Throughput in table 4 is not as obvious as that of FLOPs. What caused this?

4、	Some detailed information is missing. Such as what proportions are reduced in different layers? For the SSM model, does the ratio of token reduction in different layers need to follow any principles? I think this can make the article better.
questions: questions: The observation of this paper is interesting. However, I have major concerns about the novelty of the designed methods. I hope the author can solve my questions in the weaknesses part.
limitations: limitations: Limitations have been discussed in this paper. The efficiency is still limited by the baseline model architecture design.
paper_summary: paper_summary: This paper introduces a token pruning method for vision SSMs to improve computational efficiency while maintaining performance. The authors identify that direct application of existing token pruning techniques designed for ViTs fails in SSMs due to disruption of sequential token positions. To address this, they propose a pruning-aware hidden state alignment method to stabilize the neighborhood of remaining tokens.
strength_weakness: strength_weakness: See the questions below.
questions: questions: - In Eq.6, how do you handle the accumulation of errors when computing hidden states for multiple consecutive pruned tokens? Does this lead to any instability in longer sequences?
- How sensitive is the performance to the number of pruned tokens? Is there an upper limit to K_i before performance degrades significantly?
- Is there any specific analysis about the pruning rate?
limitations: limitations: None
paper_summary: paper_summary: This manuscript aims to propose an effective pruning method for SSMs to achieve great trade-off of computation overhead and accuracy. The authors find that directly applying pruning strategies designed for transformer structure would greatly impair the performance of SSMs and give related analysis, that is SSMs take traversal path to consturct the interaction between different tokens and simple pruning would disrupt this connection. To address this challenge, the author first propose a strategy to build the alignment between the remaining tokens with the pruned tokens by keeping the indices and part calculation process of the pruned tokens. Based on the output of SSM layers, the author also propose a token selection strategy.
strength_weakness: strength_weakness: * The authors only compare the proposed method with EViT. However, it seems that EViT is proposed in 2022. The authors should consider comparing with more recent pruning methods.
* Lack of clear explanation and analysis of why the proposed pruning-aware hidden state alignment strategy is helpful. From Eq.6 we can see that the hidden state of h_{q+1} do not utilize any information of the pruned tokens, while the indices of evolution matrix A are changed. This part is confusing and I hope the author could give more descriptions about why only changing the indices brings such remakable improvements.
* The proposed Token Pruning based on Importance Evaluation does not make sense. Why the output of SSM can directly reflect the token importance? Just because it shares the same length with input? I recommend the authors could give move explanations.
questions: questions: * I have an additional explanation about why directly applying pruning strategy of EViT greatly impair the performance of SSMs. Because transformer takes non-local operation, all the tokens have knowledge of the overall context, so that removing some tokens would not cause huge information loss. However, for SSMs, the traversal interaction path makes them greatly rely on the continuous context and token pruning would lead to huge information loss. If space available, I am happy to discuss with the authors about that.
limitations: limitations: The authors have discussed the potential limitations.
paper_summary: paper_summary: The paper  introduces a pruning-aware hidden state alignment method, stabilizing token neighborhoods and maintaining model performance during token pruning. It also proposes an adapted token importance evaluation method tailored for SSM-based models, effectively guiding the pruning process. Extensive experiments demonstrate the method's efficacy, achieving significant computation reduction with minimal performance impact. Notably, the approach achieves 81.7% accuracy on ImageNet with a 41.6% reduction in FLOPs for pruned PlainMamba-L3, highlighting its practical acceleration benefits and effectiveness in maintaining high accuracy in vision tasks.
strength_weakness: strength_weakness: - The proposed method is limited to plain, non-hierarchical SSM-based models.
questions: questions: Can the proposed method generalize to the hierarchical variants like VMamba?
limitations: limitations: The authors adequately addressed the limitations

Comments: comment: Thank you for your detailed feedback and for acknowledging the strengths of our work. We understand your core concern regarding the comparative performance of SSM-based models and ViTs on vision tasks, and we'd like to address this more explicitly.

1. **SSMs as an Emerging Foundation Model:** While it is true that ViTs have demonstrated strong performance across a variety of visual tasks, SSMs represent a new and rapidly evolving class of models. Given their emergent nature, it may be premature to conclude that ViTs are definitively superior to SSMs. In fact, SSMs have already shown **remarkable performance** in several vision tasks, indicating their potential to be **strong competitors** or even **successors** to ViTs as research in this area progresses.

2. **Our Baselines are Not Weak:** We want to clarify that the baselines we compare against are not weak; they represent the state of the art in the relevant categories. Our method **significantly outperforms** these **SOTA** methods, demonstrating the practical value and effectiveness of our approach within the current landscape of vision SSM models.

3. **Contributions Beyond Baseline Comparisons:** Our work goes beyond simply applying token pruning to a vision SSM model. We provide critical insights into the design of future vision SSM models, particularly regarding the handling of **token continuity** and **positional information**. These contributions are **foundational** and offer **valuable guidance** for the continued development of vision SSM models. It is important to recognize that early-stage work in emergent fields often serves as a **foundation stone**, even if it does not immediately surpass established benchmarks in ViTs-based models. The insights we offer pave the way for future innovations and improvements in the design of SSMs for vision tasks.
Thanks for your new and detailed results. I agree that the proposed method can clearly improve existing methods that are not designed for SSM-based models, as I mentioned in "Strengths". However, I think the authors may misunderstand my core concern. I think there is still no clear evidence that SSM-based models are better than ViTs on visual tasks, and ViTs is still the first choice for core application scenarios of visual backbones including visual understanding (like detection, segmentation), and multimodal modeling (like CLIP, MLLMs). Therefore, in my opinion, only if achieving results comparable to ViTs' efficiency/performance can make a solid and impressive impact, simply beating some weak baselines may not fully demonstrate the value of studying this problem.
**We sincerely appreciate the feedback from the reviewer. We address the newly raised questions below.**

---
**Q1. The actual speed-up of the proposed method seems less ideal than that of the ViT pruning method like DynamicViT. I am still concerned about the value of studying token pruning for SSM-based models.**

Token pruning is crucial for enhancing efficiency, especially with long sequences (please refer to our answer to **Q1** of Reviewer **M2Lk**). By reducing the number of tokens processed, we can significantly decrease computational cost and memory usage, thereby improving the scalability of SSMs for real-world applications. In this work, we introduce a general token pruning method specifically designed for SSM-based vision models. This is the **first successfully** token pruning work to **effectively** handle this problem on SSMs with **huge performance improvement**.

Given the limited time (less than one day), we conducted an acceleration comparison between our method and DynamicViT under the same pruning ratio on SSMs. The results are as follows:

|Model| Method | FLOPs(G)| Throughput |
|-|-|-|-|
| ViM-S |Ours| 3.60 | 1.27×|
| ViM-S |DynamicViT| 3.56 | 1.30×|
| PlainMamba-L3 |Ours|8.44|  1.43×|
| PlainMamba-L3 |DynamicViT| 8.37 | 1.46×|

As shown, there is minimal difference in acceleration under the same pruning ratio when compared to methods like DynamicViT on SSMs. However, our method provides **much higher** accuracy compared to ViT methods. For example, recent works such as ToMe [1] and LTMP [2], which we discussed in our response to **Reviewer TrFe**, highlight that our method achieves **significant performance improvements** over token pruning methods in ViT. The results are as follows:

|Methods | FLOPs(G) |  Top-1 Acc. (%)|
|------------|-----|-----|
| ViM-T  |1.50| 76.1 |
| ViM-T-ToMe |	1.28|71.6|
| ViM-T-LTMP |	1.29|72.2|
| ViM-T-EViT | 1.28|71.3|
| ViM-T-Ours | 1.29 |75.1|

---
**Q2. EViT is a token pruning baseline published in 2022. Recent methods like AViT [r1] and STViT [r2] can achieve no accuracy drop after pruning. The results presented in the paper are relatively weak.**

While different token pruning methods in ViT may prune tokens without reducing accuracy, they all face the **same challenges** when applied to SSMs. In SSM, the relationships between tokens are **different** from those in ViT. SSMs handle sequential data, where the dynamic characteristics and contextual dependencies of each token determine its importance. Simple pruning might disrupt the sequence's integrity or the transmission of crucial information, leading to **significant** performance **degradation**. We would like to highlight that our work is the first successful application of token pruning to SSMs, resulting in substantial performance improvements.

Due to the limited time (less than one day for applying AViT and STViT), we summarize the more recent work like ToMe [1] and LTMP [2] from our answer to **reviewer TrFe**. We will add these results into our revised version. We implemented ToMe[1] as well as LTMP [2] for our SSM-based models to provide a comprehensive comparison with state-of-the-art techniques. As demonstrated in the following table, our method can outperform all baselines with non-marginal improvements.

|Methods | FLOPs(G) |  Top-1 Acc. (%)|
|------------|-----|-----|
| ViM-T  |1.50| 76.1 |
| ViM-T-ToMe |	1.28|71.6|
| ViM-T-LTMP |	1.29|72.2|
| ViM-T-EViT | 1.28|71.3|
| ViM-T-Ours | 1.29 |75.1|

**Overall, we would like to emphases that regardless of the ViT token pruning method, if it does not address the specific characteristics of SSMs, it will not achieve the same level of effectiveness in SSMs. Therefore, it is unreasonable to compare the accuracy drop level on ViT with it on SSMs.**

[1] Token Merging: Your ViT But Faster, ICLR 2023

[2] Learned Thresholds Token Merging and Pruning for Vision Transformers, TMLR 2023
Thanks for the detailed feedback. It is good to see that the method can also lead to actual speed-up after pruning. However, my concerns are still not fully addressed:

- The actual speed-up of the proposed method seems less ideal than that of the ViT pruning method like DynamicViT. I am still concerned about the value of studying token pruning for SSM-based models. 

- EViT is a token pruning baseline published in 2022. Recent methods like AViT [r1] and STViT [r2] can achieve no accuracy drop after pruning. The results presented in the paper are relatively weak.

[r1] AdaViT: Adaptive Tokens for Efficient Vision Transformer, CVPR 2022.
[r2] Making Vision Transformers Efficient from A Token Sparsification View, CVPR 2023.

Overall, I would keep my original rating.
Dear Reviewer,

Thank you very much for acknowledging our observation and other contributions. Since the discussion will end very soon, we sincerely hope that you have found time to check our detailed response to your previous questions/comments. If you have any further questions, please feel free to let us know. We will try our best to reply to you before the discussion deadline.

Thank you very much,

Authors
Dear Reviewer,

Thank you very much for acknowledging our observation and other contributions. Since the discussion will end very soon, we sincerely hope that you have found time to check our detailed response to your previous questions/comments. If you have any further questions, please feel free to let us know. We will try our best to reply to you before the discussion deadline.

Thank you very much,

Authors
Dear Reviewer,

Thank you very much for spending time reviewing our paper and acknowledging our contributions. Since the discussion will end very soon, we sincerely hope that you have found time to check our detailed response to your previous questions/comments. If you have any further questions, please feel free to let us know. We will try our best to reply to you before the discussion deadline.

Thank you very much,

Authors
Dear Reviewer,

Thank you for your prompt response and thoughtful consideration of our rebuttal. We appreciate your acknowledgment of our efforts to provide extensive results and explanations to address your concerns. We sincerely thank you for the constructive comments and positive rating. We will add the constructive suggestions in the final version of our paper.

Thanks again for your time!

Warm regards,

Authors
I appreciate the author's response. While most of my concerns have been resolved, I'll keep my current rating for now and continue to pay attention to other reviews and ongoing discussions.
We sincerely thank the reviewer for recognizing that most concerns have been addressed and for leaning to accepting this manuscript. Given the enhancements made, we hope that our work now meets the criteria for a higher rating.

We are truly grateful for your efforts in helping us refine our paper, and we look forward to your final assessment.
Thanks for the authors' effort and rebuttal. Most of my concerns have been addressed. I'm leaning to accepting this manuscript.