Language Models Need Sleep

(arxiv.org)

95 points | by juxtapose 1 hour ago

13 comments

  • pcrh 1 hour ago
    I can't pretend to understand how LLMs work, but I can be sure that anthropomorphizing their functions is not helpful to an objective debate over their abilities.

    Does a motor vehicle get "sleep" when it is serviced? When I reboot a computer, is that equivalent to a nap?

    • djeastm 58 minutes ago
      They provide an explanation for using the term "sleep":

      > In animals, the transfer from short-term memory to long-term memory is thought to be supported by hippocampal replay [33], especially during sleep [41]; in this phase, short-term hippocampal memories are reactivated and consolidated into cortical synaptic weights. Sleep makes animals unable to respond to external stimuli, suggesting that it must provide enough cognitive benefit to justify this cost [41]. Inspired by these biological processes, we propose a method for transferring context-window memory into persistent weights. When the model’s context window becomes full during inference, the model enters a “sleep” in which it performs multiple forward passes over the accumulated context and recursively updates its fast weights via a learned local rule. As in animal sleep, the model receives no external input tokens during this phase. After consolidation, the context window is cleared, and the model resumes operation with updated fast weights. During training, the model is optimized end-to-end by backpropagating through the entire process to maximize task performance after sleep.

      • pcrh 53 minutes ago
        The function of sleep in animals is largely obscure.

        One thing we do know for certain is that it is necessary, it is needed in "dumb" animals as well as in you and I. If an animal can't sleep it will eventually die.

        I don't think that applies to the activity described in the OP. Does their LLM "die" if it can't perform the function described?

        • libria 0 minutes ago
          Is a volcano described as dormant (dormire, literally sleep) also inaccurate and deeply problematic? BTW, it's not anthropomorphized as sleep has existed long before humans.

          "Sleep" is just used in their context to describe a non-interactive mode and they didn't lean heavily into zoomorphic - I think you mean - parallels.

          You're grinding an axe on a single term. What is your broader hangup with them using the term "sleep"?

          > Does their LLM "die" if it can't perform the function described?

          We're reaching an age where LMGTFY should now be Let Me LLM That For You. Have you tried asking an LLM this question about the article? I believe it answers it very well.

        • sillysaurusx 24 minutes ago
          > If an animal can't sleep it will eventually die.

          That turns out to be un-settled science. No human has ever died from lack of sleep.

          People point to “fatal familial insomnia” as a counterexample. But they die to the disease, not the lack of sleep.

          In a series of controlled experiments, rats and fruit flies did die from lack of sleep. But no one has yet proven that it holds true for vertebrates except for rats.

          In other words, it could be true that “among vertebrates, only rats die of sleep deprivation.”

          So “if an animal can’t sleep, it will eventually die” is actually quite hard to prove, and depending on how you look at it, somewhat easy to disprove by the fact that rats and fruit flies were so difficult to kill from sleep depravation alone.

          Personally I’m skeptical of the rat study too. Claude amends this:

          > What they did not establish: the mechanism. On autopsy, “no anatomical cause of death was identified.” The rats showed weight loss despite eating more, body temperature problems, and skin lesions, but nothing that pointed to a clean cause. So no, they could not say a rat “died from sleep deprivation alone” in the sense of identifying what sleep loss did to the body to kill it. They showed a strong association under tight controls, not a proven causal pathway.

          • dijit 17 minutes ago
            > No human has ever died from lack of sleep.

            As far as I understand it, there is a disease that destroys your brain's ability to produce sleep. Once you have it, you suffer total, progressive insomnia and die within roughly 6–18 months. Scientists debate whether it's the underlying brain damage or the sleeplessness itself that causes death, but the two are inseparable in practice, and sleep deprivation is considered the leading candidate.

            Separately, the longest anyone has stayed awake under controlled conditions was 11 days, which produced severe cognitive impairment, paranoia, and hallucinations; suggesting the body deteriorates rapidly without sleep.

            It's probably not wise to state your original claim as established fact.

            • sillysaurusx 14 minutes ago
              My second paragraph addresses that:

              > People point to “fatal familial insomnia” as a counterexample. But they die to the disease, not the lack of sleep.

              It’s a prion disease. It’s established fact that they don’t die from the lack of sleep.

              • dijit 12 minutes ago
                Interesting that the scientific debate is settled, because you said so. Researchers who study prion diseases would probably be surprised to hear it.
                • sillysaurusx 9 minutes ago
                  Huh? Ask Claude or do some research on the topic if you don’t believe me. A prion disease killing you has nothing whatsoever to do with the lack of sleep. The insomnia is a side effect, not the cause.

                  Jeez. People here are really stretching to defend their false “we die without sleep” claim.

          • burnte 16 minutes ago
            HIV doesn't kill you, but it creates circumstances where other things will. Sleep is the same. You may not die from lack of sleep, but you die from the things it can cause. Effectively there's no difference.
            • sillysaurusx 11 minutes ago
              I’m shocked by how careless everyone here is about their definitions, and their science. Sleep isn’t the same as HIV. It’s in fact so hard to kill something with a lack of sleep that it’s never once been observed in vertebrates outside of one specific rat study, and that rat study couldn’t conclusively identify sleep as the cause of death.

              For something so incredibly difficult to do (die from lack of sleep) it’s frankly crazy that most people here are saying it like it’s fact.

              • nkmnz 3 minutes ago
                I'd probably kill myself after a couple of days without sleep. Would the lack of sleep be the cause of death or the cause of the cause of death?
          • refulgentis 11 minutes ago
            It’s a bunch of Claude blather, and I love Claude. Just not worth copying over to HN, because the rush to get to a narrow answer to a narrow question elides the meaningful bits, ex. what does happen during sleep deprivation. Has a “not even wrong” air simply because you’re trying to get to true/false on a narrow question then pushing your research assistant to disavow what you’re quote unquote “skeptical” of.
            • sillysaurusx 7 minutes ago
              This is little more than a fancy way of saying “Nu uh.” Such arguments are hardly convincing.
          • ambicapter 20 minutes ago
            So? You don't need a proven causal pathway to state that a glass heads towards the ground every time you brush it off a table.
            • sillysaurusx 17 minutes ago
              Scientifically you do, otherwise you can’t claim that lack of sleep was the cause of death. It could be an artifact of how the experiment was run, or any number of other factors.

              It’s not a small quibble to point out that the central argument (“animals need sleep or they’ll die”) may be mistaken.

        • Windchaser 40 minutes ago
          I don't think it's necessarily correct to think of sleep in terms of "it is necessary for animals or they will die". It might be more useful to think of it as "it was so useful that animals who slept outcompeted all the animals who didn't".

          Meaning: it might just provide a big advantage.

          I don't want to overextend and assume that any advantage extends to LLMs. That rest-and-recuperate advantage might also extend to LLM-based AIs. Or maybe not, and the rest-and-recuperate is mainly useful for biology-based organisms. But there is some logic to it.

          > The function of sleep in animals is largely obscure.

          In my understanding, it's well-understood that sleep is used to consolidate and store long-term memories (amongst other functions, like cell and muscle repair). They've found this memory-consolidation-during-sleep even in relatively simple animals like bees.

          • palmotea 28 minutes ago
            > I don't think it's necessarily correct to think of sleep in terms of "it is necessary for animals or they will die". It might be more useful to think of it as "it was so useful that animals who slept outcompeted all the animals who didn't".

            You're talking about different things: biological necessity and evolutionary benefit.

            You can find out about the former by preventing an animal from sleeping (but otherwise provide all other needed things), and seeing if it will eventually die.

            • sillysaurusx 22 minutes ago
              > You can find out about the former by preventing an animal from sleeping (but otherwise provide all other needed things), and seeing if it will eventually die.

              That is actually almost impossible to do. The rat study was as close as we’ve ever come, and it’s still debated whether the rats died due to lack of sleep or some other mechanism, since the autopsy couldn’t confirm a cause of death. (It could have been due to the way the experiment ran, for example, not the lack of sleep.)

        • ben_w 30 minutes ago
          > If an animal can't sleep it will eventually die.

          Very few animals fail to eventually die even with as much sleep as they want.

          But before death, there is a loss of cognitive function from sleep deprivation, and we observe this too with AI whose context windows get too full.

          While we don't know very much about sleep, my understanding is that we do have a long list of things that we do during it, we just don't really understand if sleep is necessary for each of them or simply a convenient opportunity for it.

          There's lots of things biology does in response to easy-to-detect proxy signals instead of the real thing they care about: Our sensation of needing to breathe more is based on too much carbonic acid in our blood, not lack of oxygen, which is why in general nobody is allowed in an elevator with a liquid nitrogen dewar; Our natural distaste for incest is based on who we grew up with, not our actual DNA; Get too cold and some people suddenly feel warm and want to (and some do) take all their clothes off even though that would just make them hypothermic even faster.

          Being asleep may trigger the things we need to get done, but that doesn't mean sleep is *fundamentally* necessary for the things we need to get done. It could be just that it happens to be the way our biochemistry is wired, and we may find some other way to trigger those things.

          The quotation given by djeastm would by my guess for what a dream is, and why we have them. But we don't spend all our time asleep, dreaming. And I'd be the first to say that my guess isn't worth much, as I'm not a brain scientist.

        • bayarearefugee 41 minutes ago
          > Does their LLM "die" if it can't perform the function described?

          If you don't periodically clean the context, an LLM effectively goes insane in terms of outputs.

          If the LLM were fully controlling a physical system (like a robot body) that contained it the resulting insanity of an ever-growing, never cleaned context would likely result in some sort of death-like event.

        • adastra22 38 minutes ago
          There is a lot that is known about sleep. We don't know everything and there are large gaps in our knowledge, but there is also a lot that we do know. And this research explicitly tried to emulate the things we know that sleep does do. Calling it "sleep" is warranted, imho.
        • palmotea 29 minutes ago
          > The function of sleep in animals is largely obscure.

          Also, there's different kinds/stages of sleep, which probably perform different functions.

          For instance, REM may do something like the GP describes, consolidating memories and processing learning. Deep sleep may do something else (I vaguely recall some stage of sleep is used by neurons to clear certain waste products).

      • order-matters 32 minutes ago
        but isnt sleep an already defined technical term for significantly reducing power consumption while preserving its state until woken up?

        i feel like its confusing to reuse the word for a process that aims to deliberately change state of the machine / process

    • raincole 57 minutes ago
      This is why I object to sleep() from unistd.h. What an anthropomorphizing notion. Didn't early unix programmers understand that a computer isn't a living creature and therefore isn't capable of sleep? They must have been really stupid!
      • not_a_bot_4sho 14 minutes ago
        Some of them were straight up psychopaths too, as evidenced by `kill()` !
    • cush 0 minutes ago
      I think it's interesting that folks are suddenly taking issue with "anthropomorphizing" language used in AI as if we haven't been doing this since the earliest days of computing (see "memory", "child", "parent", etc).
    • madibo3156 3 minutes ago
      I find this annoying too. "Sleep" is okay, but the quippy headlines ("need sleep"—short, snappy and vague) infiltrating journals bother me. I've seen it well before LLMs, but as an example, there is a long list of title snowclones of the famous attention paper: https://github.com/vinayprabhu/X-is-all-you-need.
    • famouswaffles 1 hour ago
      Anthropomorphization is not inherently wrong, and in some instances, it actually lets you reason better about about complex behavior than whatever convoluted (and often wrong, especially in the case of giant neural networks) mechanistic description one might conjure.

      Here the analogy isn't without reason.

      • forshaper 18 minutes ago
        Wason Selection task performance improvements based on social framing suggest that it's easier for us to think about problems when some anthropomorphization is going on. https://www.cep.ucsb.edu/wp-content/uploads/2023/05/Cogadapt...
      • gabriela_c 14 minutes ago
        Feels like we're having a computer world Jane Goodall moment.
      • DonHopkins 39 minutes ago
        Is it "Anthropicmorphization" when Claud treats human beings like LLMs?
        • sillysaurusx 20 minutes ago
          Interesting question. Is there an actual term for that? It’s like inverse anthropomorphization, but not quite.
    • burnte 17 minutes ago
      > Does a motor vehicle get "sleep" when it is serviced?

      That's more like a doctor visit and a workout. The sleep will be the part of the duty cycle when it's not operating.

      > When I reboot a computer, is that equivalent to a nap?

      Yes, it wakes up completely refreshed and in good working order, usually, and if there's still a problem you know you need a technician.

    • ajs1998 1 hour ago
      This is the struggle of naming papers. You could stretch definitions and make your own sexy headline or you could be precise and fewer people will read it.
    • lxgr 1 hour ago
      If it works, it's called bionics, not anthropomorphization ;)
    • eithed 1 hour ago
      I assume compacting is the sleep here; so, yes
    • simonw 43 minutes ago
      > When I reboot a computer, is that equivalent to a nap?

      I mean, you do put your computer into "sleep" mode and then "wake" it.

      Analogies are useful. I think we need to learn how to continue to benefit from them despite the risk of anthropomorphication.

    • wat10000 19 minutes ago
      Just from the title, I’m assuming it refers to a period of downtime used to perform some sort of maintenance on the knowledge held by the system.

      Clicking through, that’s exactly what it is. Seems like “sleep” is an excellent term to use here.

    • cowlby 1 hour ago
      The analogy is helpful, but yes we should be able to “intelligently design” something better than sleep analogues since we’re not constrained by evolution like in humans.
      • SR2Z 40 minutes ago
        Evolution constrains the evolution of human beings, but it's also excellent at discovering elegant designs that work very reliably at a low cost.

        Maybe someday we'll understand the way our minds work well enough to design from first principles but until then we've only got one template for how a thinking machine should look.

      • lxgr 1 hour ago
        We are however constrained by the complexity of any purported solution. That's the bitter lesson, in a nutshell.

        At the very least, we know that sleep and dreaming do exist in biological brains. (Doesn't mean any of it is applicable to artificial neural nets, doesn't mean it'll work for our specific architectures etc. etc., but at least the idea requires fewer assumptions than a completely untested novel theory.)

    • aaroninsf 23 minutes ago
      Very much agree that while it is is useful in description of motivation and inspiration,

      it is very non-helpful—or worse—to use this language, this way.

      One might as well say "need neural plasticity" which is as much an analogy and equally misleading and counterproductive in shaping the right model of the system.

      One might even call this pernicious, what it encourages is already a social problem; and it doesn't aid understanding, it confounds it.

    • tom_ 1 hour ago
    • colechristensen 1 hour ago
      >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

      There is a strong, non-trivial connection here between what your brain does in sleep and what they are studying.

      You wouldn't object to referring to robot eyes or robot legs.

    • verisimi 38 minutes ago
      ... and anyway, maybe it was hungry? Or getting the sniffles?
    • sowbug 42 minutes ago
      If "reboot" is on the good side of your position, you might have lost the plot.
  • thunderbird120 56 minutes ago
    The idea of periodically stopping to write blocks of recent context into a fast-weight state is interesting, but I think it liked it better when E2E-TTT[1] did it. It's a more flexible and elegant continuous learning approach.

    Essentially it goes "You know how your model can remember its training data? Well, what if you treated its recent context like more training data and updated (some of) the weights using (mostly) the same process used to train it?"

    The end result is very good at remembering things but also really good at adapting to new unseen distributions.

    [1]https://arxiv.org/abs/2512.23675

  • bmc7505 12 minutes ago
    This topic recently came up at the FLANN workshop [1], and seems to periodically be rediscovered [2,3,4] in different contexts. While some have speculated about the biological role it plays (e.g., Pearlmutter & Houghton [5]), we still lack a conclusive theory of sleep, but the convergent evolution of this specific phenomenon across the animal kingdom and the fact that deprivation is inevitably fatal seems like an important clue.

    [1]: https://flann.cs.yale.edu

    [2]: https://www.cs.toronto.edu/~hinton/csc2535/readings/ws.pdf

    [3]: https://arxiv.org/abs/1711.02282

    [4]: https://arxiv.org/abs/2006.08381

    [5]: https://mural.maynoothuniversity.ie/id/eprint/1653/1/Hamilto...

  • hmokiguess 11 minutes ago
    This could be a solution in search of a problem, I would be careful with overfitting.
  • swyx 57 minutes ago
    related preprint from the letta team https://arxiv.org/abs/2504.13171

    Scaling test-time compute has emerged as a key ingredient for enabling large language models (LLMs) to solve difficult problems, but comes with high latency and inference cost. We introduce sleep-time compute, which allows models to "think" offline about contexts before queries are presented: by anticipating what queries users might ask and pre-computing useful quantities, we can significantly reduce the compute requirements at test-time. To demonstrate the efficacy of our method, we create modified versions of two reasoning tasks - Stateful GSM-Symbolic and Stateful AIME. We find that sleep-time compute can reduce the amount of test-time compute needed to achieve the same accuracy by ~ 5x on Stateful GSM-Symbolic and Stateful AIME and that by scaling sleep-time compute we can further increase accuracy by up to 13% on Stateful GSM-Symbolic and 18% on Stateful AIME. Furthermore, we introduce Multi-Query GSM-Symbolic, which extends GSM-Symbolic by including multiple related queries per context. By amortizing sleep-time compute across related queries about the same context using Multi-Query GSM-Symbolic, we can decrease the average cost per query by 2.5x. We then conduct additional analysis to understand when sleep-time compute is most effective, finding the predictability of the user query to be well correlated with the efficacy of sleep-time compute. Finally, we conduct a case-study of applying sleep-time compute to a realistic agentic SWE task.

  • rahen 45 minutes ago
    That's an idea I had a few months ago: after going through a compaction once the KV cache is nearing capacity, accumulate this knowledge into a dataset to fine-tune a LoRA during offline hours.

    This would create a three-layer memory system:

    - Stable long-term memory (initial base weights)

    - Mid-term memory built from the compactions and replay buffers

    - Short-term memory (KV cache)

    Sleeping would just be a fancy term for consolidating and transferring information from one memory layer to another during offline hours. Maybe that's also what the brain does while sleeping.

    • chermi 40 minutes ago
      Wouldn't that just accelerate collapse? How much do you trust the outputs of the llm to provide trustworthy and valuable new information? I mean I understand distillation works. But that's much more structured and thoughtful than my sessions at least.
      • jack_pp 31 minutes ago
        We can trust the feedback we give it based on the output it provides.
        • ambicapter 18 minutes ago
          What kind of feedback are you giving? What's the reward function?
      • rahen 28 minutes ago
        [dead]
    • DonHopkins 36 minutes ago
      It's a network of computers with GPUs, so there's no reason it can't sleep at the same time it's awake. Just a continuous "sleeping" process going on in the background, incrementally updating the model. No need for the "thinking" process to be "unconscious" while the "sleeping" process runs. Anthropomorphism confuses everything. There's no such thing as "offline hours" because the Earth is a sphere and the United States is not the center of the universe.
  • wagwang 28 minutes ago
  • jgreid 1 hour ago
    Isn't this simply context pruning/optimization?
    • kylemaxwell 1 hour ago
      From the abstract, it looks like it's actually doing something deeper, updating weights in part of the model?
    • colechristensen 1 hour ago
      No, they're actually training weights based on context before compaction. Context is context, this is splitting the model into persistent weights and malleable ones which are periodically updated.
      • delis-thumbs-7e 55 minutes ago
        Wouldn’t that be extremely computationaly expensive considering how resource incentive training is?
        • colechristensen 51 minutes ago
          No, training a state of the art model involves training on the order of 10 trillion tokens.

          We're talking about a step that updates weights based on say between 10k and 1M tokens.

  • scotty79 22 minutes ago
    Context -> Lora would be soooo cool.
  • micromacrofoot 44 minutes ago
    To reach a more brain-like behavior LLMs need to integrate your inputs into their model dynamically, essentially retraining real-time based on the most salient input. Human brains do this selectively all the time and it's part of our plasticity.

    Biologically humans do similar compression, so introducing a similar concept to an LLM also feels reasonable. Hardware isn't fast/cheap enough to do this on an ongoing basis, similar to how it's too expensive for our brains to do this while we're moving through the world.

    All we have now most of the time in LLMs is "working memory" we're missing a lot of the functionality that allows for episodic memory and selective plasticity.

    The more you read about how human brains work, the more you realize that we may have figured out a piece with LLMs, but it's certainly nothing approaching AGI. People insisting so are blowing smoke for investor hype or don't understand a big piece of the concepts involved.

    • logicchains 2 minutes ago
      >To reach a more brain-like behavior LLMs need to integrate your inputs into their model dynamically, essentially retraining real-time based on the most salient input.

      That's already possible with LLMs. The challenge is that 1. it would allow permanently jail-breaking models and 2. there'd be no way for them to efficiently transfer what they'd learned to a new model generation.

  • AIFSOfficial 21 minutes ago
    [flagged]
  • sonink 24 minutes ago
    [dead]
  • throwaway613746 58 minutes ago
    [dead]