Abstract
Pre-trained on tremendous image-text pairs, vision-language models like CLIP have demonstrated promising zero-shot generalization across numerous image-based tasks. However, extending these capabilities to video tasks remains challenging due to limited labeled video data and high training costs. Recent video prompting methods attempt to adapt CLIP for video tasks by introducing learnable prompts, but they typically rely on a single static prompt for all video sequences, overlooking the diverse temporal dynamics and spatial variations that exist across frames. This limitation significantly hinders the model's ability to capture essential temporal information for effective video understanding. To address this, we propose an integrated Spatial-TempOral dynamic Prompting (STOP) model which consists of two complementary modules, the intra-frame spatial prompting and inter-frame temporal prompting. Our intra-frame spatial prompts are designed to adaptively highlight discriminative regions within each frame by leveraging intra-frame attention and temporal variation, allowing the model to focus on areas with substantial temporal dynamics and capture fine-grained spatial details. Additionally, to highlight the varying importance of frames for video understanding, we further introduce inter-frame temporal prompts, dynamically inserting prompts between frames with high temporal variance as measured by frame similarity. This enables the model to prioritize key frames and enhances its capacity to understand temporal dependencies across sequences. Extensive experiments on various video benchmarks demonstrate that STOP consistently achieves superior performance against state-of-the-art methods.
Introduction
Vision-language models (VLMs) such as CLIP have revolutionized image-based tasks through robust zero-shot generalization. However, their application to video understanding is often hindered by the high computational cost of full fine-tuning and the scarcity of large-scale labeled video datasets. While "prompting"—adding a small set of learnable tokens to the input—has emerged as a parameter-efficient alternative, existing methods typically utilize static prompts. These fixed tokens are applied uniformly across all frames, failing to account for the inherent spatial and temporal variations that define video content. To bridge this gap, we introduce STOP (Integrated Spatial-Temporal dynamic Prompting), a framework that replaces static prompts with dynamic, content-aware tokens.
The STOP Framework
STOP addresses the limitations of static prompting through two synergistic modules designed to capture "where" and "when" action occurs.
1. Intra-frame Spatial Prompting
Standard prompting methods treat all spatial regions equally. However, in video, the background is often static and irrelevant to the action. The Intra-frame Spatial Prompting module identifies discriminative regions—areas with high movement or semantic importance—using a lightweight 3D convolutional network and the model's internal attention maps. By generating prompts specifically for these regions, STOP forces the model to focus on the subject of the action (e.g., a person jumping) while ignoring static distractors (e.g., the gym floor).
2. Inter-frame Temporal Prompting
Not all frames in a sequence contribute equally to understanding an action. STOP calculates the temporal variance (degree of change) between adjacent frames. It then dynamically inserts a variable number of temporal prompts between frames that exhibit significant change. This "dynamic density" approach allows the model to allocate more representational capacity to high-action segments, effectively zooming in on critical temporal dependencies.
Experimental Evaluation
We evaluated STOP across seven major benchmarks covering two primary tasks:
- Action Recognition: HMDB51, UCF101, and the motion-heavy Something-Something V2 (SS-V2).
- Video-Text Retrieval: MSR-VTT, ActivityNet, DiDeMo, and VATEX.
Performance and Efficiency
STOP consistently outperformed state-of-the-art (SOTA) methods like VoP and DGL. On the challenging SS-V2 dataset, which requires deep temporal reasoning, STOP achieved 21.4% accuracy, a significant improvement over the previous SOTA of 18.3%. In video-text retrieval on MSR-VTT, STOP reached a Recall@1 of 47.7%, surpassing the MPT-Transformer while utilizing significantly fewer parameters.
Crucially, STOP maintains high parameter efficiency. It requires only 7.53 MB of trainable parameters, a fraction of the 123 MB required for a full CLIP4Clip fine-tune, making it a viable solution for resource-constrained environments.
Key Insights
- Synergy of Space and Time: Ablation studies indicate that spatial and temporal prompting are highly complementary. While spatial prompting alone improved HMDB51 accuracy by ~17%, the addition of temporal prompting provided an additional ~5% boost.
- Focus on Dynamics: By utilizing a 3D CNN to guide prompts, the model naturally learns to ignore distractor objects, focusing instead on the trajectory and movement of the primary subjects.
Conclusion and Future Work
STOP demonstrates that dynamic, content-aware prompting is essential for adapting image-based VLMs to the complexities of video. By adaptively highlighting discriminative spatial regions and prioritizing key temporal moments, STOP achieves SOTA performance with minimal trainable parameters. Future research will explore the scalability of STOP to long-form video sequences and investigate the sensitivity of the model to different prompt initialization strategies.
Summary updated