Skip navigation
Almost all animals sleep. Why don’t LMs?
0:00 / 0:22

Almost all animals sleep. Why don’t LMs?

Sangyun Lee @NeurIPS2026 Atlanta

@sang_yun_lee1.9K followers

Visit on X
1,354 likesDownloadOriginal post

129,276 views

Almost all animals sleep. Why don’t LMs? Introducing our new work on language model sleep. tl;dr : A periodic, recurrent “sleep” phase allows LMs to digest their context and transfer it into their weights, improving recall and reasoning on challenging tasks.

45 Comments

Comments from the original post on X (Twitter)

  • Sangyun Lee's profile picture

    @sang_yun_lee

    Prior work on SSM-attention hybrid models introduces a weight-memory that maintains a compressed memory of past tokens, complementing short-term attention memory. This context->weight transfer is done in a single forward pass: learning happens on-the-fly. Good for latency.

    22 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    But isn’t this too good to be true? Learning a good representation of data is hard and normally requires deep sequential computation–most learning algorithms are iterative (eg gradient descent). For animals, sleep plays a major role in learning. During sleep, most external input is blocked, but the brain is still actively replaying information. We sleep for 4 to 10 hours–why so long, if we could just learn on-the-fly?

    23 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    On several symbolic and natural language reasoning tasks (cellular automaton, multi-hop graph retrieval, and GSM-Infinite), we show that hybrid models fail as reasoning requirements grow, even when the amount of information to store is held fixed. So, unlike previous belief, this is NOT due to a lack of fast weight capacity!

    21 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    Our fix is simple: to use N recurrent forward passes for learning fast weights. This gives the model enough time to learn a good representation of context. We call this process “sleep”. This is not the same as looped transformers–our model still uses a single forward pass outside the sleep phase (i.e. when the context window is not full).

    16 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    For all tasks we evaluate, we see more offline loops -> better task performance, especially the ones that require more reasoning.

    14 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    Takeaway: Effective learning takes time, so we should give the model enough time to learn. Sufficient sleep duration gives the model enough time to transform tokens into a good weight -> better retention and reasoning. Arxiv:

    25 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    The ML community has explored the idea of sleep from various angles. Replay buffers in RL, training agents on model-generated experience (eg the Dreamer series), wake-sleep algorithm, contrastive divergence, to name a few. Agentic scaffolds such as OpenClaw and Claude Code call their offline phase “Dreaming”. Tagging a few recent relevant works that explore the sleep idea from different angles: Sleep-time compute paper from Letta: There is also this prior OpenReview submission with the same title as ours (we updated ours to avoid conflict): Let us know if there are more!

    17 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    Lots of offline memory processing can be called “sleep.” I think ours maps especially directly onto the analogy: recurrent Hebbian-style weight updates, no test-time backprop, no natural-language summarization.

    12 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    We'd love to see if sleep could replace/complement the natural-language compaction currently used by Codex / Claude Code

    9 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    Huge thanks to amazing collaborators! @giuliacfanti @SeanMcleish @tomgoldsteincs

    9 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    And thank you so much to Modal for providing a compute grant to support this work. This work would have been literally impossible without your generous support! They have a really nice CLI interface, so migration to their cluster was almost zero-conflict with the help of coding agents! @charles_irl

    11 likes

  • Kai Kuspa's profile picture

    @kaikuspa

    Because they aren’t animals?

    4 likes

  • SurfingTheUniverse's profile picture

    @SurfTheUniverse

    Now add "emotions" to the context pieces to help the sleep phase "dream" on the most important things that need to be learned. First emotion could be "surprise" whenever something unexpected happens that can't be easily predicted.

    4 likes

  • emirovic 🇹🇷🍉's profile picture

    @emrshn13

    So… we finetune the models using context?

    4 likes

  • Adrian Chan's profile picture

    @gravity7

    I added your paper to my online Arxiv archive, w related research topics, concepts, & questions to your paper. It's been making the rounds!

    4 likes

  • Ben Sovocool's profile picture

    @BenSovocool

    This is really cool! I wrote something semi-related ( but as a random guy with no background in math/CS I ran out of road. I like your approach more...

    3 likes

  • wontfix's profile picture

    @DadMakingGames

    this is a fantastic paper! it reminds me of CPU memory design with L1 (Attention KV Cache), L2 (Sliding Window Attention) and L3 (Fast Weights/SSM). If I log the average activation levels of the input gate beta_t, and it is high, should I trigger a sleep to avoid thrashing?

    3 likes

  • Mateusz Michalik's profile picture

    @MudMilchek

    I like this. Simplifying a lot here, but comparing to LLMs, humans are like multi-modal dynamic models. Except we update this dynamic model for the entirety of our consciousness (not just sleep). If you think about it this way biological “compute” is just eons ahead of silicon.

    2 likes

  • generatorman's profile picture

    @generatorman_ai

    my torment nexus

    2 likes

  • TruthSeeker2700's profile picture

    @l43150

    The app LAYLA is already out and does this same function. While you sleep or have it in background it ingests your information and better stores it in long term memory. It runs most LLMs faster than any other mobile app, it beats anythingLLM. I can load larger models on android

    1 like