Abstract
Vision Mamba (Vim) has emerged as a competitive alternative to Vision Transformers, offering linear complexity. However, adapting these models to downstream tasks via standard parameter-efficient fine-tuning (PEFT) methods like Visual Prompting remains challenging. Existing prompting techniques, designed for the global attention of Transformers, fail to account for Mamba’s sequential, gate-driven architecture. This paper introduces Selective Visual Prompting (SVP), a novel method that generates input-dependent prompts to effectively activate Mamba’s internal selective gates. SVP utilizes a dual-path "Cross-Inner" structure to capture both high-level global information and localized features. Experimental results on HTA and VTAB-1K benchmarks demonstrate that SVP significantly outperforms existing prompting methods and even surpasses full fine-tuning in several scenarios.
Introduction
Vision Mamba (Vim) has emerged as a powerful, linear-complexity alternative to Vision Transformers (ViTs). However, as these models grow, "full fine-tuning" (updating every parameter) for new tasks becomes computationally prohibitive. Researchers usually turn to Visual Prompting, where a small set of learnable parameters (prompts) is added to the model while the rest of the backbone remains frozen.
The Challenge: Static Prompts in Gated Architectures
Existing prompting methods were built for ViTs, which use global attention. Vim, however, processes images as a sequence using "selective state space models" (SSMs) that rely on input-dependent gates to decide what information to keep or forget. Standard prompts—usually just static tokens tacked onto the start of a sequence—fail to trigger these gates effectively, causing the model to "forget" important visual details as it scans the image. In Mamba, the input is the controller. If the prompt does not change based on the input, it cannot effectively manipulate the selective gates that define Mamba's performance.
Selective Visual Prompting (SVP)
Selective Visual Prompting (SVP) moves away from static "prefix" prompts in favor of dynamic, input-aware ones. The architecture is built around two core components:
- Selective Prompters: Instead of fixed tokens, SVP uses lightweight generators to create prompts based on the actual input tokens. This ensures that the prompts are tailored to the specific image, which is necessary to "open" the Mamba gates for relevant features.
- Dual-Path Architecture (Cross-Inner):
- Cross-Prompting: Uses shared parameters across multiple layers to capture consistent, high-level information that needs to persist throughout the network.
- Inner-Prompting: Uses unique parameters for each layer to extract specific, localized features.
These generated prompts are superimposed directly onto the original image tokens ($x_i + \bar{p}_i$). Because Mamba’s internal parameters ($B, C, \Delta$) are derived from the input, these prompted tokens directly influence how the model updates its hidden state through dynamic scaling factors ($\alpha$ and $\beta$).
Experimental Evaluation
The authors evaluated SVP on two major benchmarks: HTA (Head Tuning Adaptation) and VTAB-1K. HTA includes 10 diverse datasets like CIFAR-10/100 and CUB-200, while VTAB-1K consists of 19 tasks categorized into Natural, Specialized, and Structured tasks.
Key Results
- Benchmark Performance: SVP achieved an average accuracy of 89.8% on HTA, outperforming the previous best prompting method (DAM-VP) by 4.1% and standard VPT by 5.3%. On VTAB-1K, SVP showed massive gains in the "Structured" category, beating VPT by 13.8%.
- Efficiency vs. Full Fine-Tuning: Remarkably, SVP outperformed full fine-tuning on 7 out of 10 HTA datasets. This suggests that freezing the backbone prevents "catastrophic forgetting" of pre-trained features while the selective prompts provide the necessary task-specific adaptation.
- Visualization: Heatmaps of the Mamba update gates show that with SVP, the model focuses much more sharply on the actual objects (like flowers or birds) compared to baseline methods, which often have "noisy" or deactivated gates.
Conclusion
SVP achieves state-of-the-art results while keeping the backbone frozen, proving that specialized PEFT for non-Transformer architectures is a necessary and fruitful research direction. Unlike Transformers where every token can "see" every other token via attention, Mamba is sequential; SVP ensures that discriminative information isn't lost during the "scan" by keeping the update gates active for important objects. Future work will explore extending this to dense prediction tasks like object detection and semantic segmentation.
Summary updated