HSR-Enhanced Sparse Attention Acceleration
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated remarkable capabilities across various applications, but their performance on long-context tasks is often limited by the computational complexity of attention mechanisms. We introduce a novel approach to accelerate attention computation in LLMs, particularly for long-context scenarios. We leverage the inherent sparsity within attention mechanisms, both in conventional Softmax attention and ReLU attention (with mathsfReLUα activation, α ∈ mathbbN_+), to significantly reduce the running time complexity. Our method employs a Half-Space Reporting (HSR) data structure to identify non-zero or ``massively activated'' entries in the attention matrix. We present theoretical analyses for two key scenarios: generation decoding and prompt prefilling. Our approach achieves a running time of O(mn4/5) significantly faster than the naive approach O(mn) for generation decoding, where n is the context length, m is the query length, and d is the hidden dimension. We can also reduce the running time for prompt prefilling from O(mn) to O(mn1 - 1 / lfloor d/2rfloor + mn4/5). Our method introduces only provably negligible error for Softmax attention. This work represents a significant step towards enabling efficient long-context processing in LLMs.
Key facts. Cited by 19 papers in the map (data through 14 Oct 2026). Builds on 69 of its 98 references that are in the map. First posted on arXiv 14 Oct 2024.
Builds on
69 of 98 references.
References · 69
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2015Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classificationcited by 3,611
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2022LaMDA: Language Models for Dialog Applicationscited by 1,220
- 2023SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shotcited by 1,121
- 2022In-context Learning and Induction Headscited by 964
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 880
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
38 more
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
- 2017Self-Normalizing Neural Networkscited by 598
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 501
- 2023Benchmarking Large Language Models for News Summarizationcited by 445
- 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 393
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2024Massive Activations in Large Language Modelscited by 294
- 2022Transformer Quality in Linear Timecited by 191
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 120
- 2024Is A Picture Worth A Thousand Words? Delving Into Spatial Reasoning for Vision Language Modelscited by 113
- 2023Fast Attention Requires Bounded Entriescited by 102
- 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
- 2024Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inferencecited by 75
- 2017Continuously Differentiable Exponential Linear Unitscited by 73
- 2023Dynamic Context Pruning for Efficient and Interpretable Autoregressive Transformerscited by 67
- 2021Training Multi-Layer Over-Parametrized Neural Network in Subquadratic Timecited by 62
- 2023A Study on ReLU and Softmax in Transformercited by 53
- 2024Linearizing Large Language Modelscited by 51
- 2024Why Larger Language Models Do In-context Learning Differently?cited by 45
- 2023Replacing softmax with ReLU in Vision Transformerscited by 44
- 2023How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computationcited by 44
- 2023On Sparse Modern Hopfield Modelcited by 42
- 2021Wordcraft: a Human-AI Collaborative Editor for Story Writingcited by 41
- 2024On Computational Limits of Modern Hopfield Models: A Fine-Grained Complexity Analysiscited by 41
- 2023What can a Single Attention Layer Learn? A Study Through the Random Features Lenscited by 40
- 2024On Statistical Rates and Provably Efficient Criteria of Latent Diffusion Transformers (DiTs)cited by 40
- 2024Do Large Language Models Have Compositional Ability? An Investigation into Limitations and Scalabilitycited by 40
- 2024Discovering the Gems in Early Layers: Accelerating Long-Context LLMs with 1000x Input Token Reductioncited by 39
- 2024Uniform Memory Retrieval with Larger Capacity for Modern Hopfield Modelscited by 38
- 2024Outlier-Efficient Hopfield Layers for Large Transformer-Based Modelscited by 38
- 2023STanHop: Sparse Tandem Hopfield Model for Memory-Enhanced Time Series Predictioncited by 35
- 2021Does Preprocessing Help Training Over-parameterized Neural Networks?cited by 32
- 2024Conv-Basis: A New Paradigm for Efficient Attention Inference and Gradient Computation in Transformerscited by 32
- 2023A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Timecited by 30
- 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Modelscited by 30
- 2024Training Tensor Attention Efficiently: From Cubic to Almost Linear Timecited by 30
- 2022Robust Training of Neural Networks Using Scale Invariant Architecturescited by 29
- 2024Unraveling the Smoothness Properties of Diffusion Models: A Gaussian Mixture Perspectivecited by 24
50 most cited of 69 All 69 (JSON)
Built on by
Citing papers per year: 2024: 5; 2025: 13; 2026: 1.
19 papers.
Sort:
By area:
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descentcited by 22
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexitycited by 21
- 2025StoryBench: A Dynamic Benchmark for Evaluating Long-Term Memory with Multi Turnscited by 20
- 2025High-Order Matching for One-Step Shortcut Diffusion Modelscited by 15
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flowscited by 10
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transformcited by 9
- 2025Provable Failure of Language Models in Learning Majority Boolean Logic via Gradient Descentcited by 8
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapsecited by 7
7 more
- 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networkscited by 4
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformerscited by 4
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approachescited by 4
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?cited by 3
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decodingcited by 2
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2026Sublinear Time Quantum Algorithm for Attention Approximationcited by 1
- 2026Sublinear Time Quantum Algorithm for Attention Approximation31 Jan 2026
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025StoryBench: A Dynamic Benchmark for Evaluating Long-Term Memory with Multi Turns16 Jun 2025
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapse22 May 2025
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transform17 May 2025
- 2025Provable Failure of Language Models in Learning Majority Boolean Logic via Gradient Descent7 Apr 2025
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
- 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decoding14 Mar 2025
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flows12 Mar 2025
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approaches3 Mar 2025
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?24 Feb 2025
- 2025High-Order Matching for One-Step Shortcut Diffusion Models2 Feb 2025
7 more
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformers18 Jan 2025
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 Dec 2024
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexity9 Dec 2024
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecture12 Nov 2024
- 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networks3 Nov 2024
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descent15 Oct 2024
- 2025High-Order Matching for One-Step Shortcut Diffusion Modelscited by 15
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolationcited by 11
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flowscited by 10
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
- 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flows12 Mar 2025
- 2025High-Order Matching for One-Step Shortcut Diffusion Models2 Feb 2025
- 2025Video Latent Flow Matching: Optimal Polynomial Projections for Video Interpolation and Extrapolation1 Feb 2025
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descentcited by 22
- 2025StoryBench: A Dynamic Benchmark for Evaluating Long-Term Memory with Multi Turnscited by 20
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transformcited by 9
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapsecited by 7
- 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networkscited by 4
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approachescited by 4
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?cited by 3
- 2026Sublinear Time Quantum Algorithm for Attention Approximationcited by 1
- 2026Sublinear Time Quantum Algorithm for Attention Approximation31 Jan 2026
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025StoryBench: A Dynamic Benchmark for Evaluating Long-Term Memory with Multi Turns16 Jun 2025
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapse22 May 2025
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transform17 May 2025
- 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approaches3 Mar 2025
- 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?24 Feb 2025
- 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformers23 Dec 2024
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecture12 Nov 2024
- 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networks3 Nov 2024
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descent15 Oct 2024