Hilbert-Guided Sparse Local Attention
Not on the map. Why?
Abstract (arXiv)
The quadratic compute and memory costs of global self-attention severely limit its use in high-resolution images. Local attention reduces complexity by restricting attention to neighborhoods. Block-sparse kernels can further improve the efficiency of local attention, but conventional local attention patterns often fail to deliver significant speedups because tokens within a window are not contiguous in the 1D sequence. This work proposes a novel method for constructing windows and neighborhoods based on the Hilbert curve. Image tokens are first reordered along a Hilbert curve, and windows and neighborhoods are then formed on the reordered 1D sequence. From a block-sparse perspective, this strategy significantly increases block sparsity and can be combined with existing block-sparse kernels to improve the efficiency of 2D local attention. Experiments show that the proposed Hilbert Window Attention and Hilbert Slide Attention can accelerate window attention and slide attention by about 4× and 18×, respectively. To assess practicality, the strategy is instantiated as the Hilbert Window Transformer and the Hilbert Neighborhood Transformer, both of which achieve end-to-end speedups with minimal accuracy loss. Overall, combining Hilbert-guided local attention with block-sparse kernels offers a general and practical approach to enhancing the efficiency of 2D local attention for images.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 24 of its 31 references that are in the map. First posted on arXiv 8 Nov 2025.
Builds on
24 of 31 references.
References · 24
- 2017Attention Is All You Needcited by 60,361
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2021Swin Transformer V2: Scaling Up Capacity and Resolutioncited by 1,228
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2019Stand-Alone Self-Attention in Vision Modelscited by 542
- 2021CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windowscited by 527
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
- 2022MaxViT: Multi-Axis Vision Transformercited by 476
12 more
- 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 407
- 2021Focal Self-attention for Local-Global Interactions in Vision Transformerscited by 288
- 2021Scaling Local Self-Attention for Parameter Efficient Visual Backbonescited by 220
- 2024Flex Attention: A Programming Model for Generating Optimized Attention Kernelscited by 185
- 2024SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Accelerationcited by 160
- 2025XAttention: Block Sparse Attention with Antidiagonal Scoringcited by 137
- 2021RegionViT: Regional-to-Local Attention for Vision Transformerscited by 127
- 2023Slide-Transformer: Hierarchical Vision Transformer with Local Self-Attentioncited by 38
- 2025Generalized Neighborhood Attention: Multi-dimensional Sparse Attention at the Speed of Lightcited by 18
- 2024Faster Neighborhood Attention: Reducing the O(n^2) Cost of Self Attention at the Threadblock Levelcited by 14
- 2021SimViT: Exploring a Simple Vision Transformer with sliding windowscited by 8
Built on by
Citing papers per year: 2026: 1.
1 paper.