Reproduce “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, Baining Guo

Swin Transformer adapts image backbones by combining fixed-size local attention with progressively merged patches, creating hierarchical feature maps for multiple scales. Alternating window partitions lets neighboring regions communicate while fixed windows keep attention complexity linear in image size. In a Swin-T ablation, shifting raised COCO box AP from 47.7 to 50.5 and improved other metrics, without proving universal performance.

Key insights

  • The shifted window mechanism is crucial for performance, enabling cross-window connections while maintaining linear computational complexity relative to image size.
  • Learnable relative position bias significantly improves model performance across various tasks (e.g., +1.2% top-1 accuracy on ImageNet-1K), proving superior to absolute position embeddings.
  • The hierarchical design and shifted window approach are generalizable, demonstrating improved performance even when applied to all-MLP architectures like MLP-Mixer.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.