Language Models Need Sleep
Sangyun Lee, Sean McLeish, Tom Goldstein, Giulia Fanti
NeurIPS page · Open on the map
Category: Interpretability & Model Adaptation › Transformer Length and Memory Scaling · Type: new method · Keywords: language model scaling, sleep consolidation, state-space model, long-horizon reasoning, efficient inference
Areas: LLM Reasoning › Efficient Reasoning › Sparse Attention; Memory › Memory mechanisms › State-Space Memory; Long Context › Long-context mechanisms › State space models for long sequences; Model Architectures & Sequence Modeling › Language Model Architectures › Long-Context Memory
Summary
The paper proposes a sleep-like consolidation mechanism that uses offline recurrent passes to update fast weights in state-space model blocks, enabling efficient long-horizon reasoning for language models.
Explained to a 5-year-old
Big computer brains called language models have trouble remembering long stories. To help them, we let them take a nap after learning something. During the nap, they quietly practice the story many times and store the practice in a special place. This makes the brain faster when it wakes up and answers questions. Now they can think about longer stories without getting confused.
Explained to a 5-year-old, longer
Imagine a big robot brain that reads many words and tries to answer questions about them. When it reads a lot, it gets tired and can't remember everything well. Scientists noticed this problem and thought of a new idea. They said the robot should take a short break after learning something. While it rests, the robot thinks about what it learned again and again. This practice helps it store the information in a quick-access memory. When the robot wakes up, it can answer questions faster because the important parts are already ready. The more times it practices during the break, the better it gets at hard problems. This works especially well for questions that need many steps to solve. The robot can now handle longer stories without getting confused. It also uses less computer power while doing this. This makes it possible to use the robot for bigger tasks without waiting too long.
For a technical reader
The paper addresses the quadratic scaling of transformer attention with context length by introducing a sleep-phase consolidation step. During sleep, the model runs offline recurrent passes over its accumulated context and updates fast weights in its state-space model blocks using a learned local rule. This offloads extra computation to a background phase, keeping inference latency unchanged while improving reasoning depth. Experiments on synthetic tasks and a math-reasoning benchmark show that longer sleep durations yield better performance, especially on multi-step problems. The approach offers a way to scale language models to longer horizons without redesigning the core attention mechanism.
Problem
Large language models struggle with long-horizon tasks because their attention scales poorly with context length, making it costly to retain and process long contexts during inference.
Method
The approach performs offline recurrent passes over accumulated context and updates fast weights in state-space model blocks via a learned local rule, shifting extra computation to a background phase while preserving wake-time latency.
Results
The approach outperforms regular transformers and SSM-attention hybrids on synthetic and math reasoning tasks, with performance improving as the sleep duration N increases, especially on deeper reasoning examples.
Contributions
It introduces a sleep-like consolidation mechanism that leverages offline recurrent passes to update fast weights, enabling efficient long-horizon reasoning without sacrificing inference latency.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction