State Space Prompting via Gathering and Spreading Spatio-Temporal Information for Video Understanding

Jiahuan Zhou, Kai Zhu, Zhenyu Cui, Zichen Liu, Xu Zou, Gang Hua

TL;DR

The authors introduce State Space Prompting (SSP), a parameter-efficient fine-tuning (PEFT) method designed specifically for Mamba-based video models like VideoMamba. By introducing complementary modules that gather local spatial information and spread global temporal context, SSP overcomes the "information decay" problem inherent to sequential state space models while tuning only ~3% of the model's parameters.

What Problem Does This Paper Address?

While Vision Transformers (ViTs) excel at video understanding, their self-attention mechanism incurs a quadratic computational cost ($O(N^2)$) relative to sequence length. This makes processing long videos incredibly expensive. Recently, State Space Models (SSMs) like VideoMamba have emerged as a linear-complexity ($O(N)$) alternative.

However, adapting these massive pre-trained Mamba models to downstream tasks remains a challenge. Full fine-tuning is computationally heavy, and existing Parameter-Efficient Fine-Tuning (PEFT) methods—like visual prompt tuning—were originally designed for ViTs. When you directly apply ViT-style prompting (appending learnable tokens to the input) to a Mamba architecture, it fails. Because Mamba compresses tokens sequentially, the prompt tokens suffer from severe information decay over long sequences, failing to capture crucial spatiotemporal context.

Figure 1: Existing video prompting methods on Mamba and its visualization results of updating date compared to our SSP. Existing methods directly concatenate learnable prompts to video tokens, resulting in the information decay problem after the long-term state space compression. However, our SSP achieves information enhancement through spatial gathering and temporal spreading.

Methods

To bridge this gap, the authors propose State Space Prompting (SSP), which consists of two main components that interact dynamically:

  1. Intra-Frame Gathering (IFG) Module: This module uses a low-rank local 2D convolution to aggregate spatial information within each individual video frame. It produces intra-frame prompts ($p^s_i$), along with two gating mechanisms:
  2. Information Entropy Weights ($w_i$): Measures the certainty/significance of the information in a frame to adjust its temporal attention.
  3. Spatial Variance ($v_i$): Controls how strongly global context influences local features.
  4. Inter-Frame Spreading (IFS) Module: This module operates after the first Mamba layer. It samples the final token of each frame (which naturally aggregates that frame's sequential context) and passes it through a low-rank attention mechanism. This allows key temporal information to be explicitly spread across frames, bypassing Mamba's strict sequential bottleneck.
Figure 2: The pipeline of our SSP. We embed videos into image tokens with spatial prompts. After the initial Mamba layer, our complementary IFG and IFS modules operate - IFG aggregates spatial information while IFS spreads temporal information. Information entropy and frame-specific spatial variance bridge these modules. The prompted tokens and CLS token then pass through subsequent Mamba layers for video classification.

During training, the pre-trained VideoMamba backbone remains completely frozen. Only the classification head and the lightweight SSP modules are optimized.

Datasets

The method was evaluated on four standard video recognition benchmarks:

  • HMDB51: 6,849 video clips across 51 action categories.
  • UCF101: 13,320 clips across 101 realistic action categories.
  • Something-Something V2 (SSV2): A large-scale dataset (220,847 videos) focused on fine-grained human-object interactions.
  • Breakfast: A long-video dataset (1,989 clips, averaging over 2 minutes each) detailing cooking activities.

Key Insights and Ideas

  • Shortening the Information Path: Mathematically, without inter-frame prompts, the maximum information transmission path length in a Mamba sequence is $O(TN)$ (where $T$ is frames and $N$ is tokens per frame), leading to exponential decay. By inserting the IFS module's temporal prompts after each frame, the path length drops drastically to $O(N)$, facilitating much better global context retention.
  • Dynamic Gating via Entropy and Variance: Rather than treating all frames equally, SSP uses information entropy to dynamically emphasize frames with high informational certainty. Concurrently, frame-specific spatial variance acts as a gate to prevent global temporal blending from washing out distinct local features.
Figure 3: Visualization of our intra-frame prompts, which capture discriminative local features.

Key Results

SSP achieves state-of-the-art PEFT performance across all four benchmarks, outperforming existing methods by an average of 2.76% while tuning minimal parameters:

  • Something-Something V2 (SSV2): Reached 53.72% top-1 accuracy using VideoMamba-M, outperforming the closest prompt-based competitor (SVP) by 4.64%.
  • Breakfast Dataset: Achieved 93.23% accuracy, demonstrating strong capabilities in long-video understanding.
  • Efficiency: On VideoMamba-S, SSP requires only 0.98M tunable parameters compared to the 25.42M required for full fine-tuning, yet it beats full fine-tuning accuracy on HMDB51 (74.38% vs 67.58%).

Limitations and Future Work

The authors note that SSP introduces additional hyperparameters, specifically the number of IFS modules to insert and their internal low-rank dimensions. While they provide robust defaults (e.g., setting the number of IFS modules to 3 for VideoMamba-M and 1 for VideoMamba-S), performance can fluctuate if these are not properly tuned to the scale of the backbone architecture.

Future work could explore automating the placement and dimensionality of these spatiotemporal prompts across different state-space backbones.

Summary updated

Abstract

Recently, pre-trained state space models have shown great potential for video classification, which sequentially compresses visual tokens in videos with linear complexity, thereby improving the processing efficiency of video data while maintaining high performance. To apply powerful pre-trained models to downstream tasks, prompt learning is proposed to achieve efficient downstream task adaptation with only a small number of fine-tuned parameters. However, the sequentially compressed visual prompt tokens fail to capture the spatial and temporal contextual information in the video, thus limiting the effective propagation of spatial information within a video frame and temporal information between frames in the state compression model and the extraction of discriminative information. To tackle the above issue, we proposed a State Space Prompting (SSP) method for video understanding, which combines intra-frame and inter-frame prompts to aggregate and propagate key spatiotemporal information in the video. Specifically, an Intra-Frame Gathering (IFG) module is designed to aggregate spatial key information within each frame. Besides, an Inter-Frame Spreading (IFS) module is designed to spread discriminative spatio-temporal information across different frames. By adaptively balancing and compressing key spatio-temporal information within and between frames, our SSP effectively propagates discriminative information in videos in a complementary manner. Extensive experiments on four video benchmark datasets verify that our SSP significantly outperforms existing SOTA methods by 2.76% on average while reducing the overhead of fine-tuning parameters.
BibTeX
@inproceedings{zhou2025state,
  author = {Jiahuan Zhou and Kai Zhu and Zhenyu Cui and Zichen Liu and Xu Zou and Gang Hua},
  title = {{State Space Prompting via Gathering and Spreading Spatio-Temporal Information for Video Understanding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=Sk1WgkHdht},
}
Figure