mlsanityData to 7 Oct 2026

KVT: k-NN Attention for Boosting Vision Transformers

arXiv 2106.00515 ↗First posted 28 May 2021cs.CVcited by 64

Not on the map. Why?

Abstract (arXiv)

Convolutional Neural Networks (CNNs) have dominated computer vision for years, due to its ability in capturing locality and translation invariance. Recently, many vision transformer architectures have been proposed and they show promising performance. A key component in vision transformers is the fully-connected self-attention which is more powerful than CNNs in modelling long range dependencies. However, since the current dense self-attention uses all image patches (tokens) to compute attention matrix, it may neglect locality of images patches and involve noisy tokens (e.g., clutter background and occlusion), leading to a slow training process and potential degradation of performance. To address these problems, we propose the k-NN attention for boosting vision transformers. Specifically, instead of involving all the tokens for attention matrix calculation, we only select the top-k similar tokens from the keys for each query to compute the attention map. The proposed k-NN attention naturally inherits the local bias of CNNs without introducing convolutional operations, as nearby tokens tend to be more similar than others. In addition, the k-NN attention allows for the exploration of long range correlation and at the same time filters out irrelevant tokens by choosing the most similar tokens from the entire image. Despite its simplicity, we verify, both theoretically and empirically, that k-NN attention is powerful in speeding up training and distilling noise from input tokens. Extensive experiments are conducted by using 11 different vision transformer architectures to verify that the proposed k-NN attention can work with any existing transformer architectures to improve its prediction performance. The codes are available at urlhttps://github.com/damo-cv/KVT.

Key facts. Cited by 64 papers in the map (data through 7 Oct 2026). Builds on 61 of its 93 references that are in the map. First posted on arXiv 28 May 2021.

Builds on

61 of 93 references.

References · 61

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  4. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  6. 2014Microsoft COCO: Common Objects in Contextcited by 17,498
  7. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
  8. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
  9. 2020End-to-End Object Detection with Transformerscited by 7,384
  10. 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,893
  11. 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,415
  12. 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
38 more
  1. 2017MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applicationscited by 3,827
  2. 2020Longformer: The Long-Document Transformercited by 3,362
  3. 2016Aggregated Residual Transformations for Deep Neural Networkscited by 2,540
  4. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
  5. 2020Big Bird: Transformers for Longer Sequencescited by 1,673
  6. 2020Reformer: The Efficient Transformercited by 1,658
  7. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
  8. 2017ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devicescited by 1,194
  9. 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,096
  10. 2016Semantic Understanding of Scenes through the ADE20K Datasetcited by 1,063
  11. 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
  12. 2021CvT: Introducing Convolutions to Vision Transformerscited by 946
  13. 2018MnasNet: Platform-Aware Neural Architecture Search for Mobilecited by 937
  14. 2021Multiscale Vision Transformerscited by 896
  15. 2021CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classificationcited by 806
  16. 2020Efficient Transformers: A Surveycited by 784
  17. 2021Going deeper with Image Transformerscited by 759
  18. 2021Transformer in Transformercited by 632
  19. 2020Transformer Interpretability Beyond Attention Visualizationcited by 620
  20. 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
  21. 2021ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biasescited by 484
  22. 2021LeViT: a Vision Transformer in ConvNet's Clothing for Faster Inferencecited by 475
  23. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
  24. 2020End-to-End Video Instance Segmentation with Transformerscited by 443
  25. 2021TransReID: Transformer-based Object Re-Identificationcited by 432
  26. 2021Transformer Trackingcited by 412
  27. 2021Rethinking Spatial Dimensions of Vision Transformerscited by 361
  28. 2019Axial Attention in Multidimensional Transformerscited by 350
  29. 2018Generating Wikipedia by Summarizing Long Sequencescited by 333
  30. 2020Exploring Self-attention for Image Recognitioncited by 313
  31. 2019On the Relationship between Self-Attention and Convolutional Layerscited by 299
  32. 2021DeepViT: Towards Deeper Vision Transformercited by 288
  33. 2020Sparse Sinkhorn Attentioncited by 250
  34. 2021Incorporating Convolution Designs into Visual Transformerscited by 248
  35. 2021LocalViT: Analyzing Locality in Vision Transformerscited by 228
  36. 2021Co-Scale Conv-Attentional Image Transformerscited by 224
  37. 2021Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encodingcited by 207
  38. 2019Adaptively Sparse Transformerscited by 154

50 most cited of 61 All 61 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 6; 2022: 10; 2023: 19; 2024: 14; 2025: 8; 2026: 7.

64 papers.

Sort:

