Abstract
The prolific performances of Vision Transformers (ViTs) in image tasks have prompted research into adapting image ViTs for video tasks. However, the substantial gap between image and video impedes the spatiotemporal learning of these image-pretrained models. Though video-specialized models like UniFormer can transfer to the video domain more seamlessly, their unique architectures require prolonged image pretraining, limiting scalability. Given the emergence of powerful open-source image ViTs, we propose unlocking their potential for video understanding with efficient UniFormer designs. We call the resulting model UniFormerV2, since it inherits the concise style of the UniFormer block while redesigning local and global relation aggregators that seamlessly integrate advantages from both ViTs and UniFormer. Our UniFormerV2 achieves state-of-the-art performances on 8 popular video benchmarks, including scene-related Kinetics-400/600/700, heterogeneous Moments in Time, temporal-related Something-Something V1/V2, and untrimmed ActivityNet and HACS. Notably, UniFormerV2 is the first to elicit 90% top-1 accuracy on Kinetics-400.
Introduction
Adapting powerful "foundation models" for images (such as CLIP or MAE) to video understanding presents significant challenges. Static image models are not inherently designed to capture the motion and temporal dependencies essential for video. Furthermore, previous specialized video models like the original UniFormer required massive, computationally expensive pretraining from scratch. UniFormerV2 addresses these issues by "arming" well-prepared image ViTs with efficient temporal modeling, bridging the spatiotemporal gap without the need for exhaustive video-specific pretraining.
Methods: The UniBlock Architecture
The core of UniFormerV2 is the "UniBlock" design, which can be seamlessly integrated into standard ViT architectures (e.g., ViT-B, ViT-L). This architecture consists of three primary components designed to capture both local and global dependencies efficiently.
Local UniBlock
To handle local temporal redundancy and fine-grained motion, a Local temporal Multi-Head Relation Aggregator (MHRA) is inserted before the standard spatial attention. It utilizes a learnable parameter matrix to model relations between tokens within a small "temporal tube," enabling the model to grasp immediate temporal changes.
Global UniBlock
Capturing long-range dependencies across an entire video often incurs high computational costs. UniFormerV2 replaces the $O(L^2)$ complexity of standard all-to-all attention with a query-based cross-attention mechanism. This redesign achieves $O(L)$ complexity by using a learnable query token to summarize information from all spatiotemporal tokens, allowing the model to scale to larger backbones like ViT-L.
Multi-Stage Fusion
UniFormerV2 integrates "video tokens" from multiple stages of the network rather than relying solely on the final layer. This multi-stage approach ensures the final classifier benefits from both low-level motion cues and high-level semantic concepts.
Experimental Results
The model was evaluated across eight diverse benchmarks, demonstrating its versatility and state-of-the-art performance:
- Scene-related: Kinetics-400, 600, and 700.
- Temporal-related: Something-Something (Sth-Sth) V1 and V2.
- Heterogeneous: Moments in Time (MiT).
- Untrimmed/Long-form: ActivityNet and HACS.
Notably, UniFormerV2 is the first model to achieve 90.0% top-1 accuracy on Kinetics-400. On the motion-heavy Something-Something V2 dataset, it reached 73.0%, outperforming models that required significantly more pretraining.
A key insight from ablation studies is the complementary nature of the blocks: Global blocks are vital for scene identification, while Local blocks are essential for understanding how actions are performed (temporal tasks). Furthermore, the efficiency of the linear-complexity global aggregator allows for scaling to large backbones that were previously computationally prohibitive.
Conclusion
UniFormerV2 demonstrates that video models do not need to be built from scratch. By leveraging "well-prepared" image backbones and introducing efficient temporal aggregators, it achieves superior performance with minimal fine-tuning. While current sparse sampling methods may face bottlenecks with extremely long-form video, the "plug-and-play" nature of UniFormerV2 provides a scalable and cost-effective path forward for video understanding as image foundation models continue to grow.
Summary updated