Fast Vision Mamba: Pooling Spatial Dimensions for Accelerated Processing

Saarthak Kapse, Robin Betz, Srinivasan Sivanandan

TL;DR

This paper introduces Fast Vision Mamba (FastVim), a novel architecture that significantly accelerates Vision Mamba models by reducing the number of recurrent steps in its State Space Model (SSM) blocks. By employing a parameter-free average pooling strategy across spatial dimensions, FastVim achieves up to a 72.5% speedup in inference for high-resolution images without compromising performance, making efficient vision models even more practical.

What Problem Does This Paper Address?

State Space Models (SSMs), particularly Mamba, have emerged as efficient alternatives to Transformers for vision tasks, offering linear complexity in token interactions. However, while Mamba uses a parallel scan algorithm to reduce sequential steps, the quadratic scaling of tokens with image resolution in vision tasks still leads to a quadratic increase in parallel steps. This quadratic bottleneck hinders the throughput of Mamba-based models, especially for high-resolution images, limiting their practical application in scenarios demanding high speed. The paper aims to break this quadratic dependency and further accelerate Mamba's processing for vision.

Methods

The core innovation of FastVim is the introduction of a parameter-free average pooling strategy applied to the token grid before the SSM block. This pooling operation reduces the number of tokens processed by the SSM, effectively decreasing the number of recurrent steps. To maintain spatial information and ensure comprehensive interactions, FastVim alternates the pooling dimension (across rows or columns) in successive Mamba blocks. This alternation ensures that tokens implicitly interact across multiple blocks. After the SSM processing, the pooled tokens are repeated to restore the original token grid before being passed to the next layer. The authors also introduce adaptations: FastMaskVim for irregular grids (e.g., masked images) and FastChannelVim for per-channel tokenization tasks.

Datasets

The paper evaluates FastVim on several standard vision benchmarks:

  • ImageNet-1k: Used for image classification, including training from scratch and MAE pretraining.
  • ADE20K: Used for semantic segmentation.
  • MS COCO 2017: Used for object detection and instance segmentation.
  • JUMP-CP: A microscopy cell imaging dataset used for perturbed gene prediction, highlighting the utility of FastChannelVim.

Key Insights and Ideas

  • Pooling as a Bottleneck Breaker: The simple yet effective idea of pooling tokens spatially before the SSM scan dramatically reduces the computational load, directly addressing the quadratic scaling issue with resolution.
  • Alternating Pooling is Crucial: Empirically, alternating the pooling dimension (row-wise vs. column-wise) across blocks is shown to be essential for maintaining performance, preventing information loss and ensuring broad token interaction.
  • Parameter-Free Efficiency: The pooling mechanism is parameter-free, meaning it doesn't add trainable weights, contributing to efficiency without compromising model capacity.
  • Generalizability: FastVim's core idea can be readily adapted to other Mamba variants and tasks, as demonstrated by FastMaskVim and FastChannelVim.

Key Results

  • Speedup: FastVim achieves up to 72.5% overall throughput speedup on a H100 GPU for high-resolution images (2048x2048) compared to the baseline Vision Mamba (Vim). On an RTX 8000 GPU, speedups of up to 117% are observed.
  • Performance: FastVim models perform on-par with baseline Vim models across various sizes and tasks, including image classification, semantic segmentation, object detection, and cell perturbation prediction.
  • MAE Pretraining: FastMaskVim, pretrained with MAE, sets a new state-of-the-art of 86.7% on ImageNet-1k for Mamba-based encoders.
  • Microscopy Imaging: FastChannelVim shows significant gains in accuracy over ChannelViT baselines on microscopy image classification, demonstrating its benefit for long token sequences.

Limitations and Future Work

  • Skip Connection Placement: The paper highlights the importance of the skip connection's placement (after pooling and before repeating) for preserving finer spatial details. Moving it elsewhere led to a performance drop.
  • Generalization to Other Mamba Variants: While FastVim is shown to work well with VMamba, further exploration of its application to other Mamba-based architectures is suggested.
  • Future Directions: The authors suggest exploring FastVim in gigapixel imaging, video domain tasks (aligning with FastChannelVim), and investigating its potential to complement other Mamba advancements like pruning and merging methods. They also mention exploring other pooling variants (max, attention) and input/output normalization strategies.

Summary updated

BibTeX
@inproceedings{kapse2026fast,
  author = {Saarthak Kapse and Robin Betz and Srinivasan Sivanandan},
  title = {{Fast Vision Mamba: Pooling Spatial Dimensions for Accelerated Processing}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2026},
}
Figure