mlsanityData to 26 Nov 2026

Fast and Exact Relative-Position Attention via Structure-Aware Kernels

arXiv 2611.01182 ↗Submitted 31 Oct 2026cs.LG cs.DCcited by 0

Not on the map. Why?

Abstract (arXiv)

Relative-position attention mechanisms offer compelling alternatives to RoPE across various transformer architectures, delivering superior performance in domains such as audio. These mechanisms typically modify attention scores by adding content-position or bias-position terms. Unlike RoPE, which encodes position via per-token rotations directly on the queries and keys, relative-position terms generally require pairwise offset-dependent computation or lookups, complicating their integration into fused attention kernels and introducing severe memory, bandwidth, and compute overheads as sequences scale. To address this bottleneck, we propose an exact attention algorithm that incorporates additive relative-position terms into FlashAttention-style tiled computation. Our method (1) uses offset-aware tiling to avoid redundant indexing and memory accesses, (2) computes only the necessary key/query-relation products and reuses them across token pairs in both forward and backward passes, and (3) uses offset-based gradient sharding and aggregation, eliminating atomic contention. We provide a unified, efficient Triton implementation across diverse relative-position attention mechanisms and evaluate it against naive and specialized implementations. For 8K-token sequences, our method speeds up the forward (backward) pass by 1.8-6.4× (2.0-21×) and reduces peak memory up to 2.9-128× (1.4-54×) over the strongest baseline for each mechanism, enabling long-context end-to-end transcription that is 1.8× faster and uses 2.4× less memory. Our method thus provides a drop-in, hardware-efficient solution for scaling relative-position attention transformers.

Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 39 of its 61 references that are in the map. Submitted 31 Oct 2026.

Builds on

39 of 61 references.

References · 39

  1. 2017Attention Is All You Needcited by 62,125
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,866
  3. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 5,133
  4. 2022Robust Speech Recognition via Large-Scale Weak Supervisioncited by 4,833
  5. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,893
  6. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,787
  7. 2020Conformer: Convolution-augmented Transformer for Speech Recognitioncited by 2,321
  8. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,238
  9. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,932
  10. 2021DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharingcited by 1,333
  11. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,166
  12. 2018Self-Attention with Relative Position Representationscited by 1,163
27 more
  1. 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 634
  2. 2025Phi-4-Mini Technical Report: Compact yet Powerful Multimodal Language Models via Mixture-of-LoRAscited by 613
  3. 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 611
  4. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 348
  5. 2025FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Servingcited by 330
  6. 2019NeMo: a toolkit for building AI applications using Neural Modulescited by 286
  7. 2018TED-LIUM 3: twice as much data and corpus repartition for experiments on speaker adaptationcited by 271
  8. 2023Seamless: Multilingual Expressive and Streaming Speech Translationcited by 248
  9. 2018Music Transformercited by 226
  10. 2021Rethinking and Improving Relative Position Encoding for Vision Transformercited by 208
  11. 2023Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognitioncited by 184
  12. 2018Online normalizer calculation for softmaxcited by 182
  13. 2019BIGPATENT: A Large-Scale Dataset for Abstractive and Coherent Summarizationcited by 163
  14. 2026FlashAttention-4: Algorithm and Kernel Pipelining Co-Design for Asymmetric Hardware Scalingcited by 99
  15. 2023Efficient Sequence Transduction by Jointly Predicting Tokens and Durationscited by 84
  16. 2025Canary-1B-v2 & Parakeet-TDT-0.6B-v3: Efficient and High-Performance Models for Multilingual ASR and ASTcited by 80
  17. 2021Stable, Fast and Accurate: Kernelized Attention with Relative Positional Encodingcited by 52
  18. 2025Open ASR Leaderboard: Towards Reproducible and Transparent Multilingual and Long-Form Speech Recognition Evaluationcited by 43
  19. 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalizationcited by 41
  20. 2021Relative Positional Encoding for Transformers with Linear Complexitycited by 39
  21. 2022LSG Attention: Extrapolation of pretrained Transformers to long sequencescited by 18
  22. 2025FlashBias: Fast Computation of Attention with Biascited by 14
  23. 2025AttentionEngine: A Versatile Framework for Efficient Attention Mechanisms on Diverse Hardware Platformscited by 5
  24. 2025Benchmarking Rotary Position Embeddings for Automatic Speech Recognitioncited by 2
  25. 2025Flashlight: PyTorch Compiler Extensions to Accelerate Attention Variantscited by 2
  26. 2026Rank-Factorized Implicit Neural Bias: Scaling Super-Resolution Transformer with FlashAttentioncited by 2
  27. 2026FLASHSWIN: Unlocking Large Windows and Dense Tokens in Swin Vision Transformers with Memory Efficient Attentioncited by 1

Built on by

Not cited yet.