MViTv2: Improved Multiscale Vision Transformers for Classification and Detection

Yanghao Li, Chao-Yuan Wu, Haoqi Fan, Karttikeya Mangalam, Bo Xiong, Jitendra Malik, Christoph Feichtenhofer

Introduction

Vision Transformers (ViT) have fundamentally changed the landscape of image classification. However, adapting these models for high-resolution tasks like object detection or long-form video recognition remains challenging due to the quadratic complexity of self-attention. As the number of tokens (pixels or patches) increases, memory and compute requirements grow exponentially.

MViTv2 addresses these hurdles by evolving the Multiscale Vision Transformer into a unified, high-performance backbone. It demonstrates that a single architecture can dominate image, video, and detection tasks simultaneously by optimizing how information flows through the network.

MViT serves as a unified architecture for image classification, object detection, and video recognition.

Technical Innovations

The researchers introduced two primary technical upgrades to the MViT architecture to improve spatial awareness and training stability:

Decomposed Relative Positional Embeddings

Standard ViTs often use absolute positional embeddings, which label patches by their fixed index. In computer vision, however, the relative distance between objects is often more informative. MViTv2 employs decomposed relative positional embeddings, breaking down the relative distance into separate coordinate axes for Height ($H$), Width ($W$), and Time ($T$). This reduces the lookup table complexity from $O(HWT)$ to $O(H+W+T)$, making the model both computationally efficient and spatially shift-invariant.

Residual Pooling Connection

To save compute, MViT "pools" (downsamples) the Query ($Q$) tensor. However, this can lead to the loss of fine-grained information. MViTv2 introduces a residual pooling connection that adds the pooled Query back to the output of the attention block. This skip connection stabilizes training and allows the model to utilize larger pooling strides without a significant drop in accuracy.

The MViTv2 pooling attention mechanism featuring residual pooling connections.

Hybrid Window Attention (Hwin)

For high-resolution tasks like object detection, the authors implemented Hybrid Window Attention. This approach uses local window attention in the early, high-resolution stages of the network and global pooling attention in the later stages, providing an optimal trade-off between speed and global context.

Performance and Efficiency

MViTv2 was rigorously evaluated across standard benchmarks, including ImageNet-1K, MS COCO, and Kinetics-400. The results establish MViTv2 as a state-of-the-art (SOTA) backbone:

  • ImageNet-1K: Achieved 88.8% top-1 accuracy with ImageNet-21K pre-training.
  • Object Detection: Reached 58.7 $AP^{box}$ on COCO, outperforming comparable Swin-L models.
  • Video Recognition: Set a new SOTA on Kinetics-400 with 86.1% accuracy.

A key insight from the study is that "pooling attention" (maintaining a global but coarse view) often outperforms the "window attention" (maintaining a local but fine view) used in models like Swin. For instance, MViTv2-S achieves 83.6% accuracy on ImageNet with only 7.0 GFLOPs, whereas the comparable Swin-S requires 8.7 GFLOPs for 83.0% accuracy.

Conclusion

MViTv2 successfully unifies image and video modeling within a single multiscale framework. By introducing decomposed relative positions and residual pooling, the architecture achieves superior efficiency and performance across diverse vision tasks. Future work may explore scaling the architecture down for mobile devices or further up for massive-scale datasets.

Summary updated

BibTeX
@inproceedings{li2022mvitv,
  author = {Yanghao Li and Chao-Yuan Wu and Haoqi Fan and Karttikeya Mangalam and Bo Xiong and Jitendra Malik and Christoph Feichtenhofer},
  title = {{MViTv2: Improved Multiscale Vision Transformers for Classification and Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.00476},
}
Figure