以下是各实验室[目前正在下的重大研究赌注:如果我们训练 AI 在数千个多样化的 RL 环境中完成数百万个可验证的任务,那么我们基本上就造出了 AGI。因为这样的训练会培养出通用的解决问题能力(比如如何在错误、失误和模糊性面前,连续数周在一个开放式任务上持续推进)。
对这一愿景持乐观态度的人会说,任何我们可能视为当前学习范式根本性缺陷的问题——例如数据效率低下和缺乏持续学习能力——都可以通过继续扩大训练规模来碾压解决,正如自然语言处理中所有那些所谓的“根本性”研究难题,都在倾注到 LLM 上的海量算力面前土崩瓦解一样。
是的,这些模型在训练时的样本效率确实只有人类的一百万分之一。但训练是一次性的成本,可以摊销到数十亿次的用户会话中。真正重要的是模型在单次会话内有多聪明、多通用、样本效率多高,而随着我们进行更多 RL 训练,这一点显然在持续提升。AI 能够在越来越长的时间跨度内解决越来越有雄心的问题——任何一直用这些模型写代码的人都清楚这一点。
同样地,持续学习——即模型的权重在部署过程中得到更新——可能根本就不是必需的。原因还是一样:如果上下文学习在越来越长的时程上变得足够好,那我们就不需要把经验蒸馏回权重来实现在职学习。人们常说,员工入职六个月甚至更久之后才产生净产出,因此显然在线学习对胜任工作是必要的。
但如果你能把这六个月直接塞进上下文窗口呢?Transformer 架构上已经有大量创新,能大幅提升可存储的上下文长度。再经过几年的进展,为什么我们不能拥有任意大的上下文窗口呢?
可打磨性与可验证性同样重要
为了探讨这是否可行,我想先绕个弯,问一个关于当前 AI 进展本质的问题,这个问题让我既困惑又感兴趣:为什么计算机使用的进展如此缓慢?
计算机使用的可验证性显而易见(想要的 Etsy 商品是否被下单了,活动所需的公司场地是否都订好了,报税是否已提交)。那么,计算机使用的进展比编程、数学以及其他可验证领域慢得多,这难道不奇怪吗?我相信原因有很多,其中包括:模型在预训练期间接触到的高质量多模态数据少得多,而且视频消耗上下文窗口的速度快得多。[1]
但我认为这个因素被相当低估了,而且它还揭示了 AI 进步这条河流只能缓慢侵蚀的峡谷岩壁,那就是:一个领域仅仅可验证是不够的,它还必须非常“可反复磨”——也就是说,你能够针对一个确定性、可重放的模拟器运行大量的并行 rollout。如果你想让模型更擅长编程,你可以创建一个环境,其中包含一个软件仓库,仓库里缺少某个你交给 AI 实现的功能,然后让一千个并行智能体同时攻克这个问题,每个智能体都有一个完全相同的容器副本。[][2]]
但这种方法对计算机操作(computer use)行不通——至少不是轻而易举就能做到。你不可能派一千个智能体去尝试 Amazon.com 上同一个结账流程。因为 Andy Jassy 会发现并检测到你的机器人,然后封掉你的账号。
你可以通过克隆 Slack、Gmail 以及所有其他常见应用和网站来解决这个问题。但至少目前,这是一种劳动密集度极高、难以扩展的环境构建方式。当然,一旦 AI 的编程能力强到能够自己以极高保真度构建这些克隆版本,我相信计算机操作将会取得巨大进展。而且这种做法还能一石二鸟,因为让 AI[]从零重建[]整个复杂应用,本身也是一个很好的编程 RL 训练目标。
不过,虽然计算机使用本身可能很快就会被攻克,但它当前的迟滞表现告诉我们一点:除非你能为某个领域构建出一个非常适合反复演练的训练目标,否则模型很难取得多大进展。原因当然在于,模型在训练过程中的样本效率极其低下。这正是我在上一篇独白中提出的观点。
在计算机使用上,我们或许可以通过构建这些可大规模演练的确定性模拟器来弥补样本效率的不足。但对于智能通用人工智能(AGI)需要学习的许多其他类型的技能,我们根本无法这样做。
我们该如何训练一个 AI 去经营一门生意?如何打造一个特别擅长打赢官司的 AI?或者在市场中进行盈利性日内交易的 AI?又或者帮助候选人赢得选举的 AI?这类 rollout 需要与真实世界互动,无法简单地在数据中心内复现。而且外循环验证可能需要数月甚至数年的真实世界行动才能显现结果,也无法通过并行扰动模型的动作数千次来重新观测,从而 isolating 出模型到底做对了什么。
处理这类无需重置的(reset-free)非平稳环境是强化学习中一个已知的开放问题。我指出的并不是什么新东西。但我确实想强调的是:由于世界上大多数领域的数据都具有特异性和稀疏性,你需要样本效率才能达到熟练水平。
如果 AI 要发展出人类拥有的所有技能,甚至人类都不具备的技能,那么它们必须能够从稀缺的真实世界互动中,以非结构化、不可验证且模糊的方式提取信息并学习。因为在很多领域,相关的训练信息根本不存在其他获取方式。
要打造一个在政治上像 Lyndon Johnson 一样出色、或在创办航天发射公司上像 Elon Musk 一样出色的 AI,需要什么样的 RL 环境?
单靠 RLVR 能泛化吗?
各大实验室正在押注 RLVR 能够泛化到所有这些其他领域。如果你在足够多的容器化、可复现环境中进行训练,你就会得到一个非常通用的智能体,它能够制定并执行计划、快速从新信息中学习,甚至在一次会话内掌握新技能。
如果把这样一个经过无尽 RLVR 训练的 AI 放进 1948 年的德州政坛,它能就如何赢得参议院席位给你比 LBJ 更好的建议;而如果你在 2002 年给它 1 亿美元并放手让它干,它就能为你造出 SpaceX。
RLVR 能否泛化到 那种程度仍是一个开放的经验性问题:如果实验室在 RL 环境上的投入从数十亿美元增加到一万亿美元,你会得到一种在上下文窗口内运行的、完全通用、类人的智能吗?
Dario 在我们一起做播客时说过一句意味深长的话,我认为这句话暗示 RLVR 的泛化能力并非无限强大。在解释为什么模型性能在长上下文下往往会下降时,他说:
训练时使用的上下文长度和服务时使用的上下文长度是两回事。如果你在一个较小的上下文长度上训练,然后试图在较长的上下文长度上提供服务,可能就会出现这些性能下降。
也许我想多了,但他似乎是在说,短时程的 RL 训练不一定能泛化出长时程的 RL 性能。而如果我们无法从短时程泛化到长时程,那智能体又怎么能从大量的白领任务训练中泛化出来——比如说,被扔进现实世界,从零开始创业并做得像 Sam Walton 那样好呢?
而且,即使 AI 在积累足够的上下文内经验后能变成 Albert Einstein 和 Henry Ford,如果无法把这些学习成果写回权重之中,这一切也都会转瞬即逝、付诸东流。一个实验室大约 30-50% 的算力用于推理,而这些算力目前在帮助改进模型方面基本上没做什么有成效的事。
多么浪费!实际情况甚至比听起来更糟。因为只有在部署中,模型才能接触到那些最有价值、最值得学习的信息(在我被使用的那些组织里实际发生了什么?他们用我来做什么?我在现实世界中往往会犯什么样的错误?)
我们手头有个天才研究生,却从来没被允许去实习。而我们只是不断地用强化学习在环境上训练的方式,给他越来越多的课堂案例研究。诡异又浪费的是,我们没有用 AI 在经济中广泛部署后本可以积累的所有经验来训练它们——本可以让它们针对数百万个不同的任务进行练习,并接触到大量隐性的组织知识和领域知识。
把学习写回权重
但这种持续学习需要回到权重本身。AI 不能只是不断积累一个随着你从越来越多用户身上学习而不断变大的 KV cache。那既不可扩展,也不是人类学习的方式。我们的参数和激活之间并没有分离。也没有一团快速权重式的表征,随着我们一生学到更多东西而越从我们的头骨里凸出来。我们学习东西时,显然存在某种压缩,而这种压缩实际上有助于泛化和顿悟(grokking)。事实上,有些人类具有自闭症学者症候群式的记忆能力,能把随机的数字表格或无意义音节记上好几年——这基本上就是模型在上下文中所拥有的那种信息保真度。而这种庞大的记忆量会严重损害这些人理解抽象概念和隐喻的能力。人类的持续学习,不在于把所有观察都放在嘴边,而在于把正确的直觉和全局性知识重新凿刻回权重之中。
但一旦进入权重层面,你就必须放弃上下文学习那样的样本效率。由于梯度更新的样本效率极低,所有成功上线的在线学习模型都不得不在数百万用户身上学习同一件事。例如,Cursor Tab 模型每天通过对超过 4 亿多次请求预测完全相同的目标来进行在线学习(该目标是哪些编辑被接受了)。至少到目前为止,我们还没有看到模型为不同用户在线学习不同类型的内容,因为单个会话产生的数据也许足够一个人学习,但不足以训练出一个更强大的 AI。
当前的在线学习只能适用于非常有限的少数用例。但持续学习的全部意义在于:世界非常复杂,每一份工作、每家公司、每个问题都各不相同,你需要你的智能体能够学习与特定部署相关的具体信息,而这些信息根本无法塞进一次共享的训练运行中。比如你所在的组织里一切是如何运作和相互配合的、如何与基础设施和身边的其他人协作以推进某个更大的项目、常见的失败模式有哪些,等等。
这就是样本效率和持续学习实际上是深度关联的问题的原因。模型在“工作中”能获得的数据相对较少。要从这些数据中学习,就需要样本效率。模型可以在上下文中做到这一点,但注意力机制在运行中构建的“快速权重”[3]虽然带来了这种样本效率,在内存方面的扩展性却非常差。所以我们需要架构上的创新,以实现某种中间表示。我之前谈到过,这类东西已经有许多可行的思路,从稀疏注意力到 KV cache 压缩。在我看来,架构并不是持续学习的根本瓶颈。
也许瓶颈在于损失函数。如何根据从某次会话中学到的信息来更新权重(也就是改进模型本身)?即便在这个问题上,乍看之下也有许多应该行得通的思路。最近很多人在讨论on-policy 自蒸馏。如果你想深入了解它的原理,可以看看几周前 Sasha Rush 给我做的一段即兴黑板讲解。简单概括一下这个解释:其思路是,我们鼓励基础模型在尝试解决某个真实世界问题时,做出的预测与它在长时间会话中积累了全部上下文之后本会做出的预测相同。这一整套流程的目的,就是把模型在会话中学到的东西蒸馏回权重本身。
这比 RLVR 更好,原因有二。其一,OPSD 不需要外层的可验证奖励循环。我们只需要一个能在上下文窗口内学到正确东西的模型。只要具备这一点,我们就能训练基础模型去匹配我们的资深教师模型——那个在会话过程中积累了大量经验的模型。其二,OPSD 提供的监督信号比朴素的 RL 密集得多——你不需要把单一奖励投射到整条轨迹上,而是可以在教师与学生之间逐 token 的概率差异上进行训练[[4]。
在持续学习方面,OPSD 也优于监督微调。你能想到的最朴素的 SFT 做法,就是训练基础模型去预测会话期间观察到的所有 token。但作为学习目标这毫无意义——你在工作中变强的方式,并不是把每一天发生的记录都完美无误地复述出来,而是把那些与把工作做得更好相关的少量洞见和知识片段巩固下来。
RL 训练不存在这种失败模式,它非常擅长把梯度更新集中到与获得正确结果相关的部分上——这正是 RL[的更新极其稀疏[的原因。而这对持续学习来说是非常重要的特性,因为在工作中学习时,你不希望覆盖并遗忘基础模型已经知道的所有其他东西。
几个月前我写过一篇文章,论证 RL 每个样本学到的信息量远少于监督学习。但这可能是好事而非坏事——你只对模型做实现目标所绝对必要的最小改动,仅此而已。OPSD 保留了 RL 的这一特性:它不会像监督学习那样让你猛冲向教师分布,而是只提取在真实世界任务上取得同样成果所必需的知识。
做梦
所以 OPSD 是解决样本效率问题的一种方法:你可以把稀缺的真实世界经验中的所有信号压缩进一次微小而精准的更新。但还有一个更具推测性的想法。我们不妨称之为做梦[5]。如果 AI 能构建一个良好的现实模拟来演练新技能,或尝试不同策略并强化有效的那些,那么它就能在同样的现实时间内经历成数量级更多的模拟样本。
DeepMind 发布 AlphaZero 几年之后,一组研究人员训练出了一个名为 EfficientZero 的模型。如果让这个模型和一个人类各自拥有总共 2 小时的时间去玩一款他们都没见过的 Atari 游戏模拟器,这个模型很可能会击败人类新手。
这是否意味着这个模型的样本效率比人类更高呢?这取决于你如何衡量样本效率。因为在真实游戏的每一步中,EfficientZero 都在脑海中运行着几十局模拟对局。类似地,未来的 LLM 或许能够消耗少得多的真实世界数据,同时在它们为自己构建的环境中无休止地练习。
当然,最大的区别在于,构建整个世界的模拟要比模拟围棋难得多。这就是为什么我说这个设想更具推测性。
如果这条路走得通,它将成为继预训练、RL 和推理时算力之后的第四条扩展轴。你可以称之为测试时训练,或者“做梦”。模型花费算力编写 RL 环境,并在其中演练那些实际上会被用于为特定用户提供生产服务的技能。与其在 Codex、Cursor 或 Claude 上按下 /compact——那只是点燃少量算力来写一份摘要,给你一种持续学习的模拟假象——不如按下 /dream,它会燃烧海量算力,去构建并针对一个“视频游戏版”的模型所见世界进行训练。
2027 年会是什么样子
那么,到 2027 年底,持续学习可能会是什么样子?我们又该如何走到那一步?所有这些 RLVR 训练正在产出一个智能体:当它被抛到一个陌生问题时,能够找到方向、尝试不同策略,并在遇到障碍时不断迭代。这正是 RLVR 带给你的关键东西:一个至少具备足够胜任力、可以开始积累真实世界经验的 AI。一旦你拥有了它,就可以把它派出去做真正的工作,哪怕是在偏离训练分布的项目上。
到那时,有效的上下文长度可能已经扩展到足以让这个 AI 与你并肩工作整整一周的实际时间。一周结束时,你给它一个赞或一个踩。如果你点赞,基础模型会把 AI 在这次会话中学到的一切进行知识蒸馏,它可能使用 OPSD、做梦或其他我们甚至尚未知晓的某种技术,或者上述方法的组合来实现这一点。
这样,AI 就能在与其预先用 RLVR 训练的领域相邻的领域上变得更强,而下一轮又会在与它之前在线学习过的领域相邻的领域上继续进步。AI 的技能、知识和能力范围将远远超出模型部署前所训练的那些可验证领域。正如预训练创造了一个足够聪明的基础智能,使其能通过进一步的 RLVR 训练成为胜任的智能体;RLVR 也创造了一个足以真正部署到现实世界中的智能体,从而得以利用持续学习这一未来范式。
到那时,AI 变强的主要途径将不再是模型向公众发布之前所接受的训练,而是来自它们在被广泛部署到世界各地、参与各种不同任务的过程中所积累的大量经验。每次你与 AI 交互时,它都会更聪明——不仅因为它从你之前的所有会话中学习了,还因为它与世界上所有其他用户的全部交互。这既可怕又令人兴奋,而且与现在 AI 的改进方式截然不同。
仅仅 一小时的视频就会消耗约 100 万个文本 token。
我听说 AI 智能体在围棋上特别擅长,因为它有一个出色的标准化包管理器,而 Python 和 Typescript则存在"框架、类型方案和工具库的巨大组合空间"。这类空间不太适合通过梯度下降进行干净、高吞吐量的并行搜索。
我们以 Llama 3 70B 作为参考。KV cache(也就是从学习上下文中构建起来的表示)每个 token 增长 320 KB。而在训练中,模型每个 token 只存储 0.075 比特(这是一个 70B 模型,16 位参数,在 15 万亿 token 上训练)。所以,在上下文学习与预训练之间,每个 token 所存储的信息量有 3500 万倍的差异。
你可能已经预见到 OPSD 的一个明显问题:在学生模型出错之前以及出错的那个点上,你能获得密集的监督信号,但轨迹的其余部分都是从那个错误衍生出来的——它沿着一条本就走错的路继续下去,而教师模型本来也不会走到这条路。所以过了那个点之后,rollout 的剩余部分你就再也得不到教师模型的有用反馈了。这个问题似乎可以通过一种叫做轨迹精炼蒸馏(Trajectory-Refined Distillation)的技术来解决:由教师模型从出错处开始,把轨迹重写为一个完整、正确的延续。
顺便说一句,我说的并不是泄露的 Claude Code 源代码中那个即将推出的"dreaming"功能,我猜那个功能主要是让模型给自己写大量 Markdown 文件。我指的是真正更新权重本身。我只是认为,靠给自己传纸条是无法积累新技能的。用我在之前一篇博客文章中用过的类比:想象一下,如果学生学习吹萨克斯的方式是,把这个你从未尝试过的新乐器试吹一下,记一些关于哪里出错的笔记,然后把它交给下一位同样第一次吹奏的学生。
Here’s the big research bet the labs are making currently: if we train AIs to accomplish millions of verifiable tasks across thousands of diverse RL environments, then we’ll basically have built AGI. Because such training will create these general problem solving skills (like how to make progress on an open ended task for weeks on end in the face of errors, mistakes, and ambiguity).
The people optimistic about this vision would say that anything we might consider a fundamental deficits with the current learning paradigm—for example, data inefficiency and lack of continual learning—can be steamrolled by just scaling training more, just as all the supposed “fundamental” research problems in natural language processing collapsed against the flood of compute thrown into LLMs.
Yes, these models are 1/1-millionth as sample efficient as humans during training. But training a one-time cost amortized across billions of user sessions. What matters is how smart, general, and sample efficient the model is within a session, and that’s clearly been improving as we do more RL training. AIs are able to solve more and more ambitious problems across longer and longer time spans - anybody who’s been using these models for coding knows that.
Similarly, continual learning—as defined as the model’s weights getting updated from deployment—may simply not be necessary. Again, because if in-context learning gets so good across longer and longer horizons, then we don’t need to distill back to weights to get on-the-job learning. People often say that their employees are not net productive until six months or more on the job, so clearly online learning is necessary for competence. But what if you could just fit those six months into the context window? There’s been tons of architectural innovations on the transformer which dramatically increase the length of context you can store. With a couple more years of progress, why couldn’t we have arbitrarily large context windows?
Grindability is just as important as verifiability
To address whether this will work, I want to first take a detour and ask a question about the current nature of AI progress that I find confusing and interesting. Why has progress on computer use been so slow?
Computer use is so clearly verifiable (did the desired Etsy item get ordered, is everything I need corporate for my event booked, have my taxes been submitted). So isn’t it weird that computer use has been making much slower progress than coding and math and other verifiable domains? There’s many reasons for this, I’m sure, among them the fact that the models are exposed to far less high quality multimodal data during pretraining, and that video consumes the context window far faster.[1]
But one reason that I think it quite underrated, and also which reveals the canyon walls against which the river of AI progress will only slowly chip away at, is that it is not enough for a domain to be verifiable. It also has to be very grindable—in the sense that you can run lots of parallel rollouts against a deterministic and replayable simulator. If you’re trying to make a model better at coding, you can create an environment that has a software repo with some missing feature that you’ve tasked the AIs with creating, and then you have a thousand parallel agents just go at the problem, each with their identical copy of the container.[2]
But this doesn’t work with computer use—at least not trivially. You can’t have a thousand agents go try the same checkout flow on Amazon.com. Because Andy Jassy will find and detect your bots and shut your ass down.
You can solve this by making clones of Slack, Gmail, and all the other common applications and websites. But at least currently, this is a very labor-intensive and unscalable way to build environments. Of course, once AIs get good enough at coding to themselves build these clones with extremely high fidelity, then I’m sure computer use will make a ton of progress. And you’re also killing two birds with one stone with this kind of procedure, because getting AIs to rebuild whole complex applications from scratch is a great RL objective for coding as well.
But while computer use itself may soon be solved, its current lethargy tells us the following: that unless you can build a very replayable training target for a domain, the models will struggle to make much progress. The reason this is true is, of course, that the models are incredibly sample inefficient during training. This is the point I was making in my last monologue.
In computer use, we might be able to make up for this sample efficiency deficit by building these farmable deterministic simulators. But for so many different other kinds of skills an AGI would need to learn, we simply can’t do this.
How would we train an AI to build a business? How would you make an AI that’s really good at winning court cases? Or having a profitable day trading in the markets? Or helping a candidate win an election? The rollout requires interacting with the world and cannot be recreated simply within the datacenter. And the outer loop verification may take months or years of real world actions to elicit, and cannot be re-observed by perturbing the model’s actions thousands of times in parallel so that you can isolate what exactly the model did that actually worked.
Dealing with such reset-free non-stationary environments is a known open problem in RL. I’m not pointing out anything new. But I really do want to emphasize that because of the idiosyncratic and sparse nature of the data in most domains in the world, you need sample efficiency in order to get proficient.
If AIs are to develop all the skills that humans have, and even skills that no humans have, then they need to be able to learn from information revealed in unstructured, unverifiable, and ambiguous ways from scarce amounts of real world interaction. Because in many domains, the relevant training information simply doesn’t exist in any other way.
What is the RL environment to make an AI as good at politics as Lyndon Johnson, or as good at building a space launch business as Elon Musk?
Will RLVR alone generalize?
The labs are betting that RLVR will generalize to all these other domains. If you train in enough containerized, reproducible environments, you will develop a very general agent that can make and execute plans, and learn rapidly from new information, and even pick up new skills, all within a session.
If you drop this endlessly RLVRed AI into Texas politics in 1948, it could give you better advice than LBJ about winning the Senate seat; And if you gave it 100 million dollars in 2002 and let it cook, it could build SpaceX for you.
Whether RLVR generalizes that well is an open empirical question: if labs went from spending billions of dollars on RL environments to a trillion dollars, would you get a fully general, human-like intelligence operating within the context window?
Dario gave a telling quote during our podcast together, which I think hints that RLVR generalization is not this infinitely strong. When he was explaining why model performance tends to degrade at long context, he said:
There’s the context length you train at and there’s a context length that you serve at. If you train at a small context length and then try to serve at a long context length, maybe you get these degradations.
Maybe I’m reading too much into it but he seems to be saying that short-horizon RL training doesn’t necessarily generalize to long-horizon RL performance. And if we can’t generalize from short to long horizon, how are agents supposed to generalize from lots of white collar task training, to, say, getting dropped into the real world and building a business from scratch as well as Sam Walton?
And even if after enough in-context experience, the AIs could become Albert Einsteins and Henry Fords, all that would be ephemeral and wasted if you can’t get those learnings back into the weights. Around 30-50% of a lab’s compute goes to inference, and that compute is currently not really doing anything productive in helping improve the model. What a waste! It’s even worse than it sounds. Because it is only in deployment that the most valuable bits of information which your model could learn from are revealed (What’s actually happening in the organizations I’m being used at? What are they using me for? And what kind of mistakes do I tend to make in the real world?)
We’ve got some genius grad student who has never been allowed to take an internship. And we keep giving it more and more classroom case studies in the form of RL training on environments. It’s bizarre and wasteful that we don’t train the AIs against all this experience could be accumulating thanks to being so broadly deployed through the economy and getting to practice against millions of different assignments given to them and being privy to so much tacit organization- and domain-specific knowledge
Getting the learning back to the weights
But this kind of continual learning requires going back to the weights. AIs can’t just keep building up a KV cache that grows in size as you keep learning from more and more users. That’s just not scalable, and it’s also not how humans learn. We don’t have some separation between parameters and activations. And there’s not some lump of these fast-weight representations that juts out further and further from our skull as we learn more things throughout our lifetime. When we learn stuff, there’s clearly some kind of compression, which actually aids generalization and grokking. There are in fact some humans who have this autistic savant type recall of random tables of numbers or nonsense syllables years later—basically the kind of fidelity of information that models have in context. And such sheer volume cripples these humans’ ability to understand abstractions and metaphors. Human continual learning is less about having all your observations at the tip of your tongue, and more about chiseling the right intuitions and big picture knowledge back into the weights.
But the moment you move into the weights, you have to give up on in-context learning’s sample efficiency. Because gradient updates are super sample-inefficient, all the successfully shipped online learning models have had to learn the same thing across millions of users. For example, the Cursor Tab model online-learns by predicting the same exact objective for over 400M+ requests a day (that objective is which edits got accepted). At least so far, we haven’t seen models online-learn different kinds of things for different users, because while a single session may generate more than enough data for a human to learn from, it’s not enough to train a more capable AI.
Current online learning can work for a very limited number of use cases. But the whole point of continual learning is that the world is very complicated, and each job and company and problem is different, and you need your intelligence to be able to learn the specific information related to a particular deployment, which simply can’t be stuffed into a shared training run. Things like how everything in your organization works and fits together, how to cooperate with the infrastructure and the other people around you to make progress on some larger project, what common failure modes are, etc.
This is the way in which sample efficiency and continual learning are actually deeply connected problems. Relatively little data is available to the model “on-the-job”. To learn from that data requires sample efficiency. Models can do that in context, but the “fast weights” built on the fly by attention[3] which allow for this sample efficiency scale very poorly in terms of memory. So we need architectural innovations which allow for some kind of intermediate representation. I talked before about how there are already many different working ideas for this kind of thing, from sparse attention and KV cache compaction. It doesn’t seem to me that architecture is fundamentally the bottleneck to continual learning.
Perhaps the bottleneck is the loss function. How do you update the weights (aka improve the model itself) based on information that was learned from one particular session? Even here naively it seems like there are many ideas that oughta work. Lots of people have been talking about on-policy self-distillation recently. If you want to learn more about how it works, check out this little impromptu blackboard lecture that Sasha Rush gave me a couple of weeks ago. But to summarize the explanation a bit, the idea is that we encourage the base model to make the same predictions when trying to solve some real world problem as the model with all the context accumulated after a long session would have made. The whole point of this procedure is to distill what the model learned in a session back into the weights themselves.
This is better than RLVR for two reasons. One, OPSD doesn’t require an outer loop verifiable reward. We just need a model that can learn the right things within the context window. As long as we have that, we can train the base model to match our veteran teacher model which has built up all this experience during the session. And two, OPSD provides a much denser supervision signal than naive RL—instead of projecting a single reward through the whole trajectory, you can train on the per token probability discrepancy between the teacher and student[4].
For continual learning, OPSD is also superior to supervised fine tuning. The most naive version of SFT for this application you can imagine is to train the base model to predict all the tokens observed during the session. But this makes no sense as a learning target - the way you get better at your job is not by recalling the transcript of what happened through every single day with perfect fidelity. Rather, it’s by consolidating the handful of insights and pieces of knowledge that are relevant to doing your job better.
RL training doesn’t suffer from this failure mode, and it’s great at concentrating the gradient update to only what is relevant to getting the outcome right—that’s why the updates from RL are incredibly sparse. And this is a very important property for continual learning, because as you’re learning on the job, you don’t want to overwrite and forget all the other things the base model knows.
I wrote a post a few months earlier arguing that RL learns much less information per sample than supervised learning. But this may be a good thing rather than a bad thing—you only change the model as much as is absolutely necessary to achieve the outcome, and no more. OPSD preserves this property of RL where instead of slingshotting towards the teacher distribution like supervised learning would have you do, you only extract the knowledge that is necessary to achieve the same results on real world tasks.
Dreaming
So OPSD is one way to attack the sample-efficiency problem: you can take this scarce real world experience and squeeze all the signal into a tiny, well-targeted update. But there’s also another much more speculative idea. Let’s call it dreaming[5]. If the AI can build a good simulation of reality against which to rehearse new skills, or try alternative strategies and reinforce what works, then it could experience orders of magnitude more simulated samples in the same wall clock time.
A couple years after DeepMind released AlphaZero, a group of researchers trained a model called EfficientZero. If this model and a human both got 2 hours total to play against a simulator of an Atari game they hadn’t seen before, this model would likely beat the novice human. Does that mean this model was more sample efficient than humans? Well it depends on how you measure sample efficiency. Because for each step in the real game, EfficientZero is playing dozens of simulated games in its head. In a similar way, future LLMs might be able to consume far less real-world data while practicing endlessly against environments they build for themselves. The big difference, of course, is that it’s much harder to build a simulation of the whole world than it is to emulate the game of Go. That’s why I said this is much more speculative.
If it works, it would become a fourth axis of scaling, alongside pretraining, RL, and inference-time compute. You can call it test-time training or dreaming. The model spends compute writing up RL environments in which rehearse the skills that will actually be used in production for a specific user. Instead of hitting /compact on Codex or Cursor or Claude, which kindles a small amount of compute to write up a summary, and which gives you a simulacrum of continual learning, you hit /dream, which incinerates huge amounts of compute to build and train against a video game version of what the model is witnessing in the world.
What 2027 looks like
So what might continual learning look like at the end of 2027, and how do we get there? All this RLVR training is producing an agent that can get its bearings when it’s thrown at an unfamiliar problem, and try different strategies, and iterate when it hits a roadblock. This is the crucial thing that RLVR has given you: an AI that is at least competent enough to start getting some real-world experience. Once you have that, you send it out into the world to do real work, even on projects off the training distribution.
By this point, effective context lengths may have expanded such that this AI can cowork with you for a full week of wall clock time. At the end of the week you give it a thumbs up or a thumbs down. If you give it a thumbs up, the base model distills everything the AI learned during the session, and it may use OPSD, or dreaming, or some other technique we aren’t even aware of, or a combination of all of the above, to do so. And AI can get better at domains that are adjacent to what it was explicitly trained for beforehand with RLVR. And in the next round it gets better at the thing adjacent to what it was previously online learned. The gamut of AI skills and knowledge and capability expands far beyond the verifiable domains against which the model was trained before it was deployed. Just as pre-training created a base intelligence that was smart enough to become a competent agent with further RLVR training, so RLVR has created an agent that is competent enough to actually be deployed in the world and thus take advantage of the future paradigm of continual learning.
By this point, the main way that AI gets better is not through the training received before the model is released to the public. Rather, it’s from all this experience that they are accumulating from being broadly deployed through the world and engaging in so many different kinds of tasks. Every time you interact with AI, it’ll be smarter. Not only because it has been learning from all your previous sessions, but also from all its interactions with all the other users in the world. And that’s scary and exciting and very different from the way that AI improves right now.
Just one hour of video consumes around 1 million tokens of text.
I’ve heard that AI agents are especially good at Go, because it has an excellent standardized package manager whereas Python and Typescript have a “massive combinatorial space of frameworks, typing approaches, and utility libraries.” Such spaces are less amenable to clean, high throughput, parallel search via gradient descent.
Let’s use Llama 3 70B as a reference. The KV cache (aka the representation that is built up from learning the context) grows 320 KB with each token. Whereas in training, the model only stores 0.075 bits per token (it’s a 70B model with 16 bit parameters trained on 15 trillion tokens). So between in-context learning and pre-training there’s a 35 million fold difference in the amount of information you’re storing per token.
One obvious issue you might anticipate with OPSD is this: you get dense supervision up to and at the point where the student makes an error, but the rest of the trajectory follows from that error - it continues down an already-mistaken path that the teacher was never going to visit anyway. So past that point, you’re no longer getting useful feedback from the teacher for the rest of the rollout. This seems fixable by a technique called Trajectory-Refined Distillation, where the teacher rewrites the trajectory from the error onward into a complete, correct continuation.
For what it’s worth, I’m not talking about the upcoming dreaming feature in the leaked Claude Code source code, which I’m guessing will be more about the model writing lots of Markdown files for itself. I mean actually updating the weights themselves. I just don’t think you can accumulate new skills by passing yourself notes. The analogy I used in a previous blog post: imagine if the way students learned how to play the saxophone is by giving this new instrument you’d never tried before a go, taking some notes about what went wrong, and then giving it to the next student who is also playing it for the first time.