LocalViT: Analyzing Locality in Vision Transformers
Open accessThe DOI matches its Crossref record; 56 of the 56 references it cites were found in a registry or an index.
Abstract
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 infor-mation 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 [1], DeiT-T [2] and PVT-T [3] 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.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Deep Residual Learning for Image Recognition
He, K., Zhang, X., Ren, S., & Sun, J. (2016) · 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr.2016.90 · Cited by 235,474
Very Deep Convolutional Networks for Large-Scale Image Recognition
Simonyan, K., & Zisserman, A. (2014) · arXiv · doi:10.48550/arxiv.1409.1556 · Cited by 114,148
Exploiting Generative AI to Scale up Intelligent Tutoring Systems
Jakubův, J., Chvalovský, K., Goertzel, Z., Kaliszyk, C., Olšák, M., Piotrowski, B., Schulz, S., Suda, M., & Urban, J. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.itp.2023.19 · Cited by 76,658
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Ren, S., He, K., Girshick, R., & Sun, J. (2015) · arXiv · doi:10.48550/arxiv.1506.01497 · Cited by 70,812
ImageNet: A large-scale hierarchical image database
Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., & Fei-Fei, L. (2009) · 2009 IEEE Conference on Computer Vision and Pattern Recognition · doi:10.1109/cvpr.2009.5206848 · Cited by 65,333
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 54,325
Densely Connected Convolutional Networks
Huang, G., Liu, Z., Van Der Maaten, L., & Weinberger, K. Q. (2017) · 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr.2017.243 · Cited by 48,566
Squeeze-and-Excitation Networks
Hu, J., Shen, L., & Sun, G. (2018) · 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition · doi:10.1109/cvpr.2018.00745 · Cited by 35,667
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., & Guo, B. (2021) · 2021 IEEE/CVF International Conference on Computer Vision (ICCV) · doi:10.1109/iccv48922.2021.00986 · Cited by 35,534
Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation
Girshick, R., Donahue, J., Darrell, T., & Malik, J. (2014) · 2014 IEEE Conference on Computer Vision and Pattern Recognition · doi:10.1109/cvpr.2014.81 · Cited by 32,684
Cited by
SwinIR: Image Restoration Using Swin Transformer
Liang, J., Cao, J., Sun, G., Zhang, K., Van Gool, L., & Timofte, R. (2021) · 2021 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW) · doi:10.1109/iccvw54120.2021.00210 · Cited by 4,734
Self-citationHan (2023) · doi:10.1109/tpami.2022.3152247 · Cited by 4,682
“CvT [241], CeiT [259], LocalViT [132] and CMT [77] analyzed the potential drawbacks when directly borrowing Transformer architectures from NLP and combined the convolutions with transformers together.”
MethodTransformers in Vision: A Survey
Khan, S., Naseer, M., Hayat, M., Zamir, S. W., Khan, F. S., & Shah, M. (2022) · ACM Computing Surveys · doi:10.1145/3505244 · Cited by 3,595
“LocalViT [123] introduces depthwise convolutions to enhance local features modeling capability of ViTs.”
BackgroundTransformers in Vision: A Survey
Khan, S., Naseer, M., Hayat, M., Zamir, S. W., Khan, F. S., & Shah, M. (2021) · arXiv · doi:10.48550/arxiv.2101.01169 · Cited by 3,594
Swin Transformer V2: Scaling Up Capacity and Resolution
Liu, Z., Hu, H., Lin, Y., Yao, Z., Xie, Z., Wei, Y., Ning, J., Cao, Y., Zhang, Z., Dong, L., et al. (2021) · arXiv · doi:10.48550/arxiv.2111.09883 · Cited by 2,679
“Since these works, numerous vision Transformer variants have been proposed to improve the accuracy at relatively small scale [8, 14, 23, 31, 50, 55, 58, 62, 64, 65, 67].”
BackgroundSwin Transformer V2: Scaling Up Capacity and Resolution
Liu, Z., Hu, H., Lin, Y., Yao, Z., Xie, Z., Wei, Y., Ning, J., Cao, Y., Zhang, Z., Dong, L., et al. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.01170 · Cited by 2,484
Pvt v2: Improved baselines with pyramid vision transformer
Wang, W., Xie, E., Li, X., Fan, D.-P., Song, K., Liang, D., Lu, T., Luo, P., & Shao, L. (2022) · Computational Visual Media · doi:10.1007/s41095-022-0274-8 · Cited by 2,439
Uformer: A General U-Shaped Transformer for Image Restoration
Wang, Z., Cun, X., Bao, J., Zhou, W., Liu, J., & Li, H. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.01716 · Cited by 2,274
Vision Transformers for Single Image Dehazing
Song, Y., He, Z., Qian, H., & Du, X. (2023) · IEEE Transactions on Image Processing · doi:10.1109/tip.2023.3256763 · Cited by 1,541
Activating More Pixels in Image Super-Resolution Transformer
Chen, X., Wang, X., Zhou, J., Qiao, Y., & Dong, C. (2023) · 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52729.2023.02142 · Cited by 1,152
MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer
Mehta, S., & Rastegari, M. (2021) · arXiv · doi:10.48550/arxiv.2110.02178 · Cited by 1,110
“, 2021a), LocalViT (Li et al., 2021), PiT (Heo et al.”
BackgroundMedical Image Segmentation Review: The Success of U-Net
Azad, R., Aghdam, E. K., Rauland, A., Jia, Y., Avval, A. H., Bozorgpour, A., Karimijafarbigloo, S., Cohen, J. P., Adeli, E., & Merhof, D. (2024) · IEEE Transactions on Pattern Analysis and Machine Intelligence · doi:10.1109/tpami.2024.3435571 · Cited by 1,022
MixFormer: End-to-End Tracking with Iterative Mixed Attention
Cui, Y., Jiang, C., Wang, L., & Wu, G. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.01324 · Cited by 838
Computer Vision and Image Understanding
Saideni, W., Courreges, F., Helbert, D., & Cances, J. P. (2022) · SSRN Electronic Journal · doi:10.2139/ssrn.4129906 · Cited by 766
Transformer for Single Image Super-Resolution
Lu, Z., Li, J., Liu, H., Huang, C., Zhang, L., & Zeng, T. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW) · doi:10.1109/cvprw56347.2022.00061 · Cited by 678
MISSFormer: An Effective Transformer for 2D Medical Image Segmentation
Huang, X., Deng, Z., Li, D., Yuan, X., & Fu, Y. (2023) · IEEE Transactions on Medical Imaging · doi:10.1109/tmi.2022.3230943 · Cited by 594
A Survey of Visual Transformers
Liu, Y., Zhang, Y., Wang, Y., Hou, F., Yuan, J., Tian, J., Zhang, Y., Shi, Z., Fan, J., & He, Z. (2024) · IEEE Transactions on Neural Networks and Learning Systems · doi:10.1109/tnnls.2022.3227717 · Cited by 549
Learning A Sparse Transformer Network for Effective Image Deraining
Chen, X., Li, H., Li, M., & Pan, J. (2023) · 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52729.2023.00571 · Cited by 538
A survey of the vision transformers and their CNN-transformer based variants
Khan, A., Rauf, Z., Sohail, A., Khan, A. R., Asif, H., Asif, A., & Farooq, U. (2023) · Artificial Intelligence Review · doi:10.1007/s10462-023-10595-0 · Cited by 451
TransWeather: Transformer-based Restoration of Images Degraded by Adverse Weather Conditions
Jose Valanarasu, J. M., Yasarla, R., & Patel, V. M. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.00239 · Cited by 416
Filter-enhanced MLP is All You Need for Sequential Recommendation
Zhou, K., Yu, H., Zhao, W. X., & Wen, J.-R. (2022) · Proceedings of the ACM Web Conference 2022 · doi:10.1145/3485447.3512111 · Cited by 401
Rethinking Vision Transformers for MobileNet Size and Speed
Li, Y., Hu, J., Wen, Y., Evangelidis, G., Salahi, K., Wang, Y., Tulyakov, S., & Ren, J. (2023) · 2023 IEEE/CVF International Conference on Computer Vision (ICCV) · doi:10.1109/iccv51070.2023.01549 · Cited by 329
Self-citationP2T: Pyramid Pooling Transformer for Scene Understanding
Wu, Y.-H., Liu, Y., Zhan, X., & Cheng, M.-M. (2023) · IEEE Transactions on Pattern Analysis and Machine Intelligence · doi:10.1109/tpami.2022.3202765 · Cited by 309
Self-Training Multi-Sequence Learning with Transformer for Weakly Supervised Video Anomaly Detection
Li, S., Liu, F., & Jiao, L. (2022) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v36i2.20028 · Cited by 280
Multi-Scale High-Resolution Vision Transformer for Semantic Segmentation
Gu, J., Kwon, H., Wang, D., Ye, W., Li, M., Chen, Y.-H., Lai, L., Chandra, V., & Pan, D. Z. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.01178 · Cited by 251
“Beyond classical CNNs, vision Transformers (ViTs) have emerged with competitive performance in computer vision tasks [2, 3, 5, 11, 12, 17, 19, 26, 29, 30, 33, 34, 37, 41].”
BackgroundPractical Blind Image Denoising via Swin-Conv-UNet and Data Synthesis
Zhang, K., Li, Y., Liang, J., Cao, J., Zhang, Y., Tang, H., Fan, D.-P., Timofte, R., & Gool, L. V. (2023) · Machine Intelligence Research · doi:10.1007/s11633-023-1466-0 · Cited by 228
“By contrast, Uformer adopts a new transformer block by combining depth-wise convolution layers [29], while Swin-Unet utilizes the swin transformer block as the main building block.”
BackgroundSelf-citationTowards Robust Vision Transformer
Mao, X., Qi, G., Chen, Y., Li, X., Duan, R., Ye, S., He, Y., & Xue, H. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.01173 · Cited by 224
“LocalViT [23] and CeiT [50] introduce connectivity of local regions into ViTs by adding a depth-wise convolution in feed-forward networks (FFN).”
BackgroundTowards Robust Vision Transformer
Mao, X., Qi, G., Chen, Y., Li, X., Duan, R., Ye, S., He, Y., & Xue, H. (2021) · arXiv · doi:10.48550/arxiv.2105.07926 · Cited by 224
Nascimento, E. G. S., de Melo, T. A. C., & Moreira, D. M. (2023) · Energy · doi:10.1016/j.energy.2023.127678 · Cited by 220
Adapt or Perish: Adaptive Sparse Transformer with Attentive Feature Refinement for Image Restoration
Zhou, S., Chen, D., Pan, J., Shi, J., & Yang, J. (2024) · 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52733.2024.00285 · Cited by 216
“…the effect of our FRFN, we first compare it with four variants, including (1) vanilla Feed-Forward Network (FFN) [11], (2) Depth-wise convolution equipped Feed-forward Network (DFN) [34], (3) Gated-Dconv Feed-forward Network (GDFN) [100], and (4) Locally-enhanced Feed-Forward network (LeFF).”
BackgroundMethodScale-Aware Modulation Meet Transformer
Lin, W., Wu, Z., Chen, J., Huang, J., & Jin, L. (2023) · 2023 IEEE/CVF International Conference on Computer Vision (ICCV) · doi:10.1109/iccv51070.2023.00553 · Cited by 208
“To address these issues and improve the performance of vision Transformers, various methods have been proposed, including multi-scale architectures [3, 32, 56, 63], lightweight convolution layers [14, 28, 60], and local self-attention mechanisms [32, 6, 65, 71].”
MethodA Hybrid Network of CNN and Transformer for Lightweight Image Super-Resolution
Fang, J., Lin, H., Chen, X., & Zeng, K. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW) · doi:10.1109/cvprw56347.2022.00119 · Cited by 207
“Inspired by SwinIR [21] and LocalViT [19] , we propose a lightweight SR model namely hybrid network of CNN and Transformer (HNCT), integrating CNN and transformer to model local and non-local priors, simultaneously.”
BackgroundMethodPneumonia Detection on Chest X-ray Images Using Ensemble of Deep Convolutional Neural Networks
Mabrouk, A., Díaz Redondo, R. P., Dahou, A., Abd Elaziz, M., & Kayed, M. (2022) · Applied Sciences · doi:10.3390/app12136448 · Cited by 187
“Due to significant advancements in VIT, MLP includes a local mechanism to understand local features [50].”
BackgroundTriTransNet: RGB-D Salient Object Detection with a Triplet Transformer Embedding Network
Liu, Z., Wang, Y., Tu, Z., Xiao, Y., & Tang, B. (2021) · Proceedings of the 29th ACM International Conference on Multimedia · doi:10.1145/3474085.3475601 · Cited by 175
“LocalViT[42] adds locality to vision transformers by introducing depth-wise convolution into the feed-forward network, improving a locality mechanism for information exchange within a local region.”
Lite Vision Transformer with Enhanced Self-Attention
Yang, C., Wang, Y., Zhang, J., Zhang, H., Wei, Z., Lin, Z., & Yuille, A. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.01169 · Cited by 164
“The third one is inserting convolution after self-attention, including LocalViT [29] and PVTv2 [54].”
BackgroundMISSFormer: An Effective Medical Image Segmentation Transformer
Huang, X., Deng, Z., Li, D., & Yuan, X. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2109.07162 · Cited by 163
“However, some recent works(Islam, Jia, and Bruce 2020; Chu et al. 2021b; Li et al. 2021) showed the limita-a tion of self-attention on local context, inspired by this, Uformer(Wang et al. 2021d), SegFormer(Xie et al. 2021a) and PVTv2(Wang et al. 2021b) tried to embed convolutional layer between…”
BackgroundInfluentialESSAformer: Efficient Transformer for Hyperspectral Image Super-resolution
Zhang, M., Zhang, C., Zhang, Q., Guo, J., Gao, X., & Zhang, J. (2023) · 2023 IEEE/CVF International Conference on Computer Vision (ICCV) · doi:10.1109/iccv51070.2023.02109 · Cited by 162
“In encoder layers, the feature map after ESSA is concatenated with ESSA’s input and then fed into the feed-forward layer (FFN), which is consisted of several convolution and activation layers following the common practice [26].”
MethodFormerLeaf: An efficient vision transformer for Cassava Leaf Disease detection
Thai, H.-T., Le, K.-H., & Nguyen, N. L.-T. (2023) · Computers and Electronics in Agriculture · doi:10.1016/j.compag.2022.107518 · Cited by 160
Zhang, Z., Zhang, H., Zhao, L., Chen, T., Arik, S. Ö., & Pfister, T. (2022) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v36i3.20252 · Cited by 159
“…community, with explorations of more suitable architectural designs that can learn visual representation effectively, such as injecting convolutional layers (Li et al. 2021; Srinivas et al. 2021; Yuan et al. 2021) and building local or hierarchical structures (Zhang et al. 2021; Wang et al. 2021b).”
BackgroundHRFormer: High-Resolution Transformer for Dense Prediction
Yuan, Y., Fu, R., Huang, L., Lin, W., Zhang, C., Chen, X., & Wang, J. (2021) · arXiv · doi:10.48550/arxiv.2110.09408 · Cited by 178
“CvT [47], CeiT [52], and LocalViT [25] propose to enhance the locality of transformer via inserting depth-wise convolutions into either the self-attention or the FFN.”
MethodBiViT: Extremely Compressed Binary Vision Transformers
He, Y., Lou, Z., Zhang, L., Liu, J., Wu, W., Zhou, H., & Zhuang, B. (2023) · 2023 IEEE/CVF International Conference on Computer Vision (ICCV) · doi:10.1109/iccv51070.2023.00520 · Cited by 31
“Many follow-up works are proposed to explore hierarchical structures [49, 70, 81], insert the convolutional inductive bias [41, 25, 17] and apply ViTs to various vision tasks [80, 77, 22].”
Background
Metadata
- Authors
- Li, Y., Zhang, K., Cao, J., Timofte, R., Magno, M., Benini, L., & Van Goo, L.
- Venue
- 2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)
- Publisher
- IEEE
- Published
- 2023-10-01
- Pages
- 9598-9605
- OpenAlex
- W4389666313
- Cited by
- 372
- References
- 56
- FWCI
- 29.56
- Type
- conference paper
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.