2025-04-18 · 专家 · 机器学习 · 自然语言处理

Sleep-time Compute: Beyond Inference Scaling at Test-time

该论文提出了一种名为“sleep-time compute”的新方法,允许模型在测试时之前对上下文进行离线推理,从而显著减少测试时的计算需求。

更新于 2025-04-18。作者:Kevin Lin、Charlie Snell、Yu Wang、Charles Packer、Sarah Wooders、Ion Stoica、Joseph E. Gonzalez。

中文摘要

扩展测试时计算能力已成为使大型语言模型(LLMs)能够解决困难问题的一个关键因素,但这伴随着高延迟和推理成本。我们提出了睡眠时间计算,它允许模型在查询呈现之前对上下文进行“思考”:通过预测用户可能会提出什么查询并预先计算有用的量,我们可以显著减少测试时的计算需求。为了展示我们方法的有效性,我们创建了两个推理任务的修改版本——有状态的 GSM-Symbolic 和有状态的 AIME。我们发现,睡眠时间计算可以将达到相同准确性的测试时计算量减少约 5 倍,并且在有状态的 GSM-Symbolic 和有状态的 AIME 上,通过扩展睡眠时间计算,我们可以进一步提高准确度,最高可达 13% 和 18%。此外,我们引入了多查询 GSM-Symbolic,它通过在每个上下文中包含多个相关查询来扩展 GSM-Symbolic。通过使用多查询 GSM-Symbolic 在相同上下文的相关查询之间分摊睡眠时间计算,我们可以将每个查询的平均成本降低 2.5 倍。然后,我们进行了额外的分析,以了解睡眠时间计算何时最有效,发现用户查询的可预测性与睡眠时间计算的有效性高度相关。最后,我们对将睡眠时间计算应用于现实中的代理 SWE 任务进行了案例研究。

英文摘要

Scaling test-time compute has emerged as a key ingredient for enabling large language models (LLMs) to solve difficult problems, but comes with high latency and inference cost. We introduce sleep-time compute, which allows models to "think" offline about contexts before queries are presented: by anticipating what queries users might ask and pre-computing useful quantities, we can significantly reduce the compute requirements at test-time. To demonstrate the efficacy of our method, we create modified versions of two reasoning tasks - Stateful GSM-Symbolic and Stateful AIME. We find that sleep-time compute can reduce the amount of test-time compute needed to achieve the same accuracy by ~ 5x on Stateful GSM-Symbolic and Stateful AIME and that by scaling sleep-time compute we can further increase accuracy by up to 13% on Stateful GSM-Symbolic and 18% on Stateful AIME. Furthermore, we introduce Multi-Query GSM-Symbolic, which extends GSM-Symbolic by including multiple related queries per context. By amortizing sleep-time compute across related queries about the same context using Multi-Query GSM-Symbolic, we can decrease the average cost per query by 2.5x. We then conduct additional analysis to understand when sleep-time compute is most effective, finding the predictability of the user query to be well correlated with the efficacy of sleep-time compute. Finally, we conduct a case-study of applying sleep-time compute to a realistic agentic SWE task.

解读

一句话总结

该论文提出了一种名为“sleep-time compute”的新方法,允许模型在测试时之前对上下文进行离线推理,从而显著减少测试时的计算需求。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源