MCTS-Judge:LLM作为裁判在代码正确性评估中的测试时扩展
MCTS-Judge: Test-Time Scaling in LLM-as-a-Judge for Code Correctness Evaluation
AI总结:
提出MCTS-Judge框架,利用蒙特卡洛树搜索在测试时进行多视角分解评估,显著提升LLM作为裁判在代码正确性评估中的准确性和效率。
摘要:
LLM作为裁判的范式在评估生成内容方面显示出潜力,但在推理密集型场景(如编程)中缺乏可靠性。受近期推理模型进展和扩展定律变化的启发,我们率先将测试时计算引入LLM作为裁判,提出MCTS-Judge,一种资源高效的、系统2思维框架,用于代码正确性评估。MCTS-Judge利用蒙特卡洛树搜索(MCTS)将问题分解为更简单的、多视角的评估。通过结合基于当前轨迹中历史动作的自我评估和基于先前rollout的树的上置信界(UCT)的节点选择策略,MCTS-Judge平衡了全局优化和当前轨迹的细化。我们进一步设计了一种高精度的、单元测试级别的奖励机制,以鼓励大语言模型(LLM)进行逐行分析。在三个基准和五个LLM上的大量实验证明了MCTS-Judge的有效性,它将基础模型的准确率从41%提升到80%,同时比o1系列模型少使用3倍的token。进一步的评估验证了其推理轨迹在逻辑、分析、全面性和整体质量上的优越性,同时揭示了LLM作为裁判范式的测试时扩展定律。
英文摘要:
The LLM-as-a-Judge paradigm shows promise for evaluating generative content but lacks reliability in reasoning-intensive scenarios, such as programming. Inspired by recent advances in reasoning models and shifts in scaling laws, we pioneer bringing test-time computation into LLM-as-a-Judge, proposing MCTS-Judge, a resource-efficient, System-2 thinking framework for code correctness evaluation. MCTS-Judge leverages Monte Carlo Tree Search (MCTS) to decompose problems into simpler, multi-perspective evaluations. Through a node-selection strategy that combines self-assessment based on historical actions in the current trajectory and the Upper Confidence Bound for Trees based on prior rollouts, MCTS-Judge balances global optimization and refinement of the current trajectory. We further designed a high-precision, unit-test-level reward mechanism to encourage the Large Language Model (LLM) to perform line-by-line analysis. Extensive experiments on three benchmarks and five LLMs demonstrate the effectiveness of MCTS-Judge, which improves the base model's accuracy from 41% to 80%, surpassing the o1-series models with 3x fewer tokens. Further evaluations validate the superiority of its reasoning trajectory in logic, analytics, thoroughness, and overall quality, while revealing the test-time scaling law of the LLM-as-a-Judge paradigm.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。