Paper: 2608.26070 Authors: Niklas Muennighoff, Zhengyang Wang, Zeyi Chen, Weijia Shi, Binyuan Hui, John Yang, Dapeng Jiang, Mika Senghaas, Fares Obeid, Johannes Hagemann, Sami Jaghouar, Ludwig Schmidt, Percy Liang, Jason Wei, Andrew Y. Ng, Luke Zettlemoyer, Yejin Choi, Mike Lewis Categories: cs.AI, cs.CL, cs.LG

The Gap

Test-time scaling works by letting a model think longer on hard problems. The mechanism is that the entire reasoning trace stays in memory under full attention, so every new token attends to every previous one. That is fine for short traces and ruinous for long ones: the memory requirement grows with the length of the trace, and the tasks that most need long thinking are exactly the ones where it becomes prohibitive.

The field has treated this as a cost to be paid. The paper’s opening observation reframes it: most intermediate reasoning tokens lose importance as the model continues reasoning. If that is true, then retaining the whole trace is not paying for capability — it is paying for history that has stopped influencing anything.

That distinction is what makes a cheap intervention possible. The question stops being “how do we afford full attention over longer traces” and becomes “which parts of the trace actually matter”.

   TEST-TIME SCALING AND ITS COST

   hard problem -> let the model reason longer
        |
        v
   full attention: every new token attends to ALL previous
        |
        +-- fine for short traces
        +-- memory grows with trace length
        +-- the tasks that NEED long thinking are exactly
            the ones where this becomes prohibitive
        |
        v
   [OBSERVATION] most intermediate reasoning tokens
                 LOSE IMPORTANCE as reasoning continues
        |
        v
   [GAP] we are paying quadratic cost to retain history
         that has stopped influencing the current step

The Increment

One sentence: Before this paper, long-horizon test-time scaling paid for the whole reasoning trace; after it, keeping only the prefix and a recent window caps memory regardless of trace length — 3x faster with no training and no loss, and enabling scaling past a hundred thousand tokens when trained with RL.

Core Mechanism

The intervention is deliberately simple, and the simplicity is the finding.

Keep the prefix and a recent window; discard the middle. Prefix Sliding drops tokens during reasoning that are neither part of the prefix nor part of a window of the last few thousand tokens. The two retained regions correspond to two different functional roles, and naming them is what justifies the design: the prefix holds the key instructions and available tools — the task specification, which must remain visible; the recent window holds the reasoning the model is currently working on. What gets discarded is the long middle: reasoning that was executed and whose influence on the next step has decayed.

The consequence is the property that matters for deployment: memory is capped regardless of how long the model reasons. This is not a constant-factor improvement, it is a change in the asymptotics. A trace of any length now has a bounded footprint, which is what makes long-horizon scaling affordable rather than merely cheaper.

Three results establish the useful range:

Without any training, Prefix Sliding makes existing models 3x faster while maintaining performance. That it works off the shelf is the strongest practical claim, because it means the observation about decaying importance is not a subtle property that requires the model to be adapted to it. The behaviour was already there.

Training with Prefix Sliding via reinforcement learning achieves better performance by enabling scaling to reasoning traces beyond a hundred thousand tokens. This is the second stage: once memory is bounded, the ceiling on trace length moves, and RL can exploit traces that were previously unreachable. Faster inference and a higher capability ceiling are separate benefits, delivered by the same mechanism.

Ablations show it outperforms summarising intermediate tokens or a vanilla sliding window. Both comparisons are the right ones. Summarising is the obvious alternative — compress the middle rather than drop it — and it loses, which suggests the discarded tokens are genuinely not worth even the cost of summarising. A vanilla sliding window discards the prefix too, losing the instructions, and it loses as well. The design occupies the narrow useful point between those two failures.

   PREFIX SLIDING: KEEP TWO REGIONS, DROP THE MIDDLE

   [ PREFIX ]            [ ... DISCARDED ... ]        [ WINDOW ]
   key instructions      executed reasoning            last few
   available tools       whose influence has           thousand
   (must stay visible)   decayed                       tokens
        |                                               |
        +------------------+----------------------------+
                           v
              memory CAPPED regardless of trace length
              (a change in asymptotics, not a constant)
                           |
        +------------------+-------------------+
        v                                      v
   NO TRAINING:                        TRAINING (RL):
   3x faster, performance              scales reasoning
   maintained                          BEYOND 100k tokens
                                       -> better performance
                           |
                           v
   ABLATIONS: beats summarising intermediate tokens,
              beats a vanilla sliding window