By area:

  1. 2023One Fits All:Power General Time Series Analysis by Pretrained LMcited by 615
  2. 2023Learning A Sparse Transformer Network for Effective Image Derainingcited by 204
  3. 2021SPViT: Enabling Faster Vision Transformers via Soft Token Pruningcited by 165
  4. 2023Swap Attention in Spatiotemporal Diffusions for Text-to-Video Generationcited by 153
  5. 2021CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptationcited by 129
  6. 2022QuadTree Attention for Vision Transformerscited by 129
  7. 2022Entroformer: A Transformer-based Entropy Model for Learned Image Compressioncited by 102
  8. 2024PromptCharm: Text-to-Image Generation through Multi-modal Prompting and Refinementcited by 61
  9. 2023Vision Transformer with Quadrangle Attentioncited by 46
  10. 2024A Survey on Transformer Compressioncited by 44
  11. 2022VSA: Learning Varied-Size Window Attention in Vision Transformerscited by 43
  12. 2023Prompt-In-Prompt Learning for Universal Image Restorationcited by 43
38 more
  1. 2023Memory-and-Anticipation Transformer for Online Action Understandingcited by 39
  2. 2021Scaled ReLU Matters for Training Vision Transformerscited by 29
  3. 2024Frequency Decoupling for Motion Magnification via Multi-Level Isomorphic Architecturecited by 28
  4. 2021Self-slimmed Vision Transformercited by 27
  5. 2022VAQF: Fully Automatic Software-Hardware Co-Design Framework for Low-Bit Vision Transformercited by 27
  6. 2023EulerMormer: Robust Eulerian Motion Magnification via Dynamic Filtering within Transformercited by 27
  7. 2025Progressive Focused Transformer for Single Image Super-Resolutioncited by 25
  8. 2022DynaST: Dynamic Sparse Transformer for Exemplar-Guided Image Generationcited by 24
  9. 2023FM-ViT: Flexible Modal Vision Transformers for Face Anti-Spoofingcited by 22
  10. 2023SCT: A Simple Baseline for Parameter-Efficient Fine-Tuning via Salient Channelscited by 20
  11. 2021ELSA: Enhanced Local Self-Attention for Vision Transformercited by 18
  12. 2023MA-ViT: Modality-Agnostic Vision Transformers for Face Anti-Spoofingcited by 18
  13. 2022Dynamic Focus-aware Positional Queries for Semantic Segmentationcited by 16
  14. 2023Hourglass Tokenizer for Efficient Transformer-Based 3D Human Pose Estimationcited by 15
  15. 2021Decoupling and Recoupling Spatiotemporal Representation for RGB-D-based Motion Recognitioncited by 13
  16. 2024Looking 3D: Anomaly Detection with 2D-3D Alignmentcited by 13
  17. 2023All4One: Symbiotic Neighbour Contrastive Learning via Self-Attention and Redundancy Reductioncited by 11
  18. 2023Linear Log-Normal Attention with Unbiased Concentrationcited by 11
  19. 2022A Unified Multimodal De- and Re-coupling Framework for RGB-D Motion Recognitioncited by 9
  20. 2023CAIT: Triple-Win Compression towards High Accuracy, Fast Inference, and Favorable Transferability For ViTscited by 9
  21. 2024LeMeViT: Efficient Vision Transformer with Learnable Meta Tokens for Remote Sensing Image Interpretationcited by 9
  22. 2022Data Level Lottery Ticket Hypothesis for Vision Transformerscited by 7
  23. 2022ClusTR: Exploring Efficient Self-attention via Clustering for Vision Transformerscited by 6
  24. 2023Reciprocal Attention Mixing Transformer for Lightweight Image Restorationcited by 6
  25. 2023Graph-Segmenter: Graph Transformer with Boundary-aware Attention for Semantic Segmentationcited by 6
  26. 2023Revisit Parameter-Efficient Transfer Learning: A Two-Stage Paradigmcited by 5
  27. 2024MultiMax: Sparse and Multi-Modal Attention Learningcited by 5
  28. 2024PADRe: A Unifying Polynomial Attention Drop-in Replacement for Efficient Vision Transformercited by 5
  29. 2024Hierarchical Separable Video Transformer for Snapshot Compressive Imagingcited by 4
  30. 2022Effective Vision Transformer Training: A Data-Centric Perspectivecited by 3
  31. 2024ReViT: Enhancing Vision Transformers Feature Diversity with Attention Residual Connectionscited by 3
  32. 2024LevAttention: Time, Space, and Streaming Efficient Algorithm for Heavy Attentionscited by 3
  33. 2024KNN Transformer with Pyramid Prompts for Few-Shot Learningcited by 3
  34. 2026LaSSM: Efficient Semantic-Spatial Query Decoding via Local Aggregation and State Space Models for 3D Instance Segmentationcited by 3
  35. 2024A Manifold Representation of the Key in Vision Transformerscited by 2
  36. 2026Multi-scale hypergraph meets LLMs: Aligning large language models for time series analysiscited by 2
  37. 2023Multi-stage Factorized Spatio-Temporal Representation for RGB-D Action and Gesture Recognitioncited by 1
  38. 2025Unifying Convolution and Attention via Convolutional Nearest Neighborscited by 1

50 most cited of 64 All 64 (JSON)