Graph
Swin Transformer

🪟Swin Transformer

NEW

A hierarchical vision transformer using shifted windows to efficiently model local and global context.

DESCRIPTION

Swin Transformer partitions images into non-overlapping windows and applies self-attention within them, then shifts window positions between layers to enable cross-window connections. Its hierarchical design produces multi-scale feature maps, making it a strong, general-purpose backbone for detection, segmentation, and classification. The approach reduces quadratic attention cost to near-linear with image size. Swin has achieved state-of-the-art results on COCO and ADE20K benchmarks. Official implementations and pretrained models are available from Microsoft Research.

ALTERNATIVE DEFINITIONS

arXiv

We present a hierarchical vision Transformer using shifted windows, which has the flexibility to serve as a general-purpose backbone.

Introduces shifted windows and general-purpose backbone framing.

Source

Microsoft Research

Swin Transformer is a hierarchical Transformer whose representation is computed with shifted windows.

Concise project description from the originating research group.

Source

Microsoft

Swin Transformer uses shifted windows to limit self-attention computation to non-overlapping local windows while allowing cross-window connections.

Implementation-focused description highlighting computation and connectivity.

Source

Wikipedia

A Vision Transformer applies a Transformer to sequences of image patches for image recognition tasks.

Provides general transformer-in-vision context for Swin.

Source

Transformer Model Shifted Window Hierarchical Transformer Self-Attention Patch Embedding DETR MLP-Mixer Convolutional Neural Network

COMPETING TERMS

Vision Transformer ResNet

KNOWLEDGE AREAS

AI Data Science

TARGET AUDIENCE

AI Engineer Data Scientist MLOps Engineer Software Developer

EXTERNAL SOURCES

TOP QUESTIONS

How do shifted windows work in Swin Transformer?

They shift window partitions between layers, enabling interactions across neighboring windows while keeping attention computations local and efficient.

Category: Technique

Why is Swin Transformer hierarchical?

It builds multi-scale feature maps similar to CNNs, benefiting detection and segmentation tasks that rely on spatial hierarchies.

Category: Architecture

How does Swin compare to standard Vision Transformers?

Swin scales better to high resolutions and dense tasks by limiting attention to windows and progressively downsampling.

Category: Comparison

What tasks benefit most from Swin Transformer?

Object detection, instance/semantic segmentation, and image classification benefit from Swin’s multi-scale, efficient attention design.

Category: Usage

What are common pitfalls when training Swin?

Insufficient data augmentation, suboptimal learning rate schedulers, and improper window sizes can hurt generalization.

Category: Mistakes

What backbones does Swin replace?

It often replaces ResNet in detection and segmentation frameworks due to stronger performance and flexibility.

Category: Alternatives

Is Swin efficient on edge devices?

Its locality helps, but model size may still be large; distilled or tiny variants can suit edge deployment.

Category: Limitations

How does Swin handle global context?

Shifted windows propagate information across windows over layers, approximating global connectivity without global attention.

Category: Concept

What pretrained weights are available for Swin?

Official models from Microsoft and community checkpoints cover classification, detection, and segmentation tasks.

Category: Resources