Language Models Need Sleep (arxiv.org)
109 points by juxtapose 2 hours ago
pcrh 2 hours 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 an hour 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 an hour 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?
bayarearefugee an hour ago
adastra22 an hour ago
ben_w an hour ago
palmotea an hour ago
Windchaser an hour ago
crabbone 8 minutes ago
sillysaurusx an hour ago
libria 31 minutes ago
order-matters an hour 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 an hour 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 44 minutes ago
Some of them were straight up psychopaths too, as evidenced by `kill()` !
prerok 26 minutes ago
CuriouslyC 10 minutes ago
Saying something needs sleep isn't anthropomorphizing, since pretty much all complex living organisms need sleep.
Also, even when something is "specific" to humans, it might not be anthropomorphizing to observe it in something else, it could just be an emergent pattern of high intelligence.
famouswaffles an 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.
pfdietz 25 minutes ago
We shouldn't anthropomorphize LLMs. They hate it when you do that.
forshaper an hour 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 44 minutes ago
Feels like we're having a computer world Jane Goodall moment.
DonHopkins an hour ago
Is it "Anthropicmorphization" when Claud treats human beings like LLMs?
sillysaurusx an hour ago
cush 30 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). It helps folks understand things at the correct level without needing domain knowledge
ajs1998 2 hours 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.
burnte an hour 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.
madibo3156 33 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.
lxgr 2 hours ago
If it works, it's called bionics, not anthropomorphization ;)
eithed 2 hours ago
I assume compacting is the sleep here; so, yes
simonw an hour 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.
aaroninsf an hour 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.
cowlby 2 hours 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 an hour 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 2 hours 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.)
tom_ 2 hours ago
See also, perhaps: https://news.ycombinator.com/item?id=48273597
wat10000 an hour 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.
colechristensen 2 hours 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 an hour ago
... and anyway, maybe it was hungry? Or getting the sniffles?
thunderbird120 an hour 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.
bmc7505 42 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...
danielrmay 25 minutes ago
The "sleep" thing gives me the creeps so in my head I'm just going to think of it as the difference between "response time retrieval" and "background consolidation".
I do think it points at something bigger than just attention architecture: "memory" isn't just storage, and merely longer context isn't the same thing as having a better understanding of the source data.
I'm looking at this through the "personal AI" lens, where I think the missing "memory" layer seems to be consolidation & prioritization. It's not enough to just pattern match and grab the right emails, notes, etc, stuff them into the context window & hope, but instead it's useful to consider offline processing and turn events into durable state: clusters of observed data becomes episodes, assumptions, contradictions and power confidence for suggestions.
That also pushes up the need for provenance & inspectability. It's going to be interesting to see what kind of memory consolidation strategies are required for each domain use case.
swyx an hour 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.
energy123 29 minutes ago
Would be a big deal if you don't have to care about quadratic attention cost. Some workflows become a lot cheaper.
jgreid 2 hours ago
Isn't this simply context pruning/optimization?
kylemaxwell 2 hours ago
From the abstract, it looks like it's actually doing something deeper, updating weights in part of the model?
colechristensen an 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 an hour ago
Wouldn’t that be extremely computationaly expensive considering how resource incentive training is?
colechristensen an hour ago
hmokiguess 42 minutes ago
This could be a solution in search of a problem, I would be careful with overfitting.
rahen an hour 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 an hour 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 an hour ago
We can trust the feedback we give it based on the output it provides.
ambicapter an hour ago
DonHopkins an hour 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 an hour ago
Kind of related
scotty79 an hour ago
Context -> Lora would be soooo cool.
micromacrofoot an hour 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 32 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.
micromacrofoot 6 minutes ago
Oh do you have a source? I haven't seen it done in real-time.
Coincidentally the human brain is also jailbroken and nontransferable