Abstract
Multiscale Vision Transformers (MViT) introduce a hierarchical architecture to Transformer models, mirroring the multiscale approach of traditional Convolutional Neural Networks (CNNs). By progressively reducing spatial resolution while increasing channel capacity, MViT achieves superior efficiency and accuracy in video and image recognition tasks. Unlike standard Vision Transformers, MViT learns effectively from scratch, eliminating the need for massive external pre-training datasets like ImageNet-21K while setting new benchmarks for performance and computational cost.
Introduction
When Transformers were first adapted for computer vision, models like the original Vision Transformer (ViT) treated images and videos as flat sequences of patches. These standard architectures maintain a constant spatial resolution and channel dimension throughout the entire network. However, visual data is inherently hierarchical; early processing should focus on high-resolution, simple features, while deeper layers should handle low-resolution, complex semantics.
Standard ViTs are computationally bloated because they ignore this hierarchy, particularly when processing dense space-time video data. To address this, MViT bakes a multiscale hierarchy directly into the Transformer architecture, allowing it to process visual information more naturally and efficiently.
Methods: The Multiscale Architecture
The core innovation of MViT is the division of the network into Scale Stages. Instead of a uniform block of layers, the model starts by projecting input into a high-resolution sequence with a small channel dimension. At each stage transition, the sequence length is reduced (downsampled) while the channel dimension is expanded.
Multi Head Pooling Attention (MHPA)
This downsampling is achieved through a novel Multi Head Pooling Attention (MHPA) mechanism. MHPA replaces standard self-attention by applying pooling operators (such as max-pooling or convolutional pooling) to the Query (Q), Key (K), and Value (V) tensors:
- Query (Q) Pooling: Reduces the length of the output sequence, effectively shrinking the spatio-temporal resolution at stage transitions.
- Key-Value (K, V) Pooling: Shrinks internal attention matrices. While this does not change the output resolution, it drastically reduces the computational and memory requirements of the attention calculation.
Because sequence lengths and channel dimensions change between stages, MViT employs adapted skip connections using normalized linear layers to match dimensions across the residual paths.
Key Insights and Results
Experimental results demonstrate that MViT's multiscale design provides a significant inductive bias that standard Transformers lack. In diagnostic tests where video frames were shuffled, MViT's accuracy plummeted (-7.1%) compared to a standard ViT (-0.1%), proving that MViT actually learns complex space-time motion rather than acting as a simple "bag-of-frames" model.
Efficiency and Performance
MViT achieves state-of-the-art (SOTA) efficiency across multiple benchmarks:
- Kinetics-400 (Video): MViT-B achieves 78.4% top-1 accuracy when trained from scratch. Compared to a standard ViT-B baseline, MViT provides a +9.9% accuracy boost while using 2.6x fewer FLOPs and 2.4x fewer parameters.
- Comparison to Large Models: MViT matches the accuracy of massive models like ViViT-L while requiring approximately 6.8x fewer FLOPs and 8.5x fewer parameters, all without the need for ImageNet-21K pre-training.
Conclusion
Multiscale Vision Transformers represent a fundamental shift in how Transformers process visual data. By incorporating architectural priors like multiscale hierarchies, MViT democratizes video transformer research, allowing high-performance models to be trained without massive external datasets. This architecture serves as a powerful baseline for future research in dense visual recognition tasks, including object detection and segmentation.
Summary updated