让语言模型自适应地调整推理深度,提升准确率而不增加参数。
RecurTrace: Adaptive Latent Reasoning with Loop-Time Memory

- 通过循环记忆注意力机制,让每轮推理可回看之前计算结果。
- 自适应停止头根据当前状态决定是否继续迭代,平均仅需2.0轮。
- 在相同算力下优于固定循环和现有自适应方法,尤其对大模型更有效。
重复中间层的小块能提升语言模型的有效推理深度,且不增加参数或生成额外标记。然而,现有方法受限于两点:每轮仅依赖前一轮输出,无法直接访问早期计算;固定循环次数则对简单任务浪费算力,对难题又不够。本文提出RecurTrace,利用循环轨迹解决上述问题。其核心是循环记忆注意力,使每轮可沿循环时间轴访问自身过往状态,实现对早期计算的回溯。同时引入停止头,读取循环状态并预测是否继续,监督信号来自能识别何时进一步加深仍可降低损失的专家。在相同循环骨干上进行数学问答测试,RecurTrace达56.9%准确率,平均2.0次循环,优于最优固定循环深度方案2.2个百分点(同算力)。相较之下,ACT与PonderNet退化为1次循环,CALM仅达54.1%(5.6次循环),而更强的LoopUS-Conf和TaH-Mismatch分别达到55.3%(3.2次)和55.7%(2.1次)。此外,RecurTrace在0.6B、1.7B、4B和8B规模上均优于同预算微调基线,增益随模型增大从0.6到3.4点递增。
原文摘要 · Abstract (English)
Repeating a small block of middle layers increases a language model's effective inference depth without adding parameters or generating extra tokens, and recent work shows that this latent recurrence improves reasoning. However, two design choices limit these gains. Each iteration sees only the previous output and cannot directly access earlier computations. Moreover, a fixed loop count wastes depth on easy inputs while leaving hard ones with too little computation. We introduce RecurTrace, which addresses both limitations using the loop's own trajectory. Specifically, Loop Memory Attention lets each looped layer attend to its own states from previous iterations along the loop-time axis, so the model can revisit earlier computations instead of relying on the latest state alone. A halting head then reads the loop state and predicts whether to continue, with supervision from an oracle that identifies when additional depth still reduces loss. In a controlled MathQA comparison on the same looped backbone, RecurTrace achieves 56.9% accuracy with an average of 2.0 loops, exceeding the best fixed loop depth by 2.2 points at matched compute. By comparison, ACT and PonderNet collapse to one loop, and CALM reaches only 54.1% with 5.6 loops, while the stronger LoopUS-Conf and TaH-Mismatch baselines reach 55.3% at 3.2 loops and 55.7% at 2.1 loops. Finally, RecurTrace improves generation accuracy over same-budget fine-tuned baselines at 0.6B, 1.7B, 4B, and 8B, with the gain growing with model size from 0.6 to 3.4 points.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。