Skip to main content
QUICK REVIEW

[Paper Review] Video Swin Transformer

Ze Liu, Ning Jia|arXiv (Cornell University)|Jun 24, 2021
Human Pose and Action RecognitionComputer Science38 references46 citations
TL;DR

The paper introduces Video Swin Transformer, a pure-transformer backbone for video recognition that uses spatiotemporal locality via 3D shifted window attention, achieving state-of-the-art results on key video benchmarks while being more efficient and compatible with image pre-training.

ABSTRACT

The vision community is witnessing a modeling shift from CNNs to Transformers, where pure Transformer architectures have attained top accuracy on the major video recognition benchmarks. These video models are all built on Transformer layers that globally connect patches across the spatial and temporal dimensions. In this paper, we instead advocate an inductive bias of locality in video Transformers, which leads to a better speed-accuracy trade-off compared to previous approaches which compute self-attention globally even with spatial-temporal factorization. The locality of the proposed video architecture is realized by adapting the Swin Transformer designed for the image domain, while continuing to leverage the power of pre-trained image models. Our approach achieves state-of-the-art accuracy on a broad range of video recognition benchmarks, including on action recognition (84.9 top-1 accuracy on Kinetics-400 and 86.1 top-1 accuracy on Kinetics-600 with ~20x less pre-training data and ~3x smaller model size) and temporal modeling (69.6 top-1 accuracy on Something-Something v2). The code and models will be made publicly available at https://github.com/SwinTransformer/Video-Swin-Transformer.

Motivation & Objective

  • Motivate a locality-biased Transformer backbone for video to improve speed-accuracy trade-offs.
  • Leverage the Swin Transformer’s inductive biases (locality, hierarchy, translation invariance) in a spatiotemporal setting.
  • Show that locality-based video Transformers can outperform globally attentive models with less computation and data.
  • Demonstrate state-of-the-art performance on multiple video recognition benchmarks using pre-trained image models.

Proposed method

  • Adapts Swin Transformer to video by extending non-overlapping local attention from 2D to 3D windows.
  • Implements 3D shifted window based multi-head self-attention (3DW-MSA) to enable cross-window connections while preserving efficiency.
  • Incorporates 3D relative position bias to enhance attention within local 3D windows.
  • Maintains a hierarchical architecture with patch merging and without temporal downsampling, enabling multi-scale video representations.
  • Explores initialization strategies from ImageNet pre-trained models and analyzes backbone/head learning-rate ratios for better generalization.

Experimental results

Research questions

  • RQ1Can spatiotemporal locality via 3D shifted window attention approximate global self-attention efficiently in video transformers?
  • RQ2How does Video Swin Transformer perform on action recognition and temporal modeling benchmarks compared to state-of-the-art methods?
  • RQ3What initialization and optimization strategies best leverage pre-trained image models for video backbones?
  • RQ4What ablations reveal the impact of temporal dimension, window design, and learning-rate scheduling on performance?

Key findings

  • Achieves 84.9% top-1 on Kinetics-400 and 86.1% top-1 on Kinetics-600 with ~20x less pre-training data and ~3x smaller model size compared to ViViT-H.
  • Attains 69.6% top-1 on Something-Something v2, demonstrating strong temporal modeling.
  • Joint spatiotemporal locality (3D W-MSA) offers the best speed-accuracy trade-off among ablated designs (joint vs split vs factorized).
  • 3D shifted window strategy and relative position bias contribute to cross-window connections and improved performance.
  • Pre-training on ImageNet-21K plus cautious backbone learning-rate scaling improves generalization and efficiency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.