arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.16142cs.AIcs.LG
收藏

基于属性的LLM程序合成用于规划

Property-Guided LLM Program Synthesis for Planning

Federal University of Rio Grande do Sul(里约格朗德杜斯尔大学);University of Oxford(牛津大学);Linköping University(林奈大学)

André G. Pereira, Augusto B. Corrêa, Jendrik Seipp

AI总结:

本文研究了一种基于属性的LLM程序合成方法,通过检查候选程序是否满足形式定义的属性来指导LLM生成更高质量的程序,从而减少生成和评估成本。

摘要:

LLMs在程序合成中表现出色,能够发现超越先前解决方案的程序。然而,这些方法依赖于简单的数值评分来指示程序质量,如解决方案的值或通过的测试数量。因为评分无法指导程序为何失败,系统必须生成并评估许多候选程序,希望其中一些成功,从而增加LLM推理和评估成本。我们研究了一种不同的方法:属性引导的LLM程序合成。与评分程序后评估不同,我们检查候选程序是否满足形式定义的属性。当属性被违反时,我们提前停止评估并提供具体的反例,显示程序为何失败。这种反馈显著减少了程序生成的数量和评估成本,并可以指导LLM生成更强大的程序。我们在PDDL规划领域评估了这种方法,要求LLM合成直接启发函数:每个通过严格改进转换可达的状态都有严格改进的后继。具有这种属性的启发函数可使爬山算法直接到达目标状态。反例引导的修复循环生成一个候选程序,检查训练集上的属性,并返回第一个违反属性的案例。我们在十个规划领域上评估了这种方法,并使用分布外测试集。合成的启发函数在几乎所有测试任务中都是直接的,与最佳先前生成方法相比,我们的方法在每个领域平均生成的程序数量少七倍,无需使用搜索即可解决更多任务,并且评估候选人的计算量减少了几个数量级。只要问题允许可验证的属性,属性引导的LLM合成可以降低成本并提高程序质量。

英文摘要:

LLMs have shown impressive success in program synthesis, discovering programs that surpass prior solutions. However, these approaches rely on simple numeric scores to signal program quality, such as the value of the solution or the number of passed tests. Because a score offers no guidance on why a program failed, the system must generate and evaluate many candidates hoping some succeed, increasing LLM inference and evaluation costs. We study a different approach: property-guided LLM program synthesis. Instead of scoring programs after evaluation, we check whether a candidate satisfies a formally defined property. When the property is violated, we stop the evaluation early and provide the LLM with a concrete counterexample showing exactly how the program failed. This feedback drastically reduces both the number of program generations and the evaluation cost, and can guide the LLM to generate stronger programs. We evaluate this approach on PDDL planning domains, asking the LLM to synthesize direct heuristic functions: every state reachable by strictly improving transitions has a strictly improving successor. A heuristic with this property leads hill-climbing algorithm directly to a goal state. A counterexample-guided repair loop generates one candidate program, checks the property over a training set, and returns the first case that violates the property. We evaluate our approach on ten planning domains with an out-of-distribution test set. The synthesized heuristics are effectively direct on virtually all test tasks, and compared to the best prior generation method our approach generates seven times fewer programs per domain on average, solves more tasks without using search, and requires several orders of magnitude less computation to evaluate candidates. Whenever a problem admits a verifiable property, property-guided LLM synthesis can reduce cost and improve program quality.

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

↑