Do Language Models Need Sleep? Offline Recurrence for Improved Online Inference
Not on the map. Why?
Abstract (arXiv)
Transformer-based large language models are increasingly used for long-horizon tasks; however, their attention mechanism scales poorly with context length. To handle this, we study a sleep-like consolidation mechanism in which a model periodically converts recent context into persistent fast weights before clearing its key-value cache. During sleep, the model performs N offline recurrent passes over the accumulated context and updates the fast weights in its state-space model (SSM) blocks through a learned local rule. During inference, this shifts extra computation to sleep while preserving the latency of wake-time prediction. We test our method on controlled synthetic tasks, including cellular automata and multi-hop graph retrieval, as well as a realistic math reasoning task, on which a regular transformer as well as SSM-attention hybrid models fail. We then show that increasing sleep duration N for our models improves performance, with the largest gains on examples that require deeper reasoning.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 50 of its 66 references that are in the map. First posted on arXiv 25 May 2026.
Builds on
50 of 66 references.
References · 50
- 2017Attention Is All You Needcited by 60,361
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2019Dream to Control: Learning Behaviors by Latent Imaginationcited by 1,653
- 2018World Modelscited by 1,513
- 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
- 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,055
- 2018Universal Transformerscited by 647
- 2019Deep Equilibrium Modelscited by 615
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
38 more
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
- 2016Adaptive Computation Time for Recurrent Neural Networkscited by 506
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 415
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
- 2022Transformers Learn Shortcuts to Automatacited by 268
- 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 242
- 2019Depth-Adaptive Transformercited by 236
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 216
- 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 208
- 2023In-context Autoencoder for Context Compression in a Large Language Modelcited by 199
- 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 174
- 2025Scaling Latent Reasoning via Looped Language Modelscited by 165
- 2022Learning by Distilling Contextcited by 138
- 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Modelscited by 122
- 2021Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networkscited by 117
- 2025NVIDIA Nemotron Nano 2: An Accurate and Efficient Hybrid Mamba-Transformer Reasoning Modelcited by 108
- 2024Hymba: A Hybrid-head Architecture for Small Language Modelscited by 99
- 2025Cartridges: Lightweight and general-purpose long context representations via self-studycited by 86
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 67
- 2025End-to-End Test-Time Training for Long Contextcited by 62
- 2026Parcae: Scaling Laws For Stable Looped Language Modelscited by 55
- 2025A Little Depth Goes a Long Way: The Expressive Power of Log-Depth Transformerscited by 53
- 2025Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrencecited by 47
- 2025Sleep-time Compute: Beyond Inference Scaling at Test-timecited by 43
- 2025Jet-Nemotron: Efficient Language Model with Post Neural Architecture Searchcited by 41
- 2024Online Adaptation of Language Models with a Memory of Amortized Contextscited by 35
- 2025Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layerscited by 33
- 2024Generative Adapter: Contextualizing Language Models in Parameters with A Single Forward Passcited by 26
- 2025Training Plug-n-Play Knowledge Modules with Deep Context Distillationcited by 24
- 2026How Much Is One Recurrence Worth? Iso-Depth Scaling Laws for Looped Language Modelscited by 24
- 2025InfiniteICL: Breaking the Limit of Context Window Size via Long Short-term Memory Transformationcited by 17
- 2025The Serial Scaling Hypothesiscited by 13
- 2025Short window attention enables long-term memorizationcited by 11
- 2025Deep sequence models tend to memorize geometrically; it is unclear whycited by 9
- 2026Learning from Synthetic Data Improves Multi-hop Reasoningcited by 6
- 2022Meta-Reinforcement Learning with Self-Modifying Networkscited by 4
- 2026Training Large Reasoning Models Efficiently via Progressive Thought Encodingcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Learning to Forget: Sleep-Inspired Memory Consolidation for Resolving Proactive Interference in Large Language Models
- 2026Language Models Need Sleep: Learning to Self-Modify and Consolidate Memories
- 2026TransMem: Transforming Hidden States into Memory for Large Language Models
- 2025Beyond Memorization: Extending Reasoning Depth with Recurrence, Memory and Test-Time Compute Scaling
- 2026A Mechanistic Analysis of Looped Reasoning Language Models
- 2025Overflow Prevention Enhances Long-Context Recurrent LLMs
- 2026PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning
- 2026Attention Routing Stabilizes Early: Working-Set Inference for Recurrent Language Models