Fast Vision Mamba: Pooling Spatial Dimensions for Accelerated Processing

Saarthak Kapse, Robin Betz, Srinivasan Sivanandan
2/1/2025
cs.CVcs.AI

Official code: insitro/FastVim (19 stars, last commit 2025-01-28).

Abstract

State Space Models (SSMs) with selective scan (Mamba) have been adapted into efficient vision models. Mamba, unlike Vision Transformers, achieves linear complexity for token interactions through a recurrent hidden state process. This sequential processing is enhanced by a parallel scan algorithm, which reduces the computational time of recurrent steps from $L$ sequential steps to $log(L)$ parallel steps with respect to the number of input tokens ($L$). In this work, we propose Fast Vision Mamba (FastVim), that further reduces the computational time of the SSM block by reducing the number of recurrent steps in Vision Mamba models while still retaining model performance. By alternately pooling tokens along image dimensions across Mamba blocks, we obtain a 2$\times$ reduction in the number of parallel steps in SSM block. Our model offers up to $72.5\%$ speedup in inference speed compared to baseline Vision Mamba models on high resolution (2048$\times$2048) images. Our experiments demonstrate state-of-the-art performance with dramatically improved throughput in a range of tasks such as image classification, cell perturbation prediction, segmentation, and object detection. Code is made available at https://github.com/insitro/FastVim

View on arXivView PDF

Code Implementations(1)

insitro/FastVimOfficial100%

Fast Vision Mamba : Pool your Spatial Dimensions for Accelerated Processing

191C, C++Jan 28, 20251 years agoNOASSERTION

Similar Papers

Cite this paper

@article{kapse2025fast,
  title  = {Fast Vision Mamba: Pooling Spatial Dimensions for Accelerated Processing},
  author = {Saarthak Kapse and Robin Betz and Srinivasan Sivanandan},
  year   = {2025},
  eprint = {2502.00594},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.00594v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.00594.svg)](https://codeofpaper.com/paper/2502.00594)

Discussion