Think of it as how you work through a long proof on a whiteboard. You do not keep every intermediate line in front of you — you would run out of board and spend your time re-reading. You keep the problem statement pinned at the top (the prefix, always visible), the lines you are actively working on at the bottom (the window), and you erase the middle. You can erase it precisely because you already used it: if a step mattered to where you are now, its result is already folded into the current lines. Erasing is only dangerous when it removes something you still need, which is why the problem statement stays pinned and the recent working stays up. The paper’s ablation against summarising is the empirical version of a related intuition: if a middle line is not worth keeping, it is also not worth the effort of condensing.

Key Concepts

  • Decaying importance of intermediate reasoning: the observation motivating everything. Most tokens stop influencing the current step as reasoning proceeds, so retaining them buys nothing — which turns an apparently unavoidable cost into an avoidable one.
  • Capped memory as a change of asymptotics: the footprint becomes bounded regardless of trace length. This is what converts long-horizon test-time scaling from “expensive but possible” into “affordable”, and it is why the same mechanism yields both a speed win and a capability ceiling increase.
  • Prefix versus window and why both must stay: the prefix carries the specification, the window carries the active reasoning. Dropping either fails — losing the prefix loses the task, losing the window loses the thought — which is exactly what the vanilla-sliding-window ablation demonstrates.
  • Zero-training applicability: working on existing models without adaptation. It means the property was already latent in the models’ behaviour, and the intervention is exploiting it rather than teaching it.

Framework Shift

Before (retain the full trace):
  every token attends to all previous tokens
  memory grows with reasoning length
  -> long thinking is prohibitively expensive
  -> the trace is treated as an asset throughout

After (retain prefix + window):
  prefix (instructions, tools) + last few thousand tokens
  -> memory CAPPED regardless of length
  -> 3x faster with no training, no loss
  -> with RL, scales beyond 100k tokens
  -> beats both summarising and vanilla sliding window

From affording full attention over an ever-growing trace, to keeping only the two parts of the trace that are doing work, the core shift is that reasoning history is not uniformly valuable and the cost of retaining it can be avoided rather than budgeted.

Expert Assessment

Problem choice: Excellent, and it is the right kind of observation — a simple property that was available to anyone and had not been exploited. Test-time scaling’s memory cost has been treated as a structural property of the approach, and the paper shows it was a consequence of an unexamined assumption about the value of old tokens.

Method maturity: The intervention is minimal, which is a virtue here: two retained regions, one discarded middle, no training required for the main claim. The ablations are chosen well and both are informative — losing to a vanilla sliding window confirms the prefix matters, and beating summarisation confirms the discarded tokens are not worth even cheap compression. The obvious open question is how the window size interacts with task type: “the last few thousand tokens” is a fixed budget, and tasks with long-range dependencies within the reasoning would presumably need more.

Experimental integrity: Reporting that the method works with no training is the strongest and most falsifiable claim, and it is a claim about existing models rather than about a trained variant, which means it can be checked quickly. The RL result is a separate claim with a separate benefit, and the paper keeps them distinct rather than averaging them into one headline. The scope is reasoning-trace tasks; whether the same decay holds for agentic traces with interleaved tool calls and external results — where a much older token may be the only record of a critical observation — is a genuinely different setting that the paper does not settle.

Writing quality: The two-region design is stated with the function of each region, which is what makes it memorable: the prefix is the instructions, the window is the current thought. The code release makes it checkable. What would improve it further is a characterisation of the window size’s sensitivity, since that is the one hyperparameter a user must choose.

Verdict: strong accept — a simple, well-ablated intervention that removes a cost the field had accepted as structural, and that improves both throughput and the achievable reasoning ceiling.

Takeaways

  • Before optimising the cost of retaining context, check whether all of it is still influencing the output. Here most of a reasoning trace had stopped mattering, and the cost was avoidable rather than inherent.
  • Keep the specification and the recent working; drop the executed middle. Discarding is safe when a step’s result is already folded into what you are working on, so protect the parts that are not self-contained.
  • Prefer bounded memory over faster growth. Capping the footprint regardless of length is what turns a capability from expensive into available, and it delivered a ceiling increase on top of the speedup.
  • Test the cheap configuration before training for it. The 3x speedup required no training, which is worth knowing before investing in an adapted model.

论文: 2608.26070 作者: Niklas Muennighoff, Zhengyang Wang, Zeyi Chen, Weijia Shi, Binyuan Hui, John Yang, Dapeng Jiang, Mika Senghaas, Fares Obeid, Johannes Hagemann, Sami Jaghouar, Ludwig Schmidt, Percy Liang, Jason Wei, Andrew Y. Ng, Luke Zettlemoyer, Yejin Choi, Mike Lewis 分类: cs.AI, cs.CL, cs.LG

