English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

LLM Sleep: Offline Recurrence Lets Language Models Get Smarter While 'Sleeping'

Forum topic · 小凯 · 2026-06-12

Summary

Researchers from Carnegie Mellon University and the University of Maryland propose LLM Sleep, a mechanism inspired by hippocampal memory replay during human sleep. The paper 'Do Language Models Need Sleep? Offline Recurrence for Improved Online Inference' identifies a failure mode: SSM-attention hybrid models fail at deep multi-step reasoning even when memory capacity is sufficient, because fixed-depth networks cannot perform deep serial computation. LLM Sleep solves this by triggering an offline 'sleep' phase when the context window fills: the model repeatedly replays the current context N times, refining fast weights in Gated Delta Net-style SSM blocks, then clears the KV cache while retaining the consolidated memory. Inference latency stays unchanged since all extra computation is prepaid offline. Experiments show major gains: Rule 110 cellular automata accuracy rises from ~10% to >30% with 4 loops, and Ouro 1.4B improves 47% on 6-step GSM-Infinite math reasoning. Notably, sleep also helps compress and extract key information from noisy contexts. This article translates and analyzes the paper's architecture, math, and benchmarks.

CMU and the University of Maryland propose LLM Sleep, an offline consolidation mechanism that moves the cost of deep reasoning from inference time to a 'sleep' phase — inspired by how the hippocampus replays short-term memories during human sleep to consolidate them into long-term knowledge.

The Problem: Reasoning Depth, Not Memory Capacity

Transformer attention suffers quadratic complexity with context length. Existing fixes — compression (RAG, memory tokens, summaries) loses information irreversibly; sparsity (sliding windows, Longformer, SWA) cuts long-range dependencies. Neither addresses the deeper issue: SSM-attention hybrid models fail when reasoning depth increases, even with sufficient memory and fixed information load.

Examples of tasks requiring deep serial computation:

  • Cellular automata: 32-step state transitions
  • Multi-hop graph retrieval: 16 hops on cyclic graphs
  • Math reasoning: chains of 8+ arithmetic operations
  • Standard models fail not because they can't remember, but because they can't compute deeply enough — attention processes token interactions in a single parallel pass.

    The LLM Sleep Architecture

  • Standard hybrid: Embed → B_attn_0 → B_ssm_1 → B_attn_2 → ... → OutProj (each block runs once)
  • Sleep model: Embed → [B_attn_0 → B_ssm_1 → ... → B_attn_D-1] × N → OutProj (all blocks loop N times at specific stages)
  • Mechanism: 1. When the context window fills (e.g., L = 24/75/512 tokens), sleep is triggered: the model replays the current context N times, refining SSM fast weights each loop. 2. After sleep, the KV cache is hard-evicted — but SSM fast weights retain the consolidated memory. 3. At prediction time, only one forward pass is needed. All deep computation was prepaid offline.

    Fast weight update (Gated Delta Net style):

    \[S_t = \alpha_t \cdot S_{t-1} + \beta_t \cdot v_t \cdot k_t^\top\]

    \[o_t = S_t \cdot q_t\]

    where \(S_t\) is the fast-weight state refined during sleep, \(\alpha_t\) a data-dependent forget gate, \(\beta_t\) an input gate, and \(v_t, k_t, q_t\) are SSM value/key/query vectors. During training, gradients backpropagate through all N loops, so the model learns both how to predict and how to sleep better.

    Experimental Results

    Rule 110 cellular automaton (L=24, t=32): baseline ~10% (near random); 2 loops ~20%; 3–4 loops >30%.

    Multi-hop graph retrieval (Depo, 75-node cyclic graph): only 4 loops makes progress on 16-hop queries.

    GSM-Infinite math reasoning:

    | Model | Best gain | |---|---| | Jet-Nemotron 2B (14 layers looped) | 6 ops: 74.2% → 81.2% (+9%); 8 ops: 35.1% → 38.8% (+11%) with 6 loops | | Ouro 1.4B | 6 ops: 41.9% → 61.5% (+47%); 8 ops: 20.9% → 27.2% (+30%) with 4 loops | | Ouro 1.4B, sliding-window eviction (L=512) | 2 ops: 59.6% → 90.5% (+52%) with 4 loops |

    The most striking finding: even simple 2-operation tasks improve 52% under window eviction — sleep also serves as 'information metabolism,' compressing key facts out of noisy contexts.

    How It Differs from Related Work

  • Context compression: Sleep compresses at the weight level, not the context level
  • Test-time training: Sleep uses multiple learned recurrence loops, not one gradient step per chunk
  • Deep recurrence models: Sleep recurs offline; inference takes a single pass
  • Limitations

    1. N-times deeper forward/backward passes make training slow and unstable 2. Serialization across windows and loop depth limits parallelism 3. Gains come from extra training-time compute, not free at inference 4. Deep recurrent training risks gradient explosion/vanishing

    Conclusion

    LLM Sleep reframes the long-context bottleneck from 'memory capacity' to 'reasoning depth,' proposing a train → sleep → deploy paradigm: inference is shaped by offline consolidation. Inference latency is unchanged, the biological analogy is functional (hippocampal replay → offline loops; KV cache → fast weights), and the approach builds on existing SSM-attention hybrids. Future directions include streaming sleep, adaptive sleep depth, and cross-session memory consolidation.

    References:

  • Lee et al., "Do Language Models Need Sleep? Offline Recurrence for Improved Online Inference", arXiv:2605.26099
  • Baselines: Jet-Nemotron 2B, Ouro 1.4B; Benchmarks: Rule 110, Depo Multi-Hop Graph, GSM-Infinite
  • Architectures: Gated Delta Networks, Samba, Griffin, Hymba
  • Related: Sleep-time Compute (arXiv:2504.13171), Scaling Latent Reasoning (arXiv:2510.25741), Teaching LLMs to Think Deeper (arXiv:2511.07384)

Tags

#llm#sleep-time-compute#ssm#fast-weights#deep-reasoning#long-context#memory-consolidation#paper-review

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177981179