睡眠框架:大语言模型在持续学习中保留知识的新途径

qimuai 发布于 阅读:31 一手编译

睡眠框架:大语言模型在持续学习中保留知识的新途径

内容来源:https://research.google/blog/the-sleep-framework-a-new-way-for-llms-to-retain-knowledge-in-continual-learning/

内容总结:

谷歌研究院日前提出一种面向持续学习的大型语言模型“睡眠”框架,通过在主动交互与离线记忆巩固之间交替,使模型能够持续整合新事实、提升推理能力,同时缓解灾难性遗忘和知识静态化问题。相关研究由阿里·贝赫鲁兹、法尔努什·哈希米、阿德尔·贾万马尔达和瓦哈布·米罗克尼共同完成。

研究指出,当前大语言模型虽在预训练和上下文学习方面表现突出,但部署后知识截止日期固定,难以长期适应新信息。若持续更新参数,容易引发灾难性遗忘;仅依赖上下文学习,则知识保留受限于当前上下文窗口。受人类大脑在休息时处理和巩固记忆的启发,研究团队引入“睡眠”学习范式,使模型具备持续周期性学习生命周期,将脆弱的短期上下文巩固为稳定的长期参数。实验显示,该框架可帮助模型持续获取新事实、保留最长1000万词元的长上下文知识,并提升复杂推理能力。

在“睡眠”范式下,模型在活跃交互与离线记忆巩固两种状态间切换。离线睡眠阶段,模型激活预先分配的混合专家记忆块,利用自生成练习样本更新数值权重,在不改变核心代码和架构的情况下完成自动化后训练。该范式通过记忆巩固和“做梦”两个阶段应对灾难性遗忘与持续适应问题。记忆巩固阶段借鉴人类非快速眼动慢波睡眠机制,通过抽象和蒸馏将脆弱记忆转化为长期结构;做梦阶段则模拟快速眼动睡眠,通过随机专家激活和基于奖励的样本选择,自主开展自我改进循环,优化学习几何结构。

理论分析表明,记忆巩固可视为结构化低秩压缩问题,模型无需复制短期痕迹的全部细节,而是识别最能保持自身在线策略行为和语义质量的紧凑方向;参数扩展则为写入选定记忆提供容量,避免覆盖已有知识。做梦阶段通过注入不同混合专家模块拓宽梯度探索方向,再经梯度过滤强化最有用的学习信号,从而形成更均衡的优化景观。

在持续翻译任务中,针对满语和卡拉芒语等未见语言,睡眠框架在多阶段评估中保持接近零的性能下降,而上下文学习、Cartridges和监督微调等基线方法在顺序学习中出现严重灾难性遗忘。在BABILong长上下文理解基准上,睡眠方法在最长1000万词元范围内表现出近乎完美的扩展能力,优于GPT-4和Titans等强基线。在SQuAD和持续预训练的事实知识融入评估中,睡眠方法单任务得分48.9%,持续预训练评估得分46.2%,优于基础模型、监督微调和SEAL等方法。在AIME 24/25和HMMT 25数学推理基准上,经睡眠增强的基础模型准确率分别达到79.2%、69.0%和46.1%,超过监督微调、GRPO和在线策略自蒸馏等基线。

研究团队表示,该睡眠范式为构建自主持续学习的人工智能系统提供了路径,使大语言模型能够在避免灾难性遗忘的同时保留短期记忆、将新技能抽象为长期参数结构并持续自我改进。

中文翻译:

2026年10月27日
Ali Behrouz 与 Vahab Mirrokni,Google Research

我们在持续学习中引入“睡眠阶段”,使大语言模型能够持续整合新事实、增强推理能力,同时缓解灾难性遗忘或静态知识截止日期的问题。

现代大语言模型通过预训练和上下文学习(ICL)取得了令人瞩目的表现。然而,一旦部署,它们在很大程度上保持静态,以固定的知识截止日期运行,无法获得长期能力或适应新信息。

