Skip to main content
QUICK REVIEW

[论文解读] Generalized Planning in PDDL Domains with Pretrained Large Language Models

Tom Silver, Soham Dan|arXiv (Cornell University)|May 18, 2023
Software Engineering Research被引用 6
一句话总结

本文提出使用 GPT-4 通过从少量示例的 PDDL 任务中合成 Python 程序,来生成 PDDL 领域中的广义规划器。结合思维链提示(CoT)和自动化调试,GPT-4 展现出强大的泛化能力——通常仅需两个训练任务即可实现,表明 LLM 可作为强大、高效且可解释的广义规划器,在七个领域中均表现优异。

ABSTRACT

Recent work has considered whether large language models (LLMs) can function as planners: given a task, generate a plan. We investigate whether LLMs can serve as generalized planners: given a domain and training tasks, generate a program that efficiently produces plans for other tasks in the domain. In particular, we consider PDDL domains and use GPT-4 to synthesize Python programs. We also consider (1) Chain-of-Thought (CoT) summarization, where the LLM is prompted to summarize the domain and propose a strategy in words before synthesizing the program; and (2) automated debugging, where the program is validated with respect to the training tasks, and in case of errors, the LLM is re-prompted with four types of feedback. We evaluate this approach in seven PDDL domains and compare it to four ablations and four baselines. Overall, we find that GPT-4 is a surprisingly powerful generalized planner. We also conclude that automated debugging is very important, that CoT summarization has non-uniform impact, that GPT-4 is far superior to GPT-3.5, and that just two training tasks are often sufficient for strong generalization.

研究动机与目标

  • 探究预训练的大规模语言模型(LLMs)是否可作为 PDDL 领域中的广义规划器,生成可重用的程序而非针对每个任务的计划。
  • 评估 GPT-4 在从 PDDL 领域中合成领域特定的 Python 程序方面的能力,这些程序可泛化到未见过的任务。
  • 评估方法论增强(如思维链总结和自动化调试)对程序正确性和泛化能力的影响。
  • 将 GPT-4 的性能与 GPT-3.5 及消融基线进行比较,分析数据效率和鲁棒性。
  • 探索在传统方法复杂或不切实际的领域中,使用 LLM 实现广义规划的可行性。

提出的方法

  • 向 GPT-4 提供一个 PDDL 领域和一组少量训练任务(以 PDDL 编码),以生成一个 Python 程序,该程序接收任务描述并输出一个计划。
  • 引入思维链(CoT)提示,指导 GPT-4 先以自然语言总结领域并提出解决方案策略,然后再编写代码。
  • 应用自动化调试:在训练任务上执行生成的程序;若失败,则提供反馈(如异常信息),并最多四次重新提示 GPT-4 以修复错误。
  • 使用一个验证程序与训练任务的流水线,并通过反馈循环迭代改进程序。
  • 合成的程序避免基于搜索的规划,而是根据指令偏好采用简单、非搜索策略。
  • 在七个 PDDL 领域中进行评估,包括六个来自先前工作的领域和一个新领域,与消融模型和基线进行比较。
Figure 1: Overview of pipeline for generalized planning with pretrained LLMs. See text for details.
Figure 1: Overview of pipeline for generalized planning with pretrained LLMs. See text for details.

实验结果

研究问题

  • RQ1GPT-4 是否能通过从少量示例中生成可重用的 Python 程序,在 PDDL 领域中有效合成广义规划器?
  • RQ2思维链提示如何影响合成广义计划的质量和正确性?
  • RQ3自动化调试在多大程度上提升了 LLM 生成规划器的可靠性与泛化能力?
  • RQ4GPT-4 在多样化的 PDDL 领域中与 GPT-3.5 相比,广义规划性能如何?
  • RQ5实现强泛化所需的最少训练任务数量是多少?性能在示例更少时是否会下降?

主要发现

  • GPT-4 是一种出人意料的强大广义规划器,在七个 PDDL 领域中均优于多个基线和消融模型。
  • 自动化调试至关重要:若无此机制,GPT-4 频繁生成错误或无法运行的代码,但引入后成功率显著提升。
  • 思维链提示的影响不一致——在某些领域有帮助,但在所有领域并非始终有益。
  • GPT-4 显著优于 GPT-3.5,展现出更强的推理与代码生成能力,适用于广义规划。
  • 通常仅需两个训练任务即可实现强泛化,仅少数情况在自动化调试中需要第三个任务。
  • 即使移除 PDDL 名称,LLM 仍能有效泛化,表明其可从语法结构中学习,尽管在大多数情况下名称能提升性能。
Figure 2: GPT-4 synthesized program runtime compared to a state-of-the-art planner (Fast Downward). Note the log-log axes. Each point is a median over 10 newly generated tasks, over all seeds where generalized planning solved all evaluation tasks.
Figure 2: GPT-4 synthesized program runtime compared to a state-of-the-art planner (Fast Downward). Note the log-log axes. Each point is a median over 10 newly generated tasks, over all seeds where generalized planning solved all evaluation tasks.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。