arXiv:2602.00129cs.LGcs.SE2026-02

用蒙特卡洛树搜索提升大模型修复代码的准确性与效率

Monte Carlo Tree Search for Execution-Guided Program Repair with Large Language Models

  • 结合蒙特卡洛树搜索与大模型,分层定位错误并探索修复路径
  • 在SWE-bench Lite上实现24.67%的问题修复率,优于现有基线
  • 适合需要高可靠性自动化修复的软件工程场景

基于大语言模型的自动化程序修复在仓库级仍具挑战,源于长时推理需求与自回归解码的局限。本文提出CodePilot,一种融合蒙特卡洛树搜索(MCTS)与大语言模型的混合框架,支持真实GitHub问题的执行引导式修复。该框架从仓库到文件、函数层级进行分层故障定位,利用MCTS探索多样化的补丁路径,并以执行反馈作为奖励信号指导搜索与优化。此外,引入置信度校准生成机制,仅对低置信度输出进行选择性精炼。在SWE-bench Lite上的实验表明,CodePilot使用开源权重模型实现了24.67%的问题修复率,优于可比基线。结果表明,符号搜索与神经语言模型结合是实现可扩展、执行感知的软件工程自动化的有效策略。

原文摘要 · Abstract (English)

Automated program repair with large language models remains challenging at the repository level due to long-horizon reasoning requirements and the limitations of autoregressive decoding. We present CodePilot, a hybrid framework that integrates Monte Carlo Tree Search (MCTS) with large language models to enable execution-guided program repair for real-world GitHub issues. CodePilot performs hierarchical fault localization from repository to file and function level, explores diverse patch trajectories using MCTS, and leverages execution feedback as a reward signal to guide search and refinement. The framework further incorporates confidence-calibrated generation to selectively refine low-confidence outputs. Experiments on SWE-bench Lite demonstrate that CodePilot achieves a 24.67% issue resolution rate using open-weight models, outperforming comparable baselines. These results suggest that combining symbolic search with neural language models is an effective strategy for scalable, execution-aware software engineering automation.

程序修复大模型MCTS自动化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。