虽然用新数据更新模型看似是显而易见的解决方案,但持续的参数量更新往往会触发灾难性遗忘——这是一个根本性问题,即学习新任务会严重降低模型在先前已学任务上的表现。另一方面,严格依赖ICL会将知识保留限制在即时上下文窗口内:一旦上下文会话结束,所获取的短期信息便被遗忘。

受人脑在休息时如何处理并稳定记忆的启发,我们在持续学习中引入了一个睡眠框架:一种学习范式,为大语言模型(LLM)赋予持续的周期性生命周期,使其能够不断学习,将脆弱的短期上下文巩固为稳定的长期参数。借助该框架,我们证明,在主动交互与离线记忆巩固之间交替,能够让大语言模型持续获取新事实、保留长达1000万token的长上下文知识,并提升复杂推理能力。

传统机器学习依赖于训练与推理之间的严格分离。在持续学习框架中,这种区分变得人为化;智能体必须不断学习、适应和处理信息。

在睡眠范式下,大语言模型在两个主要状态之间运行:

虽然“睡眠”“做梦”和“自我提升”等术语借用了神经科学的概念,但我们的框架完全在固定的模型架构和人工定义的训练规则内运行。在离线睡眠阶段,模型解锁预分配的多专家混合(MoE)记忆块,并使用自生成的练习样本更新其数值权重。这一自动化后训练循环帮助已部署的模型吸收新事实、提升推理准确性,同时保持其核心代码库和设计不变。

睡眠范式通过两个阶段来应对灾难性遗忘和持续适应:记忆巩固与做梦。

在人脑中,非快速眼动(NREM)慢波睡眠通过抽象和蒸馏将脆弱的记忆巩固为长期结构。我们提出的睡眠框架通过两个关键技术机制镜像了这一自然现象:

在快速眼动睡眠期间,人脑主动模拟场景、巩固情感/语义连接,并探索新的神经通路。与此相镜像,在“做梦阶段”,睡眠框架实现了一个自主自我提升循环:

除实证结果之外,我们的睡眠范式还建立在一个理论基础之上,该理论阐明了为何其两个阶段(记忆巩固与做梦)能够支持持续学习,而不仅仅是以新知识换取旧能力。

对于记忆巩固,分析表明,知识播种可以理解为一个结构化的低秩压缩问题。模型不被要求将短期痕迹的每个细节复制到其参数中。相反,它识别出一组紧凑的方向,这些方向最能同时保留模型自身的在策略行为和由学习目标所奖励的语义质量。

这一视角解释了两种信号的互补作用:在策略蒸馏使巩固与模型在推理时实际产生的轨迹对齐,减少了仅在教师生成分布上训练时可能出现的失配;与此同时,语义奖励改变了值得保留的内容,优先保留意义和任务相关行为的方向,而非仅仅匹配token概率。参数扩展则提供了写入这些被选中记忆所需的容量,而不会覆盖先前已巩固的知识。

对于做梦,该理论将随机专家激活和基于奖励的样本选择描述为改善学习几何结构的机制。注入不同的MoE拓宽了合成生成过程中探索的梯度方向集合,使模型接触到比仅由其普通唤醒时段数据所诱导的更丰富的更新集合。基于梯度的过滤则强调携带最有用的学习信号的合成经验,强化有信息量的方向,同时保留底层梯度空间的结构。

这些步骤共同产生了一个更平衡的优化景观:学习不再被少数方向所主导,梯度条件更好,模型在精炼能力时能够取得更稳定的进展。在这一视角下,做梦不仅仅是自生成的数据增强;它是一个有意识的过程,用于多样化、选择和巩固模型自我提升所经由的更新。

对于持续翻译,在未见语言(如满语和卡拉芒语)上,睡眠框架在多阶段评估中保持了近乎零的性能下降,而ICL、Cartridges和有监督微调(SFT)等标准基线在顺序学习中遭受了严重的灾难性遗忘。