缺口

测试时扩展的用法,是让模型在难题上想得更久。其机制在于:整条推理轨迹在全注意力下都留在显存里,于是每一个新 token 都会去关注此前所有 token。 这对短轨迹没问题,对长轨迹则是灾难:显存需求随轨迹长度增长,而最需要长思考的那些任务,恰恰就是这里变得不可承受的地方

这个领域一直把它当作”必须付出的代价”。而本文开篇的观察把它重新框定了:随着推理继续,大多数中间推理 token 会逐渐失去重要性。 如果这成立,那么保留整条轨迹就不是在为能力付钱——而是在为一段已经不再影响任何东西的历史付钱。

正是这个区分让一个廉价的干预成为可能。问题不再是”我们如何负担得更长的全注意力轨迹”,而变成了”轨迹里到底哪些部分真的要紧”。

   测试时扩展及其代价

   难题 -> 让模型推理得更久
        |
        v
   全注意力:每个新 token 都关注「全部」历史
        |
        +-- 短轨迹没问题
        +-- 显存随轨迹长度增长
        +-- 那些「需要」长思考的任务,
            恰恰是这里变得不可承受的
        |
        v
   [观察] 随着推理继续,大多数中间推理 token
         会「逐渐失去重要性」
        |
        v
   [缺口] 我们在用二次代价,去保留那些
         已经不再影响当前步骤的历史

增量

一句话: 在这篇论文之前,长程测试时扩展要为整条推理轨迹付账;在这篇论文之后,只保留前缀与最近窗口,使显存与轨迹长度解耦——无需训练即可提速 3 倍且不掉点,并在配合强化学习训练后把推理扩展到十万 token 以上。

核心机制

这个干预刻意做得简单,而简单本身就是那份发现。

保留前缀与最近窗口,丢掉中间。 Prefix Sliding 在推理过程中丢弃那些既不属于前缀、也不属于最后几千个 token 窗口的 token。这两块被保留的区域对应两种不同的功能角色,而把它们点名,正是这个设计成立的理由:前缀承载关键指令与可用工具——也就是任务规格说明,它必须始终可见;最近窗口承载模型当前正在处理的推理。被丢弃的是那条漫长的中段:已经执行过、且对下一步的影响力已经衰减的推理。

由此得到那个对部署至关重要的性质:无论模型推理多久,显存都被封顶。 这不是常数级的改良,而是渐近行为的改变。任意长度的轨迹如今都有一个有界的占用——这才让长程扩展从”勉强能付”变成”负担得起”。

三项结果界定了它的有效范围:

在完全不训练的情况下,Prefix Sliding 让现有模型提速 3 倍,同时保持性能。 “开箱即用”是最强的实用主张,因为它意味着”重要性衰减”这个观察并不是一个需要模型去适应它的微妙性质。这个行为本来就在那里

用强化学习配合 Prefix Sliding 训练,可通过把推理轨迹扩展到十万 token 以上来取得更好的性能。 这是第二阶段:一旦显存被封顶,轨迹长度的天花板就上移了,强化学习得以利用此前无法触及的轨迹。更快的推理与更高的能力上限是两项彼此独立的收益,而它们由同一个机制带来。

消融实验表明,它优于”对中间 token 做摘要”以及传统的滑动窗口。 这两个对照挑得都对。“摘要”是显而易见的替代方案——压缩中段而不是丢弃它——而它更差,这暗示被丢弃的 token 甚至不值得花摘要的成本。传统滑动窗口连前缀一起丢,于是丢了指令,同样更差。这个设计恰好占住了那两种失败之间的有效窄点。

   PREFIX SLIDING:保留两块区域,丢弃中段

   [ 前缀 ]              [ ... 丢弃 ... ]            [ 窗口 ]
   关键指令              已执行、影响力          最后几千个
   可用工具              已经衰减的推理          token
   (必须始终可见)                              |
        |                                               |
        +------------------+----------------------------+
                           v
              无论推理多久,「显存被封顶」
              (是渐近行为的改变,不是常数改良)
                           |
        +------------------+-------------------+
        v                                      v
   不训练:                          训练(强化学习):
   提速 3 倍,性能保持               可把推理扩展到
                                     十万 token 以上
                                     -> 性能更好
                           |
                           v
   消融:优于「对中间 token 做摘要」,
         也优于传统滑动窗口

