TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Methods/Neighborhood Attention

Neighborhood Attention

GeneralIntroduced 200021 papers
Source Paper

Description

Neighborhood Attention is a restricted self attention pattern in which each token's receptive field is limited to its nearest neighboring pixels. It was proposed in Neighborhood Attention Transformer as an alternative to other local attention mechanisms used in Hierarchical Vision Transformers.

NA is in concept similar to stand alone self attention (SASA), in that both can be implemented with a raster scan sliding window operation over the key value pair. However, NA would require a modification to handle corner pixels, which helps maintain a fixed receptive field size and an increased number of relative positions.

The primary challenge in experimenting with both NA and SASA has been computation. Simply extracting key values for each query is slow, takes up a large amount of memory, and is eventually intractable at scale. NA was therefore implemented through a new CUDA extension to PyTorch, NATTEN.

Papers Using This Method

Attention on the Sphere2025-05-16Generalized Neighborhood Attention: Multi-dimensional Sparse Attention at the Speed of Light2025-04-23Medical Image Classification with KAN-Integrated Transformers and Dilated Neighborhood Attention2025-02-19D3RM: A Discrete Denoising Diffusion Refinement Model for Piano Transcription2025-01-09PIGUIQA: A Physical Imaging Guided Perceptual Framework for Underwater Image Quality Assessment2024-12-20EdgeNAT: Transformer for Efficient Edge Detection2024-08-20Compression-Realized Deep Structural Network for Video Quality Enhancement2024-05-10A Point-Based Approach to Efficient LiDAR Multi-Task Perception2024-04-19DeblurDiNAT: A Compact Model with Exceptional Generalization and Visual Fidelity on Unseen Domains2024-03-19Faster Neighborhood Attention: Reducing the O(n^2) Cost of Self Attention at the Threadblock Level2024-03-07NAC-TCN: Temporal Convolutional Networks with Causal Dilated Neighborhood Attention for Emotion Understanding2023-12-12SDLFormer: A Sparse and Dense Locality-enhanced Transformer for Accelerated MR Image Reconstruction2023-08-08ModeT: Learning Deformable Image Registration via Motion Decomposition Transformer2023-06-09Dilated-UNet: A Fast and Accurate Medical Image Segmentation Approach using a Dilated Transformer and U-Net Architecture2023-04-22Incorporating Transformer Designs into Convolutions for Lightweight Image Super-Resolution2023-03-25StyleNAT: Giving Each Head a New Perspective2022-11-10OneFormer: One Transformer to Rule Universal Image Segmentation2022-11-10Dilated Neighborhood Attention Transformer2022-09-29V$^2$L: Leveraging Vision and Vision-language Models into Large-scale Product Retrieval2022-07-26GAF-NAU: Gramian Angular Field encoded Neighborhood Attention U-Net for Pixel-Wise Hyperspectral Image Classification2022-04-21