在BABILong基准的长上下文理解上,我们的睡眠方法展示了高达1000万token的近乎完美的扩展能力,通过利用睡眠时段巩固将长上下文信息直接压缩到参数记忆中,超越了GPT-4和Titans等强大基线。

在基于SQuAD和持续预训练(CPT)评估的事实知识整合方面,我们的睡眠方法在单任务上达到48.9%,在CPT评估上达到46.2%,超越了包括基础模型、SFT和自适应语言模型(SEAL)在内的基线方法,成功整合了新事实信息而未降低现有模型表征。

最后,在包括AIME 24/25和HMMT 25的数学推理基准上,经睡眠增强的基础模型分别取得了79.2%、69.0%和46.1%的准确率。这超越了SFT、组相对策略优化(GRPO)和在策略自蒸馏(OPSD)等基线,表明将记忆巩固与模仿学习相结合能够驱动更优的推理表现。

我们的睡眠范式为自主、持续学习的AI系统提供了一条路径。通过超越静态预训练和脆弱的上下文窗口,在主动学习与离线休息之间交替,使大语言模型能够保留短期记忆、将新技能抽象为长期参数结构,并在不发生灾难性遗忘的情况下持续自我提升。

本研究由Ali Behrouz(Google与康奈尔大学)、Farnoosh Hashemi(康奈尔大学)、Adel Javanmard(Google与南加州大学)和Vahab Mirrokni共同完成。我们感谢Yuan Deng和Corinna Cortes审阅本工作并提出宝贵建议。我们还感谢Mark Simborg、Kimberly Schwede和Tim Herrmann在撰写本博文过程中提供的帮助。

英文来源:

