跳到正文
返回论文列表
cs.CL提交于 已译

ReMCTS: 用于代码生成的反思增强蒙特卡洛树搜索

ReMCTS: Reflection-Enhanced Monte Carlo Tree Search for Code Generation

Huifei Wang · Xinying Huang · Yiheng Sun · Yifan Yuan

中文摘要

开源权重大型语言模型(LLMs)虽能从自然语言提示生成函数级程序,但候选代码常因隐藏语义失败且在修复中重复错误。ReMCTS 是一种基于执行、记忆增强且由 LLM 引导的蒙特卡洛树搜索(MCTS)框架。它将程序候选组织为树状态,保留分支局部调试上下文,跨分支检索失败经验,并区分检查失败与证据缺失。在 HumanEval 和 MBPP-Sanitized 的留出评估中,可见测试下的 ReMCTS 在 10 个模型-数据集对中的 8 个优于直接生成,而仅依赖代理的搜索稳定性较差。消融实验分析了增益来源与局限。30 项任务的 HumanEval-X C++ 试点展示了与编译器执行兼容性,但未构成广泛的多语言评估。

关键要点

  1. 01针对 LLM 生成代码在隐藏语义上失败及修复时重复错误的问题,提出 ReMCTS 框架。
  2. 02采用执行接地、记忆增强的 MCTS 搜索,保留分支调试上下文并跨分支检索失败经验。
  3. 03在 HumanEval 和 MBPP-Sanitized 上,可见测试下 ReMCTS 在 8/10 模型-数据集对中优于直接生成。
  4. 04通过消融实验分析树搜索、采样、修复及记忆组件对性能增益的影响与局限。
  5. 05HumanEval-X C++ 试点验证了编译器执行兼容性,但未进行广泛的多语言评估。

解读

尚无解读。

原始英文摘要

arXiv:2609.34717v2 Announce Type: replace Abstract: Open-weight large language models (LLMs) can generate function-level programs from natural-language prompts, but plausible candidates still fail on hidden semantics and repeat mistakes across repair attempts. We present ReMCTS, an execution-grounded, memory-augmented, LLM-guided MCTS-style search framework. It organizes program candidates as tree states, retains branch-local debugging context, retrieves failure experience across branches, and distinguishes failed checks from unavailable evidence. On HumanEval and MBPP-Sanitized, visible-test ReMCTS improves over direct generation in 8 of 10 model-dataset pairs under held-out evaluation, whereas proxy-only search is less stable. Controlled tree-search, sampling, repair, and memory ablations characterize the source and limits of these gains. A 30-task HumanEval-X C++ pilot further demonstrates compatibility with compiler-backed execution, but does not constitute a broad multilingual evaluation.

同方向论文 · cs.CL

查看全部 →

反向发现 · 这篇论文相关的工具与提示词

去交叉发现 →

关联提示词 · 3

学习wangshuyi.substack.com·外部收录·

根据指定主题为儿童生成带互动模拟、练习和测验的单文件 HTML 教程。

首先明确定义角色:你是儿童互动教育内容开发专家。然后给明确的目标:根据用户指定主题,生成一个完整独立的互动学习 HTML 文件。背景是目标用户是青少年儿童,输出格式是单文件 HTML,CSS、JS 全都内联,最后就要这一个文件。设计原则要注重趣味性、互动性、视觉吸引力。输入参数一共有 3 个:学习主题(必选)、用户画像(可选,默认我们家老大 12 岁的男孩 Kevin)、卡通形象(可选,最近他和弟弟迷名侦探柯南,所以我就选用了名侦探柯南)。页面结构要求包括 HTML 框架、标…

学习github.com/f/awesome-chatgpt-prompts·外部收录·

School managment erp

I want to build full school erp in Shell | Electron (latest stable) | | Frontend | React + Vite + TypeScript | | UI | Ant Design v5 | | State | Zustand …

写作github.com/f/awesome-chatgpt-prompts·外部收录·

Prompt Writer for Specific Project

You are the "X App Architect," the lead technical project manager for the Pomodoro web application created by Y. You have full access to the project's file structure, code history, and design assets within this Google Antigravity environmen…