---
title: "前缀滑动：实现高效测试时扩展的新方法"
source: "arXiv AI/CL/LG（论文）"
source_tier: "t2"
url: "https://arxiv.org/abs/2608.26070v1"
permalink: "https://feed.astralor.com/items/itm_6dca582753d4de676e34c3ff"
published: "2026-08-26T17:37:15.000Z"
score: 71
channel: "ai"
tags: ["arXiv","前缀滑动","大语言模型","强化学习","测试时扩展"]
---

# 前缀滑动：实现高效测试时扩展的新方法

## AI 点评

> 这篇论文最值得关注的是“大部分中间推理词元不重要”这一反直觉发现，它让长推理的成本问题有了轻量解法。对做推理优化或部署长思考模型的团队来说，Prefix Sliding几乎可以开箱即用，值得立刻试一下。

## 速览

测试时扩展通过增加推理计算量提升模型性能，但完整注意力机制下长推理轨迹会带来高昂内存开销。研究发现大多数中间推理词元在后续推理中重要性下降，据此提出前缀滑动（Prefix Sliding）方法：在推理过程中丢弃不属于前缀或最近数千词元窗口的词元，将内存需求限制为常数，且无需训练即可使现有模型速度提升3倍而保持性能。结合强化学习训练，该方法可支持超过十万词元的推理轨迹，实现更优性能。消融实验表明，前缀滑动优于中间词元摘要或传统滑动窗口方法。

## 关键点

- 发现推理过程中大部分中间词元对后续推理重要性降低，为选择性丢弃提供依据。
- 前缀滑动方法无需训练即可使现有模型推理速度提升3倍且性能不变。
- 结合强化学习可支持超过10万词元的推理轨迹，进一步提升性能。
- 消融实验证明前缀滑动优于中间摘要和普通滑动窗口方法。

## 全文

Test-time scaling uses extra test-time compute to improve performance, such as letting language models reason longer when solving a problem. As models keep the entire reasoning trace in memory via full attention, hard tasks that need long thinking can be prohibitively expensive. However, we find most intermediate reasoning tokens lose importance as the model continues reasoning. This calls into question whether retaining them is worth the cost. Based on this insight, we propose Prefix Sliding, which discards tokens during reasoning that are not part of the prefix or the window of the last few thousand tokens. The prefix has key instructions and tools available to the model, while the most recent tokens are the current reasoning the model is working on. This caps the total memory requirement regardless of how long the model reasons, allowing for efficient long-horizon test-time scaling. Without training, Prefix Sliding can make existing models 3x faster while maintaining performance. Training with Prefix Sliding using reinforcement learning can achieve better performance by enabling scaling to reasoning traces beyond a hundred thousand tokens. Ablations show Prefix Sliding outperforms summarizing intermediate tokens or vanilla sliding window. Our code is at https://github.com/Muennighoff/prefix-sliding

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_6dca582753d4de676e34c3ff
