arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.11053cs.CLcs.AI
收藏

SRA-MCTS:面向代码生成的基于蒙特卡洛树搜索的自驱动推理增强

SRA-MCTS: Self-driven Reasoning Augmentation with Monte Carlo Tree Search for Code Generation

School of Computer Science and Technology, Beijing Institute of Technology, Beijing, China(计算机科学与技术学院,北京理工大学,北京)

Bin Xu, Yiguan Lin, Yinghao Li, Yang Gao

AI总结:

本文提出 SRA-MCTS 方法,通过蒙特卡洛树搜索引导模型自主生成高质量推理路径并转化为可执行代码,在无额外监督下提升不同规模模型的复杂代码生成能力,并在 CoT 退化时保持稳健。

摘要:

大型语言模型在简单代码生成任务中表现出色,但在处理复杂问题时仍面临挑战。这些挑战可能源于推理能力和问题分解能力的不足。为解决这一问题,我们提出了一种推理增强的数据生成过程 SRA-MCTS,它引导模型自主生成高质量的中间推理路径。这形成了一个正反馈循环,使模型能够持续改进。我们的方法完全通过模型自身运行,无需额外的监督。通过合成自然语言推理路径并将其转化为可执行代码,该方法确保了分析准确性,并提高了解决复杂任务的成功率。实验结果表明,即使在没有额外监督信号的情况下,我们的方法在不同模型规模上均取得了性能提升,展示了小模型自我改进的巨大潜力。此外,当传统的思维链(CoT)方法出现性能下降时,该方法仍保持稳健,在 pass@10 等多样性指标上观察到显著改进。我们鼓励进一步探索训练数据中的推理过程,以增强语言模型解决复杂问题的能力。我们的代码和数据已在 https://github.com/DIRECT-BIT/SRA-MCTS 公开。

英文摘要:

Large language models demonstrate exceptional performance in simple code generation tasks but still face challenges in tackling complex problems. These challenges may stem from insufficient reasoning and problem decomposition capabilities. To address this issue, we propose a reasoning-augmented data generation process, SRA-MCTS, which guides the model to autonomously generate high-quality intermediate reasoning paths. This creates a positive feedback loop, enabling continuous improvement. Our method operates entirely through the model itself without requiring additional supervision. By synthesizing natural language reasoning paths and translating them into executable code, the approach ensures analytical accuracy and enhances the success rate in solving complex tasks. Experimental results show that, even without additional supervisory signals, our method achieves performance improvements across different model scales, demonstrating the significant potential of self-improvement in small models. Furthermore, the method remains robust when traditional Chain-of-Thought (CoT) approaches exhibit performance degradation, with notable improvements observed in diversity metrics such as pass@10. We encourage further exploration of reasoning processes within training data to enhance the ability of language models to address complex problems. Our code and data are public at https://github.com/DIRECT-BIT/SRA-MCTS.

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

↑