Reproduce “Slide-Transformer: Hierarchical Vision Transformer with Local Self-Attention” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

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

About this paper

Xuran Pan, Tianzhu Ye, Zhuofan Xia, Shiji Song, Gao Huang

Researchers from Tsinghua University developed Slide-Transformer, which addresses the quadratic computational complexity of Vision Transformers for high-resolution images by introducing Slide Attention. This novel local attention mechanism re-interprets Im2Col as feature shifts, efficiently implemented via depthwise convolutions, and includes a deformed shifting component for flexible receptive fields. The approach yields improved performance and efficiency across image classification, object detection, and semantic segmentation, showing faster inference on various hardware platforms, including mobile devices.

Key insights

  • Local attention can be efficiently implemented by re-interpreting the Im2Col operation as feature shifts and leveraging highly optimized depthwise convolutions.
  • A deformable shifting mechanism can introduce flexible receptive fields, allowing for adaptive feature selection beyond fixed patterns, without incurring additional inference costs through re-parameterization.
  • Integrating an efficient, hardware-agnostic local attention module, particularly in early network stages with small window sizes, can significantly improve Vision Transformer performance and deployment flexibility across diverse hardware.

Summary by alphaXiv.

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