可以用**“在白板上做一道很长的证明时你怎么处理”**来理解这件事: 你不会把每一行中间步骤都留在眼前——白板会不够用,而你的时间会耗在反复重读上。 你会把题目钉在最上面(前缀,始终可见)、把正在推导的那几行留在最下面(窗口),然后把中间擦掉。 你能安心擦掉它,正是因为你已经用过了:如果某一行的结论对”你现在所处的位置”还有影响,那它早就已经被并进当前这几行里了。 擦除只有在”删掉了你仍然需要的东西”时才危险——这就是题目要钉住、最近的推导要留着的原因。 论文针对”摘要”的消融,是另一条相关直觉的经验版本:如果一行中段不值得留,它同样不值得花力气去压缩。

关键概念

  • 中间推理的重要性衰减: 驱动一切的那个观察。随着推理推进,大多数 token 不再影响当前步骤,因此保留它们什么也换不来——这把一笔看似不可避免的开销,变成了一笔可以避免的开销。
  • 以显存封顶作为渐近行为的改变: 无论轨迹多长,占用都是有界的。正是它把长程测试时扩展从”昂贵但可行”变成”负担得起”,也正是同一个机制既带来速度收益、又抬高能力上限的原因。
  • 前缀与窗口,以及为什么两者都要留: 前缀承载规格说明,窗口承载活跃的推理。丢掉任一个都会失败——丢前缀就丢了任务,丢窗口就丢了思路——而这正是”传统滑动窗口”那条消融所演示的。
  • 零训练可用性: 在现有模型上无需适配即可生效。这意味着该性质本来就已经潜藏在模型行为里,这个干预是在利用它,而不是在它。

框架转变

之前(保留整条轨迹):
  每个 token 都关注此前所有 token
  显存随推理长度增长
  -> 长思考昂贵到不可承受
  -> 轨迹被全程当作「资产」

之后(保留前缀 + 窗口):
  前缀(指令、工具)+ 最后几千个 token
  -> 无论多长,显存「封顶」
  -> 不训练即提速 3 倍,不掉点
  -> 配合强化学习,可扩展至 10 万 token 以上
  -> 同时优于「摘要」与「传统滑动窗口」

从”为一条不断增长的轨迹负担全注意力”,转变为”只保留轨迹中真正在起作用的那两部分”,核心转变在于:推理历史的价值并非均匀分布,而保留它的代价可以被避免,而不是被预算

专家评审

选题眼光: 极好,而且正是那种正确的观察——一个本来谁都能拿到的简单性质,此前却没人去利用。 测试时扩展的显存代价一直被当作该路线的结构性属性,而论文表明:它其实是一个”关于旧 token 价值”的未经审视假设所带来的结果。

方法成熟度: 干预极小,而在这里这是一种美德:保留两块、丢弃一块中段,主要主张不需要任何训练。 消融挑得好,而且两条都带信息——输给传统滑动窗口,确认了前缀确实要紧;赢过”摘要”,确认了那些被丢弃的 token 连廉价压缩都不值得。显而易见的开放问题是窗口大小与任务类型的交互:“最后几千个 token”是一个固定预算,而推理内部存在长程依赖的任务,按理需要更多。

实验诚意: “无需训练即可生效”是最强也最可证伪的主张,而且它是关于现有模型的主张,因此可以被快速核查。 强化学习的结果是另一项主张、另一项收益,论文把它们分开陈述,而没有平均成一个头条数字。范围是推理轨迹类任务;而在带有交错工具调用与外部结果返回的智能体轨迹中——那里一个很久以前的 token 可能是某项关键观察的唯一记录——同样的衰减是否成立,是一个真正不同的设定,论文并未给出结论。

写作功力: 双区域设计是连同各自的功能一起陈述的,这正是它便于记忆的原因:前缀是指令,窗口是当前思路。代码开源让它可被核查。 若能进一步刻画窗口大小的敏感性——那是用户唯一必须自己选的超参数——会更有帮助。

判决: 强接收(Strong Accept) — 一个简单、消融充分到位的干预,移除了一个被领域当作结构性成本而接受下来的开销,并同时改善了吞吐与可达到的推理上限。

要点总结

  • 在优化”保留上下文的成本”之前,先检查这些上下文是否都还在影响输出。这里一条推理轨迹的大部分已经停止起作用,因此那笔开销是可避免的,而不是固有的
  • 保留规格说明与最近的工作,丢弃已经执行完的中段。当某一步的结果已经并入你正在处理的内容时,丢弃是安全的——所以要保护那些不自包含的部分。
  • 优先选择有界显存,而不是”增长得更快”。无论长度多少都把占用封顶,正是把一个能力从”昂贵”变成”可用”的关键;而它在提速之外,还带来了上限的提升。
  • 在为一个方案投入训练之前,先测那个廉价配置。3 倍提速不需要任何训练——这在决定是否投入去做适配模型之前,值得先知道。