散林搜索:利用大语言模型进行更智能的代码空间探索
Scattered Forest Search: Smarter Code Space Exploration with LLMs
AI总结:
将代码生成视为黑盒优化问题,提出散林搜索(SFS)方法,通过增强解多样性和利用反馈避免局部最优,在多个基准上显著提升pass@1并减半迭代次数。
摘要:
我们将代码生成视为代码空间内的黑盒优化问题,并展示受优化启发的技术如何增强推理扩展。基于这一视角,我们提出了散林搜索(SCATTERED FOREST SEARCH, SFS),这是一种新颖的方法,旨在提高解的多样性并更好地利用进化搜索过程中的反馈。我们的理论分析阐明了这些方法如何在优化过程中帮助避免局部最优,从而实现更高效的探索。在HumanEval、MBPP、APPS、CodeContests和Leetcode上的大量实验揭示了显著的性能提升。例如,我们的方法在GPT-3.5上于HumanEval+上达到了67.1%的pass@1率,在HumanEval上达到了87.2%,相较于最先进水平分别提升了8.6%和4.3%,同时将找到正确解所需的迭代次数减半。此外,我们的方法比现有搜索技术(包括树搜索、线搜索和重复采样)具有更高的扩展效率。
英文摘要:
We frame code generation as a black-box optimization problem within the code space and demonstrate how optimization-inspired techniques can enhance inference scaling. Based on this perspective, we propose SCATTERED FOREST SEARCH (SFS), a novel approach that improves solution diversity and better exploits feedback during evolutionary search. Our theoretical analysis illustrates how these methods help avoid local optima during optimization, leading to more efficient exploration. Extensive experiments on HumanEval, MBPP, APPS, CodeContests, and Leetcode reveal significant performance gains. For instance, our method achieves a pass@1 rate of 67.1% on HumanEval+ and 87.2% on HumanEval with GPT-3.5, marking improvements of 8.6% and 4.3% over the state-of-the-art, while also halving the iterations needed to find the correct solution. Furthermore, our approach scales more efficiently than existing search techniques, including tree search, line search, and repeated sampling.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。