# 周期性暂停以巩固记忆或能改善长期语言智能体的表现

- 来源：Rohan Paul (@rohanpaul_ai)
- 发布时间：2026-05-28 10:02
- AIHOT 分数：65
- AIHOT 链接：https://aihot.virxact.com/items/cmpousmkv09d9slv424ay1osb
- 原文链接：https://x.com/rohanpaul_ai/status/2059817545604190523

## AI 摘要

针对当前Transformer智能体因上下文不断增长而推理变慢变贵的问题，论文提出效仿人类睡眠机制进行记忆巩固。其核心方案是加入周期性的“睡眠阶段”：模型在此阶段暂停，多次重读近期上下文，将有用信息写入固定大小的记忆层（如状态空间块的快速权重），然后清空短期注意力缓存。此离线过程使后续回答仍只需一次前向传播。在细胞自动机、图查找和GSM-Infinite数学问题上的测试表明，更长的睡眠时间能提升性能，尤其对需要深度推理的复杂任务。该思路表明，长期智能体或可通过记忆巩固实现高效遗忘与重用，不必无限携带原始上下文。

## 正文

Long-running language agents may work better if they periodically stop to consolidate memory.

The problem is that today's transformer agents get slower and more expensive as their context grows， because attention has to keep checking more past tokens.

The usual fix for long context is to keep more tokens nearby， but that turns every next-token prediction into a larger search through the past.

The sharper idea here is that memory is not only storage.

Sometimes the hard part is converting a messy stretch of experience into a state that can actually be used later.

So the paper's idea is to add a sleep phase， where the model pauses， rereads recent context several times， writes the useful information into fixed-size memory layers， and then clears the short-term attention cache.

During sleep， the model runs several offline passes over recent context， writes the result into fast weights inside its state-space blocks， then clears the attention cache.

This means the model pays extra compute while sleeping， not while answering， so normal prediction can still happen with 1 forward pass.

The authors test this on cellular automata， graph lookup， and GSM-Infinite math problems， where the model must use old information that is no longer sitting in its attention cache.

The main result is that longer sleep improves performance， especially on harder cases that need deeper reasoning rather than just remembering a fact.

The big deal is that long-horizon agents may not need to carry bigger and bigger raw context forever， because they can consolidate the important parts and safely forget the raw tokens.

----

Link - arxiv. org/abs/2605.26099

Title： "Language Models Need Sleep"