October 27, 2026
Ali Behrouz and Vahab Mirrokni, Google Research
We introduce a sleep phase in continual learning, enabling large language models to continuously integrate new facts and enhance reasoning while mitigating catastrophic forgetting or static knowledge cutoffs.
Modern LLMs achieve impressive performance via pre-training and in-context learning (ICL). However, once deployed, they remain largely static, operating with a fixed knowledge cutoff date that leaves them unable to acquire long-term capabilities or adapt to new information.
While updating models with new data seems like the obvious solution, continual parameter updates often trigger catastrophic forgetting, a fundamental issue where learning new tasks severely degrades performance on previously learned ones. Alternatively, relying strictly on ICL limits knowledge retention to the immediate context window: once the context session ends, the acquired short-term information is forgotten.
Inspired by how the human brain processes and stabilizes memory during rest, we introduce a sleep framework in continual learning: a learning paradigm that equips large language models (LLMs) with a continuous periodic lifecycle, enabling them to continually learn, consolidate fragile short-term context into stable long-term parameters. With this framework, we demonstrate that alternating between active interaction and offline memory consolidation allows LLMs to continuously acquire new facts, retain long-context knowledge up to 10M tokens, and improve complex reasoning.
Traditional machine learning relies on a strict separation between training and inference. In a continual learning framework, this distinction becomes artificial; an intelligent agent must constantly learn, adapt, and process information.
Under the sleep paradigm, an LLM operates across two primary states:
While terms like "sleep," "dreaming," and "self-improvement" borrow from neuroscience, our framework operates entirely within a fixed model architecture and human-defined training rules. During the offline sleep phase, the model unlocks pre-allocated Mixture-of-Experts (MoE) memory blocks and updates its numerical weights using self-generated practice examples. This automated post-training cycle helps a deployed model absorb new facts and sharpen its reasoning accuracy while keeping its core codebase and design unchanged.
The sleep paradigm addresses catastrophic forgetting and continuous adaptation through two stages: memory consolidation and dreaming.
In the human brain, non-rapid eye movement (NREM) slow-wave sleep consolidates fragile memories into long-term structures via abstraction and distillation. Our proposed sleep framework mirrors this natural phenomenon through two key technical mechanisms:
During REM sleep, the human brain actively simulates scenarios, consolidates emotional/semantic connections, and explores novel neural pathways. Mirroring this, during the “dreaming stage”, the sleep framework implements an autonomous self-improvement loop:
Beyond the empirical results, our sleep paradigm is grounded in a theory that clarifies why its two stages (memory consolidation and dreaming) can support continual learning without simply trading new knowledge for old capabilities.
For memory consolidation, the analysis shows that knowledge seeding can be understood as a structured, low-rank compression problem. The model is not asked to copy every detail of its short-term traces into its parameters. Instead, it identifies a compact set of directions that best preserve both the model’s own on-policy behavior and the semantic qualities rewarded by the learning objective.
This perspective explains the complementary roles of the two signals: on-policy distillation aligns consolidation with the trajectories the model will actually produce at inference time, reducing the mismatch that can arise when training only on teacher-generated distributions; meanwhile, the semantic reward changes what is worth retaining, prioritizing directions that preserve meaning and task-relevant behavior rather than merely matching token probabilities. Parameter expansion then provides the capacity needed to write these selected memories without overwriting previously consolidated knowledge.
For dreaming, the theory characterizes random expert activation and reward-based sample selection as mechanisms for improving the geometry of learning. Injecting different MoEs broadens the set of gradient directions explored during synthetic generation, exposing the model to a richer collection of updates than those induced by its ordinary wake-time data alone. Gradient-based filtering then emphasizes the synthetic experiences that carry the most useful learning signal, strengthening informative directions while preserving the structure of the underlying gradient space.
Together, these steps yield a more balanced optimization landscape: learning is less dominated by a small number of directions, gradients are better conditioned, and the model can make more stable progress when refining its capabilities. In this view, dreaming is not simply self-generated data augmentation; it is a deliberate process for diversifying, selecting, and consolidating the updates through which the model improves itself.
For continual translation, in unseen languages, such as Manchu and Kalamang, the sleep framework maintained a near-zero performance drop in multi-stage evaluations, whereas standard baselines like ICL, Cartridges, and supervised fine-tuning (SFT) suffered severe catastrophic forgetting during sequential learning.
In long-context understanding on the BABILong benchmark, our sleep method demonstrated near-perfect scaling up to 10M tokens, outperforming strong baselines like GPT-4, and Titans by using sleep-time consolidation to compress long-context information directly into parametric memory.
For factual knowledge incorporation evaluated on SQuAD and continued pre-training (CPT), our sleep method achieved 48.9% on single-task and 46.2% on CPT evaluations, outperforming baseline methods including the base model, SFT, and Self-Adapting Language Models (SEAL) by successfully integrating new factual information without degrading existing model representations.
Finally, on mathematical reasoning benchmarks including AIME 24/25 and HMMT 25, sleep-enhanced base-model achieved accuracy scores of 79.2%, 69.0%, and 46.1%, respectively. This outperformed baselines like SFT, group relative policy optimization (GRPO), and on-policy self-distillation (OPSD), showing that pairing memory consolidation with imitation learning drives superior reasoning performance.
Our sleep paradigm provides a path toward autonomous, continually learning AI systems. By moving beyond static pre-training and fragile context windows, alternating between active learning and offline rest empowers LLMs to retain short-term memories, abstract new skills into long-term parameter structures, and continuously self-improve without catastrophic forgetting.
This research was conducted by Ali Behrouz (Google and Cornell University), Farnoosh Hashemi (Cornell University), Adel Javanmard (Google and University of Southern California), and Vahab Mirrokni. We thank Yuan Deng and Corinna Cortes for reviewing the work and their valuable suggestions. We also thank Mark Simborg, Kimberly Schwede, and Tim Herrmann for their help in crafting this blog post.

谷歌研究进展

文章目录


    扫描二维码,在手机上阅读