mlsanityData to 14 Oct 2026

Unifying Convolution and Attention via Convolutional Nearest Neighbors

arXiv 2511.14137 ↗First posted 18 Nov 2025cs.CVcited by 1

Not on the map. Why?

Abstract (arXiv)

Convolutional Neural Networks and Vision Transformers are the two dominant architectural families in computer vision, defined by spatially local convolution and global self-attention respectively. Despite their apparent differences, we show that both operations are special cases of a single k-nearest neighbor aggregation framework: convolution selects neighbors by spatial proximity while attention selects by feature similarity, placing them at two ends of a shared operational spectrum. We introduce Convolutional Nearest Neighbors (ConvNN), a unified framework that exactly recovers standard and depthwise convolution, self-attention, and sparse attention variants including KVT-attention as special cases, and exposes the design space of neighbor-selection strategies between them through configurable similarity functions, positional encodings, and aggregation kernels. We validate ConvNN on ImageNet-1K classification across two complementary architectures: a hybrid branching layer in ResNet-50 that combines local and global feature learning, improving top-1 accuracy by 3.0% over the ResNet-50 baseline, and ConvNN-attention in ViT-Base that achieves 81.64% top-1 accuracy, surpassing standard multi-head self-attention by 0.7%. Together, these results demonstrate that ConvNN provides a principled foundation for designing operations that bridge convolutional and attention-based computation.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 33 of its 40 references that are in the map. First posted on arXiv 18 Nov 2025.

Builds on

33 of 40 references.

References · 33

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  4. 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,364
  5. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  6. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
  7. 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,442
  8. 2017mixup: Beyond Empirical Risk Minimizationcited by 5,183
  9. 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 5,045
  10. 2017Squeeze-and-Excitation Networkscited by 4,789
  11. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  12. 2022A ConvNet for the 2020scited by 3,579
21 more
  1. 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,884
  2. 2017Non-local Neural Networkscited by 2,293
  3. 2019RandAugment: Practical automated data augmentation with a reduced search spacecited by 2,269
  4. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  5. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,962
  6. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  7. 2020Designing Network Design Spacescited by 960
  8. 2021CvT: Introducing Convolutions to Vision Transformerscited by 947
  9. 2021CoAtNet: Marrying Convolution and Attention for All Data Sizescited by 569
  10. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
  11. 2019Attention Augmented Convolutional Networkscited by 363
  12. 2019On the Relationship between Self-Attention and Convolutional Layerscited by 300
  13. 2021Conformer: Local Features Coupling Global Representations for Visual Recognitioncited by 164
  14. 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 128
  15. 2021RegionViT: Regional-to-Local Attention for Vision Transformerscited by 127
  16. 2018Neural Nearest Neighbors Networkscited by 98
  17. 2021On the Integration of Self-Attention and Convolutioncited by 74
  18. 2021KVT: k-NN Attention for Boosting Vision Transformerscited by 65
  19. 2021On the Connection between Local Attention and Dynamic Depth-wise Convolutioncited by 62
  20. 2024Towards noise contrastive estimation with soft targets for conditional modelscited by 5
  21. 2023Vision Big Bird: Random Sparsification for Full Attentioncited by 2

Built on by

Cited by year

Citing papers per year: 2025: 1.

1 paper.