Accelerating Prefilling via Decoding-time Contribution Sparsity
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) incur quadratic attention complexity with input length, creating a major time bottleneck in the prefilling stage. Existing acceleration methods largely exploit attention score sparsity by estimating blocks with high attention scores and applying dynamic sparse attention. In this work, we identify another untapped form of sparsity in the prefilling stage, namely decoding-time contribution sparsity, where many attention blocks exhibit nontrivial attention scores during prefilling yet contribute negligibly to subsequent decoding, as indicated by gradient-based analysis. Building on this observation, we propose TriangleMix, a training-free static attention pattern that uses dense attention in a subset of layers and switches to Triangle attention in the others. Extensive experiments show that TriangleMix preserves nearly lossless performance relative to dense attention while substantially reducing attention overhead in Triangle layers. For 128K inputs, Triangle attention achieves a 15.3x speedup in attention computation, significantly exceeding the acceleration of typical dynamic sparse methods (1.9x to 3.4x). Furthermore, TriangleMix can be seamlessly combined with dynamic sparsity approaches, delivering an additional 6% to 19% reduction in TTFT over using dynamic sparsity alone. Our code is released at https://aka.ms/TriangleMix.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 18 of its 24 references that are in the map. First posted on arXiv 29 Jul 2025.
Builds on
18 of 24 references.
References · 18
- 2017Attention Is All You Needcited by 60,361
- 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
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 880
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 501
6 more
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 383
- 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 288
- 2025XAttention: Block Sparse Attention with Antidiagonal Scoringcited by 137
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 123
- 2024Retrieval Augmented Generation (RAG) and Beyond: A Comprehensive Survey on How to Make your LLMs use External Data More Wiselycited by 66
- 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methodscited by 60
Built on by
Citing papers per year: 2025: 1; 2026: 4.
5 papers.
- 2026Attention Sink in Transformers: A Survey on Utilization, Interpretation, and Mitigationcited by 11
- 2026Elastic Attention: Test-time Adaptive Sparsity Ratios for Efficient Transformerscited by 5
- 2025ShadowNPU: System and Algorithm Co-design for NPU-Centric On-Device LLM Inferencecited by 4
- 2026S2O: Early Stopping for Sparse Attention via Online Permutationcited by 1
- 2026Flux Attention: Context-Aware Hybrid Attention for Efficient LLMs Inferencecited by 0
- 2026Attention Sink in Transformers: A Survey on Utilization, Interpretation, and Mitigation11 Apr 2026
- 2026Flux Attention: Context-Aware Hybrid Attention for Efficient LLMs Inference8 Apr 2026
- 2026S2O: Early Stopping for Sparse Attention via Online Permutation26 Feb 2026
- 2026Elastic Attention: Test-time Adaptive Sparsity Ratios for Efficient Transformers24 Jan 2026
- 2025ShadowNPU: System and Algorithm Co-design for NPU-Centric On-Device LLM Inference22 Aug 2025