arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.05315cs.LGcs.AIcs.CL

通过弹性推理实现可扩展的思维链

Scalable Chain of Thoughts via Elastic Reasoning

Salesforce AI Research(Salesforce人工智能研究)

Yuhui Xu, Hanze Dong, Lei Wang, Doyen Sahoo, Junnan Li, Caiming Xiong

AI总结:

针对大型推理模型思维链输出长度不受控、难适配资源约束部署的问题,提出分思考与解答双阶段的弹性推理框架,搭配预算约束滚动训练策略,在多基准上实现低训练成本、高约束鲁棒性及更高效的推理。

摘要:

大型推理模型(LRM)通过生成扩展的思维链(CoT)在复杂任务上取得了显著进展。然而,其不受控制的输出长度给实际部署带来了重大挑战,因为实际场景中推理时的token预算、延迟或计算资源都受到严格限制。我们提出了弹性推理(Elastic Reasoning),这是一种用于可扩展思维链的新型框架,它明确将推理分为两个阶段——思考阶段和解答阶段——并为其独立分配预算。在测试时,弹性推理优先保障解答片段的完整性,在资源紧张的约束下显著提升了可靠性。为了训练对截断思考具有鲁棒性的模型,我们引入了一种轻量级的预算约束滚动策略,该策略被集成到GRPO中,能教会模型在思考过程被提前截断时自适应推理,并且无需额外训练就能有效泛化到未见过的预算约束条件。在数学基准(AIME、MATH500)和编程基准(LiveCodeBench、Codeforces)上的实验结果表明,弹性推理在严格的预算约束下表现稳健,同时训练成本远低于基线方法。值得注意的是,即使在无约束的设置下,我们的方法也能产生更简洁高效的推理过程。我们的代码已发布在https://github.com/SalesforceAIResearch/Elastic-Reasoning。

英文摘要:

Large reasoning models (LRMs) have achieved remarkable progress on complex tasks by generating extended chains of thought (CoT). However, their uncontrolled output lengths pose significant challenges for real-world deployment, where inference-time budgets on tokens, latency, or compute are strictly constrained. We propose Elastic Reasoning, a novel framework for scalable chain of thoughts that explicitly separates reasoning into two phases--thinking and solution--with independently allocated budgets. At test time, Elastic Reasoning prioritizes the completeness of solution segments, significantly improving reliability under tight resource constraints. To train models that are robust to truncated thinking, we introduce a lightweight budget-constrained rollout strategy, integrated into GRPO, which teaches the model to reason adaptively when the thinking process is cut short and generalizes effectively to unseen budget constraints without additional training. Empirical results on mathematical (AIME, MATH500) and programming (LiveCodeBench, Codeforces) benchmarks demonstrate that Elastic Reasoning performs robustly under strict budget constraints, while incurring significantly lower training cost than baseline methods. Remarkably, our approach also produces more concise and efficient reasoning even in unconstrained settings. Our code has been made available at https://github.com/SalesforceAIResearch/Elastic-Reasoning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