Vision Mamba Uses Bidirectional State-Space Modeling to Process Images Efficiently

A new vision model, Vision Mamba (ViM), uses bidirectional state-space modeling to process images efficiently.

Researchers have introduced Vision Mamba (ViM), a general-purpose vision backbone that replaces the multi-head attention blocks of a Vision Transformer with Mamba blocks. ViM models come in three sizes: tiny, small, and base. All versions use 24 stacked ViM encoder blocks followed by a fully connected MLP layer. A key challenge in applying state-space models (SSMs) to vision is that images are two-dimensional and non-causal, while SSMs like Mamba were designed for one-dimensional, causal sequences like text. A standard, unidirectional SSM would create a “spatial blind spot,” processing an image token by token from top-left to bottom-right and missing context from half the image. To solve this, ViM employs a bidirectional approach. The flattened sequence of image tokens is processed by two independent Mamba SSM blocks simultaneously: one moving forward and one moving backward. The forward hidden state accumulates context from preceding tokens, while the backward hidden state accumulates context from tokens that come after. These perspectives are then aggregated to give each token a complete understanding of the image.

The core innovation in the underlying Mamba model is selective recurrence, which introduces data-dependent parameterization. This allows the model to perform context-aware feature routing, dynamically adjusting how information is filtered across the sequence. This is achieved by treating parameters like B, C, and the discretization step Δ as dynamic functions of the input, rather than static values. A comparative study from a GitHub project corroborated these findings, evaluating ViM against CNN and Transformer-based models on diverse tasks. While CNN models consistently achieved higher accuracy, ViM models consumed significantly less VRAM.

The ViM Tiny model, with 7.06 million parameters, matched the accuracy of the 12× larger DeiT Base model (85.80 million parameters) in the wildfire detection task. The GitHub project also highlighted the effectiveness of knowledge distillation on the ViM Tiny model.

Applying this technique boosted its accuracy from 70.6% to 85.32% in the same wildfire detection task, closely matching the best-performing EfficientNet-B7 model, which has 66 million parameters. The study was conducted using the FLAME Dataset for wildfire detection, a Skin Cancer dataset, and the PlantVillage Dataset for plant disease identification.

Photo of author

Newsroom

Newsroom at Archyde.

Dietitian Explains Sweetener Choice Matters Less Than Total Amount Consumed

KOI TV YouTuber Hong Seok-ho Denies Abuse and Infidelity Allegations From Ex-Girlfriend Sky