arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2604.14853cs.LG
收藏

通过约束策略优化实现推理大语言模型的自适应推理时间计算分配

Adaptive Test-Time Compute Allocation for Reasoning LLMs via Constrained Policy Optimization

Fudan University(复旦大学);ETH Zurich(苏黎世联邦理工学院);Guangming Lab(光明实验室)

Zhiyuan Zhai, Bingcong Li, Bingnan Xiao, Ming Li, Xin Wang

AI总结:

本文提出通过约束优化问题解决推理时间计算分配问题,采用两阶段解决-学习流程,在解决阶段利用拉格朗日松弛分解全局约束,学习阶段训练轻量分类器预测 oracle 动作,实验证明方法在 MATH 和 GSM8K 数据集上优于均匀和启发式分配基线。

摘要:

推理时间计算扩展(test-time compute scaling),即在推理过程中通过重复采样、搜索或扩展推理来花费额外计算,已成为提升大语言模型性能的强大杠杆。然而,在有限的推理预算下部署这些技术需要做出当前系统大多忽略的决策:哪些输入值得更多计算,哪些可以廉价回答?我们将其形式化为一个约束优化问题(在平均计算预算下最大化预期准确率),并采用两阶段 Solve-then-Learn 流程解决。在解决阶段,拉格朗日松弛将全局约束分解为每个实例的子问题,每个子问题允许一个闭合形式的 oracle 动作,该动作最优地将准确率与成本定价。我们证明诱导成本在对偶变量中单调递增,从而通过二分搜索实现精确预算定位。在学习阶段,训练一个轻量分类器,从廉价输入特征预测 oracle 动作,将分配规则 amortize 用于实时部署。我们证明学习策略的任务级遗憾被其模仿误差乘以最坏情况下的每实例差距所限制,从而实现从约束推理到监督分类的清晰减少。在 MATH 和 GSM8K 上使用三个 LLM(DeepSeek-V3、GPT-4o-mini、Qwen2.5-7B)的实验表明,我们的方法在匹配预算约束下在 MATH 上实现高达 12.8% 的相对准确率提升,同时接近拉格朗日 oracle 上限,模仿准确率超过 91%。

英文摘要:

Test-time compute scaling, the practice of spending extra computation during inference via repeated sampling, search, or extended reasoning, has become a powerful lever for improving large language model performance. Yet deploying these techniques under finite inference budgets requires a decision that current systems largely ignore: which inputs deserve more compute, and which can be answered cheaply? We formalize this as a constrained optimization problem (maximize expected accuracy subject to an average compute budget) and solve it with a two-stage Solve-then-Learn pipeline. In the solve stage, Lagrangian relaxation decomposes the global constraint into per-instance sub-problems, each admitting a closed-form oracle action that optimally prices accuracy against cost. We prove that the induced cost is monotone in the dual variable, enabling exact budget targeting via binary search. In the learn stage, a lightweight classifier is trained to predict oracle actions from cheap input features, amortizing the allocation rule for real-time deployment. We establish that the task-level regret of the learned policy is bounded by its imitation error times the worst-case per-instance gap, yielding a clean reduction from constrained inference to supervised classification. Experiments on MATH and GSM8K with three LLMs (DeepSeek-V3, GPT-4o-mini, Qwen2.5-7B) show that our method consistently outperforms uniform and heuristic allocation baselines, achieving up to 12.8% relative accuracy improvement on MATH under matched budget constraints, while closely tracking the Lagrangian oracle upper bound with over 91% imitation accuracy.

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

↑