让大模型推理更高效,只在必要时分支,节省大量计算。
Chain-in-Tree: Back to Sequential Reasoning in LLM Tree Search
- 通过轻量级判断决定何时分支,避免每步都展开
- 在GSM8K和Math500上减少75%-85%的生成耗时和调用次数
- 适用于多种树搜索框架,代码开源可复现
测试时扩展通过增加推理阶段的计算资源,提升了大语言模型在长程推理任务上的表现。基于树搜索的LLM推理(LITS)虽性能强,但效率极低。本文提出链式树(Chain-in-Tree, CiT),一种即插即用的框架,用于决定何时分支而非每步都展开。CiT引入轻量级分支必要性(BN)评估,包括直接提示(BN-DP)和自洽性(BN-SC)。集成到ToT、ReST-MCTS和RAP中后,BN-DP在GSM8K和Math500上将生成令牌数、模型调用次数和运行时间降低75%-85%,且准确率几乎无损。BN-SC通常带来高达80%的节省,但在14个设置中有1-4个出现不稳定,源于少数样本产生极长推理路径。理论证明了BN-DP不会增加策略调用次数,并发布了跨框架通用实现。完整代码已公开于https://github.com/xinzhel/chain_in_tree。
原文摘要 · Abstract (English)
Test-time scaling improves large language models (LLMs) on long-horizon reasoning tasks by allocating more compute at inference. LLM inference via tree search (LITS) achieves strong performance but is highly inefficient. We propose Chain-in-Tree (CiT), a plug-in framework that decides when to branch during search instead of expanding at every step. CiT introduces lightweight Branching Necessity (BN) evaluations, including BN-DP (direct prompting) and BN-SC (self-consistency). Integrated into Tree of Thoughts, ReST-MCTS, and RAP, BN-DP reduces token generation, model calls, and runtime by 75-85% on GSM8K and Math500, with often negligible or no accuracy loss. BN-SC typically yields substantial savings (up to 80%) generally but shows instability in 1-4 out of 14 settings, caused by a small subset of examples that produce extremely long reasoning steps. We theoretically prove that BN-DP never increases policy invocations and release unified implementations applicable across LITS frameworks. The full codebase is publicly available at https://github.com/xinzhel/chain_in_tree.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。