Sliding-window beats linear attention
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Due to the nature of quadratic attention, Large Language Models (LLMs) consume a lot of memory and energy: every new token costs more than the previous one, and its keys and values must be stored in memory indefinitely, which is unsustainable. Two main lines of work address this: compressing the KV cache, e.g., by evicting or quantizing keys and values, and retrofitting LLMs to use Linear Attention, which replaces the KV cache with a fixed-size state. Retrofitting has attracted a lot of attention, given its promise to solve the quadratic scaling problem with state-of-the-art performance at low cost. However, it has not been properly compared to the simplest form of KV-cache eviction: Sliding Window Attention (SWA) with attention sinks. In this work, we show that SWA with sinks performs as well or better than most retrofitted Linear Attention models across multiple LLMs and downstream tasks, with the largest gains on long-context and generative tasks. On long-context reasoning tasks (Needle-in-a-Haystack and BABILong), SWA achieves massively higher performance (2 to 10 times higher than linear attention). SWA requires no additional training, is extremely fast, and requires little memory, making it an extremely cheap and reliable solution. When the training budget is limited, switching to SWA is a much more effective way to reduce inference memory cost than retrofitting linear attention. Linear attention models have shown promise, but they require training from scratch or extensive retrofitting to reap their architectural benefits and come close to SWA.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 64 of its 67 references that are in the map. First posted on arXiv 28 Aug 2026.
Builds on
64 of 67 references.
Closest ancestors · 5
Same direction, newest first
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference16 Jun
- 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May
Other references · 59
- 2017Attention Is All You Needcited by 60,361
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2025Qwen3 Technical Reportcited by 8,820
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
38 more
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2022Video Diffusion Modelscited by 2,305
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2023VBench: Comprehensive Benchmark Suite for Video Generative Modelscited by 1,822
- 2024HunyuanVideo: A Systematic Framework For Large Video Generative Modelscited by 1,660
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,386
- 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
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
- 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
- 2024Phi-4 Technical Reportcited by 711
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2023Textbooks Are All You Need II: phi-1.5 technical reportcited by 565
- 2017Understanding the Effective Receptive Field in Deep Convolutional Neural Networkscited by 553
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 379
- 2015Towards AI-Complete Question Answering: A Set of Prerequisite Toy Taskscited by 314
- 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 242
- 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 215
- 2022cosFormer: Rethinking Softmax in Attentioncited by 213
- 2024Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrencecited by 159
- 2025Phi-4-reasoning Technical Reportcited by 151
- 2025RWKV-7 "Goose" with Expressive Dynamic State Evolutioncited by 141
- 2025Fast Video Generation with Sliding Tile Attentioncited by 128
- 2025Why do LLMs attend to the first token?cited by 127
- 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Modelscited by 122
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 120
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 67
- 2024Linearizing Large Language Modelscited by 51
- 2025Phi-4-Mini-Reasoning: Exploring the Limits of Small Reasoning Language Models in Mathcited by 44
50 most cited of 59 All 59 (JSON)
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Retrospective Sparse Attention for Efficient Long-Context Generation
- 2024Simple linear attention language models balance the recall-throughput tradeoff
- 2025Progressive Sparse Attention: Algorithm and System Co-design for Efficient Attention in LLM Serving
- 2026ART: Attention Run-time Termination for Efficient Large Language Model Decoding
- 2026MKA: Memory-Keyed Attention for Efficient Long-Context Reasoning
- 2025LLMs Know What to Drop: Self-Attention Guided KV Cache Eviction for Efficient Long-Context Inference
- 2025KVSink: Understanding and Enhancing the Preservation of Attention Sinks in KV Cache Quantization for LLMs
- 2024Beyond KV Caching: Shared Attention for Efficient LLMs