Skip to main content
QUICK REVIEW

[论文解读] Neuro Symbolic Reasoning for Planning: Counterexample Guided Inductive Synthesis using Large Language Models and Satisfiability Solving

Sumit Kumar Jha, Susmit Jha|arXiv (Cornell University)|Sep 28, 2023
Topic ModelingComputer Science被引用 3
一句话总结

本文提出了一种神经符号框架,将大型语言模型(LLMs)与可满足性模理论(SMT)求解器相结合,以生成块世界问题的可证明正确计划。通过迭代使用SMT求解器检测并提供LLM生成的错误计划的反例,该系统通过反馈循环引导LLM生成正确解,显著提高了在安全关键规划任务中的可靠性。

ABSTRACT

Generative large language models (LLMs) with instruct training such as GPT-4 can follow human-provided instruction prompts and generate human-like responses to these prompts. Apart from natural language responses, they have also been found to be effective at generating formal artifacts such as code, plans, and logical specifications from natural language prompts. Despite their remarkably improved accuracy, these models are still known to produce factually incorrect or contextually inappropriate results despite their syntactic coherence - a phenomenon often referred to as hallucination. This limitation makes it difficult to use these models to synthesize formal artifacts that are used in safety-critical applications. Unlike tasks such as text summarization and question-answering, bugs in code, plan, and other formal artifacts produced by LLMs can be catastrophic. We posit that we can use the satisfiability modulo theory (SMT) solvers as deductive reasoning engines to analyze the generated solutions from the LLMs, produce counterexamples when the solutions are incorrect, and provide that feedback to the LLMs exploiting the dialog capability of instruct-trained LLMs. This interaction between inductive LLMs and deductive SMT solvers can iteratively steer the LLM to generate the correct response. In our experiments, we use planning over the domain of blocks as our synthesis task for evaluating our approach. We use GPT-4, GPT3.5 Turbo, Davinci, Curie, Babbage, and Ada as the LLMs and Z3 as the SMT solver. Our method allows the user to communicate the planning problem in natural language; even the formulation of queries to SMT solvers is automatically generated from natural language. Thus, the proposed technique can enable non-expert users to describe their problems in natural language, and the combination of LLMs and SMT solvers can produce provably correct solutions.

研究动机与目标

  • 解决LLM生成的正式产物(如计划和代码)中的幻觉问题,这些问题可能导致安全关键系统出现灾难性故障。
  • 克服纯归纳式LLM的局限性,尽管其输出在语法上正确,但缺乏形式化验证保证。
  • 使非专家用户能够以自然语言描述规划问题,同时确保生成的解决方案在形式上正确。
  • 将SMT求解器的演绎推理集成到与LLM的交互式循环中,通过反例反馈纠正错误输出。
  • 证明将归纳学习(LLMs)与演绎验证(SMT)相结合在可信程序与计划综合中的可行性和有效性。

提出的方法

  • 使用指令微调的LLM(如GPT-4、GPT-3.5 Turbo)从自然语言问题描述中生成计划。
  • 通过自然语言提示自动将LLM生成的计划转换为形式化逻辑表示。
  • 使用SMT求解器(Z3)验证生成的计划是否符合问题的初始状态和目标条件。
  • 当计划不正确时,SMT求解器识别出最小的不可行前缀,并将其作为反例返回给LLM。
  • 将反例作为对话上下文的一部分反馈给LLM,促使LLM迭代地修改计划。
  • 重复验证与优化循环,直至生成正确计划,确保其形式正确性。

实验结果

研究问题

  • RQ1在SMT求解器提供形式化验证引导下,LLM能否可靠地生成块世界问题的正确计划?
  • RQ2反例引导的反馈循环在纠正LLM生成的幻觉或错误计划方面有多有效?
  • RQ3不同LLM(如GPT-4与GPT-3.5 Turbo)对正确计划生成的成功率及所需迭代次数有何影响?
  • RQ4SMT验证的集成在日益复杂的规划问题中,对降低LLM生成计划的失败率有多大影响?
  • RQ5非专家用户能否有效以自然语言描述规划问题,并通过该混合方法获得形式上正确的解决方案?

主要发现

  • GPT-4在三块问题中成功生成了20个计划中的19个,但在十块问题中仅成功2个,表明存在可扩展性限制。
  • GPT-3.5 Turbo在三块问题中成功生成了20个计划中的12个,性能在五块问题中下降至4个正确计划。
  • 反例引导的反馈循环减少了生成正确计划所需的迭代次数,GPT-4平均每个问题需2–3次迭代。
  • SMT求解器成功识别出错误计划中的不可行前缀,例如无效的动作序列(如尝试从非顶部移除积木)。
  • 该方法实现了从自然语言到形式化验证计划的端到端合成,无需用户具备形式逻辑或SMT语法的专业知识。
  • SMT验证的集成显著提升了LLM在复杂或模糊场景中生成正确计划的可靠性。

更好的研究,从现在开始

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

无需绑定信用卡

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