Short window attention enables long-term memorization
Not on the map. Why?
Abstract (arXiv)
Recent works show that hybrid architectures combining local sliding window attention layers and global attention layers outperform either of these architectures taken separately. However, the impact of the window length and the interplay between local layers and global layers remain under-studied. In this work, we first analyze the interaction between short and long term memory by considering SWAX: a hybrid architecture consisting of sliding-window attention and xLSTM linear RNN layers. A counter-intuitive finding is that larger sliding windows hurts the long-context performance. In fact, short window attention encourages the model to better train the long-term memory of the xLSTM as it cannot rely on the local softmax attention mechanism for long context-retrieval. We also validate our findings on local-global architectures alternating short window and full attention layers: the short layers should be small in order not to hinder the usefulness of the long layers. However, employing too small sliding windows is detrimental even for short-context tasks, which could be solved with information from moderately larger sliding windows otherwise. Therefore, we train hybrid architectures by stochastically changing the sliding window size, forcing the model to leverage both the short term window and the long-term memory. Training with stochastic window sizes significantly outperforms regular window attention both on short and long-context problems.
Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Builds on 38 of its 53 references that are in the map. First posted on arXiv 29 Sep 2025.
Builds on
38 of 53 references.
References · 38
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2016Layer Normalizationcited by 5,669
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2014Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modelingcited by 2,367
26 more
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2019Root Mean Square Layer Normalizationcited by 1,480
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2017Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learningcited by 950
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 861
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 499
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 379
- 2021Pay Attention to MLPscited by 368
- 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
- 2015Towards AI-Complete Question Answering: A Set of Prerequisite Toy Taskscited by 314
- 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 215
- 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 208
- 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 174
- 2025Nemotron-H: A Family of Accurate and Efficient Hybrid Mamba-Transformer Modelscited by 100
- 2024What is Wrong with Perplexity for Long-context Language Modeling?cited by 69
- 2025A Systematic Analysis of Hybrid Linear Attentioncited by 39
- 2025Understanding Transformer from the Perspective of Associative Memorycited by 34
- 2025Understanding and Improving Length Generalization in Recurrent Modelscited by 23
- 2025xLSTM 7B: A Recurrent LLM for Fast and Efficient Inferencecited by 18
- 2025Tiled Flash Linear Attention: More Efficient Linear RNN and xLSTM Kernelscited by 13
- 2025Memory Mosaics at scalecited by 5
Built on by
Citing papers per year: 2025: 1; 2026: 10.
11 papers.
- 2026Mamba-3: Improved Sequence Modeling using State Space Principlescited by 89
- 2026Sparse Delta Memory: Scaling the State of Linear RNNs through Sparsitycited by 9
- 2026Nearly Optimal Attention Coresetscited by 4
- 2025Alleviating Forgetfulness of Linear Attention by Hybrid Sparse Attention and Contextualized Learnable Token Evictioncited by 3
- 2026Effective Distillation to Hybrid xLSTM Architecturescited by 3
- 2026MARCH: Scaling Recurrent Memory with Content-Routed State Anchorscited by 2
- 2026Sliding-window beats linear attentioncited by 2
- 2026Safin-1: Safety from Within through Memory-Native State Evolutioncited by 1
- 2026Do Language Models Need Sleep? Offline Recurrence for Improved Online Inferencecited by 0
- 2026The Token Before the Value Is the Key: How Hybrid Architectures Organize Induction Circuitscited by 0
- 2026TraceRelay: Attention-Aligned Recurrence over Rolling Tracescited by 0
- 2026TraceRelay: Attention-Aligned Recurrence over Rolling Traces8 Oct 2026
- 2026The Token Before the Value Is the Key: How Hybrid Architectures Organize Induction Circuits14 Sep 2026
- 2026Safin-1: Safety from Within through Memory-Native State Evolution31 Aug 2026
- 2026Sliding-window beats linear attention28 Aug 2026
- 2026MARCH: Scaling Recurrent Memory with Content-Routed State Anchors12 Aug 2026
- 2026Sparse Delta Memory: Scaling the State of Linear RNNs through Sparsity8 Jul 2026
- 2026Do Language Models Need Sleep? Offline Recurrence for Improved Online Inference25 May 2026
- 2026Nearly Optimal Attention Coresets7 May 2026
- 2026Effective Distillation to Hybrid xLSTM Architectures16 Mar 2026
- 2026Mamba-3: Improved Sequence Modeling using State Space Principles16 Mar 2026
- 2025Alleviating Forgetfulness of Linear Attention by Hybrid Sparse Attention and Contextualized Learnable Token Eviction23 Oct 2025