Introduction
While Vision-Language Models (VLMs) like CLIP have set new benchmarks in image understanding, their adaptation to video action recognition remains a significant challenge. The primary hurdle is effective temporal modeling—capturing the intricate relationships between frames without incurring prohibitive computational costs.
Existing methods often fall into two categories: local modeling, which misses long-range global context, or joint space-time attention. The latter often suffers from the "extrapolation pitfall," where naively extending CLIP’s sequence length to include all patches from all frames leads to performance degradation. Because CLIP was pre-trained on short image-text pairs, it struggles to maintain attention quality when processing the massive, redundant token sequences typical of video data. This paper introduces TC-CLIP (Temporally Contextualized CLIP), a framework designed to provide holistic video information while remaining within the effective sequence length CLIP can handle.
Methodology
TC-CLIP introduces two primary modules to bridge the temporal gap: Temporal Contextualization (TC) and Video-conditional Prompting (VP).
Temporal Contextualization (TC)
The TC module summarizes global temporal cues into a small set of "context tokens." This process involves three steps:
- Informative Token Selection: The model identifies "seed tokens"—the most salient patches in each frame based on their attention scores with the [CLS] token.
- Context Summarization: These seed tokens are aggregated across the entire video using bipartite soft matching to create a compact set of context tokens.
- Context Infusion: These tokens are injected as additional Key-Value pairs in the vision encoder's self-attention layers, allowing every patch in every frame to interact with the global video context.
Video-conditional Prompting (VP)
To move beyond static text prompts, the VP module makes prompts dynamic. It employs a cross-attention mechanism where learnable text prompts act as queries to "read" information from the visual context tokens. This injects instance-specific video details into the text embeddings, helping the model distinguish between semantically similar actions.
Experimental Results
TC-CLIP was evaluated on major benchmarks including Kinetics-400/600, HMDB-51, UCF-101, and the motion-heavy Something-Something v2 (SSv2).
- Zero-Shot Performance: On Kinetics-600, TC-CLIP achieved 72.7% Top-1 accuracy, outperforming previous state-of-the-art models like ViFi-CLIP by 2.0%.
- Few-Shot Gains: In 16-shot experiments on SSv2, TC-CLIP reached 14.0%, a significant improvement over the 12.4% baseline, demonstrating its effectiveness in tasks where temporal order is critical.
- Efficiency: A lightweight version (TC-CLIP§) maintains high accuracy while offering 17.2% higher throughput than competitors like Open-VCLIP.
Discussion and Insights
The core insight of TC-CLIP is that "less is more" when adapting VLMs to video. By summarizing a video into a few pivotal tokens rather than feeding the model raw, redundant data, the framework avoids the extrapolation challenge. Qualitative visualizations confirm that the context tokens successfully track key objects across frames, even during significant motion.
While highly effective for standard clips, future work may explore TC-CLIP's performance on long-form videos where context tokens might become saturated. Additionally, integrating advanced LLM-based category rephrasing could further enhance the alignment between visual context and linguistic semantics.
Summary updated