LocalViT: Analyzing Locality in Vision Transformers
Not on the map. Why?
Abstract (arXiv)
The aim of this paper is to study the influence of locality mechanisms in vision transformers. Transformers originated from machine translation and are particularly good at modelling long-range dependencies within a long sequence. Although the global interaction between the token embeddings could be well modelled by the self-attention mechanism of transformers, what is lacking is a locality mechanism for information exchange within a local region. In this paper, locality mechanism is systematically investigated by carefully designed controlled experiments. We add locality to vision transformers into the feed-forward network. This seemingly simple solution is inspired by the comparison between feed-forward networks and inverted residual blocks. The importance of locality mechanisms is validated in two ways: 1) A wide range of design choices (activation function, layer placement, expansion ratio) are available for incorporating locality mechanisms and proper choices can lead to a performance gain over the baseline, and 2) The same locality mechanism is successfully applied to vision transformers with different architecture designs, which shows the generalization of the locality concept. For ImageNet2012 classification, the locality-enhanced transformers outperform the baselines Swin-T, DeiT-T, and PVT-T by 1.0%, 2.6% and 3.1% with a negligible increase in the number of parameters and computational effort. Code is available at https://github.com/ofsoundof/LocalViT.
Key facts. Cited by 228 papers in the map (data through 7 Oct 2026). Builds on 30 of its 45 references that are in the map. First posted on arXiv 12 Apr 2021.
Builds on
30 of 45 references.
References · 30
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,267
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2020End-to-End Object Detection with Transformerscited by 7,384
- 2016Densely Connected Convolutional Networkscited by 6,691
- 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,415
- 2018MobileNetV2: Inverted Residuals and Linear Bottleneckscited by 4,773
- 2017Squeeze-and-Excitation Networkscited by 4,763
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2017MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applicationscited by 3,827
18 more
- 2017Non-local Neural Networkscited by 2,290
- 2019Searching for MobileNetV3cited by 1,984
- 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
- 2015Multi-Scale Context Aggregation by Dilated Convolutionscited by 1,128
- 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,096
- 2020Designing Network Design Spacescited by 954
- 2018MnasNet: Platform-Aware Neural Architecture Search for Mobilecited by 937
- 2021Transformer in Transformercited by 632
- 2019ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networkscited by 572
- 2021ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biasescited by 484
- 2021Bottleneck Transformers for Visual Recognitioncited by 364
- 2021Incorporating Convolution Designs into Visual Transformerscited by 248
- 2021Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encodingcited by 207
- 2018Non-Local Recurrent Network for Image Restorationcited by 160
- 2020HAT: Hardware-Aware Transformers for Efficient Natural Language Processingcited by 136
- 2020Lite Transformer with Long-Short Range Attentioncited by 127
- 2021BossNAS: Exploring Hybrid CNN-transformers with Block-wisely Self-supervised Neural Architecture Searchcited by 63
- 2020DeLighT: Deep and Light-weight Transformercited by 17
Built on by
Citing papers per year: 2021: 56; 2022: 73; 2023: 55; 2024: 30; 2025: 9; 2026: 5.
228 papers.
Sort:
By area:
- 2021SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformerscited by 2,923
- 2021SwinIR: Image Restoration Using Swin Transformercited by 1,869
- 2021Swin Transformer V2: Scaling Up Capacity and Resolutioncited by 1,215
- 2021Uformer: A General U-Shaped Transformer for Image Restorationcited by 864
- 2021MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformercited by 636
- 2022Vision Transformer Adapter for Dense Predictionscited by 564
- 2021CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windowscited by 526
- 2022MaxViT: Multi-Axis Vision Transformercited by 476
- 2022Activating More Pixels in Image Super-Resolution Transformercited by 433
- 2022MixFormer: End-to-End Tracking with Iterative Mixed Attentioncited by 278
- 2022Vision Transformers for Single Image Dehazingcited by 255
- 2021TransWeather: Transformer-based Restoration of Images Degraded by Adverse Weather Conditionscited by 243
38 more
- 2022EfficientFormer: Vision Transformers at MobileNet Speedcited by 240
- 2021AdaViT: Adaptive Vision Transformers for Efficient Image Recognitioncited by 228
- 2022VRT: A Video Restoration Transformercited by 219
- 2021ViTAE: Vision Transformer Advanced by Exploring Intrinsic Inductive Biascited by 216
- 2023Learning A Sparse Transformer Network for Effective Image Derainingcited by 204
- 2022Medical Image Segmentation Review: The success of U-Netcited by 190
- 2022Focal Modulation Networkscited by 186
- 2022DaViT: Dual Attention Vision Transformerscited by 174
- 2022Recurrent Video Restoration Transformer with Guided Deformable Attentioncited by 168
- 2022Separable Self-attention for Mobile Vision Transformerscited by 163
- 2022Efficient Long-Range Attention Network for Image Super-resolutioncited by 151
- 2021Transformer for Single Image Super-Resolutioncited by 150
- 2021HRFormer: High-Resolution Transformer for Dense Predictioncited by 149
- 2023Efficient and Explicit Modelling of Image Hierarchies for Image Restorationcited by 145
- 2021Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognitioncited by 143
- 2021Towards Robust Vision Transformercited by 137
- 2021RegionViT: Regional-to-Local Attention for Vision Transformerscited by 126
- 2021Vision Transformer for Small-Size Datasetscited by 122
- 2022Rethinking Vision Transformers for MobileNet Size and Speedcited by 121
- 2021Video Super-Resolution Transformercited by 120
- 2021A Survey of Visual Transformerscited by 117
- 2022ViTAEv2: Vision Transformer Advanced by Exploring Inductive Bias for Image Recognition and Beyondcited by 117
- 2022Revealing the Dark Secrets of Masked Image Modelingcited by 117
- 2021Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformercited by 115
- 2021Efficient Training of Visual Transformers with Small Datasetscited by 107
- 2021MISSFormer: An Effective Medical Image Segmentation Transformercited by 103
- 2021AS-MLP: An Axial Shifted MLP Architecture for Visioncited by 101
- 2021Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understandingcited by 97
- 2023Extracting Motion and Appearance via Inter-Frame Attention for Efficient Video Frame Interpolationcited by 97
- 2022Filter-enhanced MLP is All You Need for Sequential Recommendationcited by 96
- 2022PanoFormer: Panorama Transformer for Indoor 360 Depth Estimationcited by 94
- 2021Multi-Scale High-Resolution Vision Transformer for Semantic Segmentationcited by 92
- 2022Practical Blind Image Denoising via Swin-Conv-UNet and Data Synthesiscited by 85
- 2023Joint Token Pruning and Squeezing Towards More Aggressive Compression of Vision Transformerscited by 79
- 2023GET: Group Event Transformer for Event-Based Visioncited by 73
- 2021KVT: k-NN Attention for Boosting Vision Transformerscited by 64
- 2021Lite Vision Transformer with Enhanced Self-Attentioncited by 64
- 2022CF-ViT: A General Coarse-to-Fine Method for Vision Transformercited by 63
50 most cited of 228 All 228 (JSON)
- 2026Grid-Preserving Knowledge Distillation: Transferring Convolutional Inductive Bias to Vision Transformers under Data Scarcity11 Aug 2026
- 2026Sparse Attention to Emotion: Efficient Facial Emotion Recognition via Token Reduction9 Aug 2026
- 2026Inhibited Self-Attention: Sharpening Focus in Vision Transformers14 Jul 2026
- 2026Metonymy in vision models undermines attention-based interpretability7 May 2026
- 2026ATD: Improved Transformer with Adaptive Token Dictionary for Image Restoration3 Mar 2026
- 2025HydraMamba: Multi-Head State Space Model for Global Point Cloud Learning26 Jul 2025
- 2025DFYP: A Dynamic Fusion Framework with Spectral Channel Attention and Adaptive Operator learning for Crop Yield Prediction8 Jul 2025
- 2025AGTCNet: A Graph-Temporal Approach for Principled Motor Imagery EEG Classification26 Jun 2025
- 2025HTMNet: A Hybrid Network with Transformer-Mamba Bottleneck Multimodal Fusion for Transparent and Reflective Objects Depth Completion27 May 2025
- 2025Coarse-to-Fine Learning for Multi-Pipette Localisation in Robot-Assisted In Vivo Patch-Clamp31 Mar 2025
- 2025Fraesormer: Learning Adaptive Sparse Transformer for Efficient Food Recognition15 Mar 2025
- 2025HieroLM: Egyptian Hieroglyph Recovery with Next Word Prediction Language Model6 Mar 2025
38 more
- 2025Solar Multimodal Transformer: Intraday Solar Irradiance Predictor using Public Cameras and Time Series28 Feb 2025
- 2025Transformers with Joint Tokens and Local-Global Attention for Efficient Human Pose Estimation28 Feb 2025
- 2024Advancing Deformable Medical Image Registration with Multi-axis Cross-covariance Attention24 Dec 2024
- 2024Reversing the Damage: A QP-Aware Transformer-Diffusion Approach for 8K Video Restoration under Codec Compression12 Dec 2024
- 2024HRPVT: High-Resolution Pyramid Vision Transformer for medium and small-scale human pose estimation29 Oct 2024
- 2024PViT: Prior-augmented Vision Transformer for Out-of-distribution Detection27 Oct 2024
- 2024RoWSFormer: A Robust Watermarking Framework with Swin Transformer for Enhanced Geometric Attack Resilience23 Sep 2024
- 2024SDformer: Efficient End-to-End Transformer for Depth Completion12 Sep 2024
- 2024MambaMIC: An Efficient Baseline for Microscopic Image Classification with State Space Models12 Sep 2024
- 2024AFFSegNet: Adaptive Feature Fusion Segmentation Network for Microtumors and Multi-Organ Segmentation12 Sep 2024
- 2024SMAFormer: Synergistic Multi-Attention Transformer for Medical Image Segmentation31 Aug 2024
- 2024Improving Image De-raining Using Reference-Guided Transformers1 Aug 2024
- 2024Depth-Wise Convolutions in Vision Transformers for Efficient Training on Small Datasets28 Jul 2024
- 2024Quasar-ViT: Hardware-Oriented Quantization-Aware Architecture Search for Vision Transformers25 Jul 2024
- 2024SwinSF: Image Reconstruction from Spatial-Temporal Spike Streams22 Jul 2024
- 2024DuoFormer: Leveraging Hierarchical Visual Representations by Local and Global Attention18 Jul 2024
- 2024Struct-X: Enhancing Large Language Models Reasoning with Structured Data17 Jul 2024
- 2024TCFormer: Visual Recognition via Token Clustering Transformer16 Jul 2024
- 2024AdaNCA: Neural Cellular Automata As Adaptors For More Robust Vision Transformer12 Jun 2024
- 2024Multi-View Attentive Contextualization for Multi-View 3D Object Detection20 May 2024
- 2024Training Transformer Models by Wavelet Losses Improves Quantitative and Visual Performance in Single Image Super-Resolution17 Apr 2024
- 2024WiTUnet: A U-Shaped Architecture Integrating CNN and Transformer for Improved Feature Alignment and Local Information Fusion15 Apr 2024
- 2024Scene Adaptive Sparse Transformer for Event-based Object Detection2 Apr 2024
- 2024IPT-V2: Efficient Image Processing Transformer using Hierarchical Attentions31 Mar 2024
- 2024Look-Around Before You Leap: High-Frequency Injected Transformer for Image Restoration30 Mar 2024
- 2024Efficient Modulation for Vision Networks29 Mar 2024
- 2024Improved EATFormer: A Vision Transformer for Medical Image Classification19 Mar 2024
- 2024Towards In-Vehicle Multi-Task Facial Attribute Recognition: Investigating Synthetic Data and Vision Foundation Models10 Mar 2024
- 2024NiNformer: A Network in Network Transformer with Token Mixing Generated Gating Function4 Mar 2024
- 2024Attention Guided CAM: Visual Explanations of Vision Transformer Guided by Self-Attention7 Feb 2024
- 2024Transforming Image Super-Resolution: A ConvFormer-based Efficient Approach11 Jan 2024
- 2024LF-ViT: Reducing Spatial Redundancy in Vision Transformer for Efficient Image Recognition8 Jan 2024
- 2023Progressive Frequency-Aware Network for Laparoscopic Image Desmoking19 Dec 2023
- 2023Pneumonia Detection on chest X-ray images Using Ensemble of Deep Convolutional Neural Networks13 Dec 2023
- 2023GenDepth: Generalizing Monocular Depth Estimation for Arbitrary Camera Parameters via Ground Plane Embedding10 Dec 2023
- 2023DeepFidelity: Perceptual Forgery Fidelity Assessment for Deepfake Detection7 Dec 2023
- 2023Class-Discriminative Attention Maps for Vision Transformers4 Dec 2023
- 2023SCHEME: Scalable Channel Mixer for Vision Transformers1 Dec 2023
50 newest of 228 All 228 (JSON)
- 2021SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformerscited by 2,923
- 2021SwinIR: Image Restoration Using Swin Transformercited by 1,869
- 2021Swin Transformer V2: Scaling Up Capacity and Resolutioncited by 1,215
- 2021Uformer: A General U-Shaped Transformer for Image Restorationcited by 864
- 2021MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformercited by 636
- 2022Vision Transformer Adapter for Dense Predictionscited by 564
- 2021CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windowscited by 526
- 2022MaxViT: Multi-Axis Vision Transformercited by 476
- 2022Activating More Pixels in Image Super-Resolution Transformercited by 433
- 2022MixFormer: End-to-End Tracking with Iterative Mixed Attentioncited by 278
- 2022Vision Transformers for Single Image Dehazingcited by 255
- 2021TransWeather: Transformer-based Restoration of Images Degraded by Adverse Weather Conditionscited by 243
12 most cited of 219 All 219 (JSON)
- 2026Grid-Preserving Knowledge Distillation: Transferring Convolutional Inductive Bias to Vision Transformers under Data Scarcity11 Aug 2026
- 2026Sparse Attention to Emotion: Efficient Facial Emotion Recognition via Token Reduction9 Aug 2026
- 2026Inhibited Self-Attention: Sharpening Focus in Vision Transformers14 Jul 2026
- 2026Metonymy in vision models undermines attention-based interpretability7 May 2026
- 2026ATD: Improved Transformer with Adaptive Token Dictionary for Image Restoration3 Mar 2026
- 2025DFYP: A Dynamic Fusion Framework with Spectral Channel Attention and Adaptive Operator learning for Crop Yield Prediction8 Jul 2025
- 2025AGTCNet: A Graph-Temporal Approach for Principled Motor Imagery EEG Classification26 Jun 2025
- 2025Coarse-to-Fine Learning for Multi-Pipette Localisation in Robot-Assisted In Vivo Patch-Clamp31 Mar 2025
- 2025Fraesormer: Learning Adaptive Sparse Transformer for Efficient Food Recognition15 Mar 2025
- 2025HieroLM: Egyptian Hieroglyph Recovery with Next Word Prediction Language Model6 Mar 2025
- 2025Solar Multimodal Transformer: Intraday Solar Irradiance Predictor using Public Cameras and Time Series28 Feb 2025
- 2025Transformers with Joint Tokens and Local-Global Attention for Efficient Human Pose Estimation28 Feb 2025
12 newest of 219 All 219 (JSON)