LookHere: Vision Transformers with Directed Attention Generalize and Extrapolate
Anthony Fuller, Daniel G. Kyrollos, Yousef Yassin, James R. Green
Abstract
High-resolution images offer more information about scenes that can improve model accuracy. However, the dominant model architecture in computer vision, the vision transformer (ViT), cannot effectively leverage larger images without finetuning -- ViTs poorly extrapolate to more patches at test time, although transformers offer sequence length flexibility. We attribute this shortcoming to the current patch position encoding methods, which create a distribution shift when extrapolating. We propose a drop-in replacement for the position encoding of plain ViTs that restricts attention heads to fixed fields of view, pointed in different directions, using 2D attention masks. Our novel method, called LookHere, provides translation-equivariance, ensures attention head diversity, and limits the distribution shift that attention heads face when extrapolating. We demonstrate that LookHere improves performance on classification (avg. 1.6%), against adversarial attack (avg. 5.4%), and decreases calibration error (avg. 1.5%) -- on ImageNet without extrapolation. With extrapolation, LookHere outperforms the current SoTA position encoding method, 2D-RoPE, by 21.7% on ImageNet when trained at px and tested at px. Additionally, we release a high-resolution test set to improve the evaluation of high-resolution image classifiers, called ImageNet-HR.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Find your Needle: Small Object Image Retrieval via Multi-Object Attention Optimization cites Learning Transferable Visual Models From Natural Language Supervision
- LookWhere? Efficient Visual Recognition by Learning Where to Look and What to See from Self-Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Efficiency Follows Global-Local Decoupling cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Efficiency Follows Global-Local Decoupling cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Efficiency Follows Global-Local Decoupling cites Training data-efficient image transformers & distillation through attention
- Visual Instruction Tuning cites Learning Transferable Visual Models From Natural Language Supervision
- Thicker and Quicker: The Jumbo Token for Fast Plain Vision Transformers cites LookWhere? Efficient Visual Recognition by Learning Where to Look and What to See from Self-Supervision
- Thicker and Quicker: The Jumbo Token for Fast Plain Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Thicker and Quicker: The Jumbo Token for Fast Plain Vision Transformers cites Learning Transferable Visual Models From Natural Language Supervision
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Learning Transferable Visual Models From Natural Language Supervision
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Training data-efficient image transformers & distillation through attention
- Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- LEDiT: Your Length-Extrapolatable Diffusion Transformer without Positional Encoding cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- LEDiT: Your Length-Extrapolatable Diffusion Transformer without Positional Encoding cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- LEDiT: Your Length-Extrapolatable Diffusion Transformer without Positional Encoding cites Learning Transferable Visual Models From Natural Language Supervision
Cited by top-tier papers5
- LookWhere? Efficient Visual Recognition by Learning Where to Look and What to See from Self-SupervisionAnthony Fuller, Yousef Yassin, Junfeng Wen, Tarek Ibrahim et al.NeurIPS 2025 · 7 citations
- Thicker and Quicker: The Jumbo Token for Fast Plain Vision TransformersAnthony Fuller, Yousef Yassin, Daniel G. Kyrollos, Evan Shelhamer et al.ICLR 2026 · 5 citations
- LEDiT: Your Length-Extrapolatable Diffusion Transformer without Positional EncodingShen Zhang, Siyuan Liang, Yaning Tan, Zhaowei Chen et al.NeurIPS 2025 · 4 citations
- Efficiency Follows Global-Local DecouplingZhenyu Yang, Gensheng Pei, Tao Chen, Yichao Zhou et al.CVPR 2026 · 3 citations
- Find your Needle: Small Object Image Retrieval via Multi-Object Attention OptimizationMichael Green, Matan Levy, Issar Tzachor, Dvir Samuel et al.NeurIPS 2025 · 1 citation
Builds on48
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Visual Instruction TuningHaotian Liu, Chunyuan Li, Qingyang Wu, Yong Jae LeeNeurIPS 2023 · 11,349 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
Related papers
- Scale-space Tokenization for Improving the Robustness of Vision TransformersLei Xu, Rei Kawakami, Nakamasa InoueACM MM 2023 · 1 citation
- Compass-RoPE: Isotropic Rotary Position Embeddings for Vision TransformersChengxi Min, Wei Wang, Yao ZhaoICML 2026
- Discrete Representations Strengthen Vision Transformer RobustnessChengzhi Mao, Lu Jiang, Mostafa Dehghani, Carl Vondrick et al.ICLR 2022 · 47 citations
- CvT: Introducing Convolutions to Vision TransformersHaiping Wu, Bin Xiao, Noel Codella, Mengchen Liu et al.ICCV 2021 · 2,397 citations
- Towards Robust Vision TransformerXiaofeng Mao, Gege Qi, Yuefeng Chen, Xiaodan Li et al.CVPR 2022 · 185 citations
