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

Parsel:通过组合分解实现语言模型的算法推理

Parsel: Algorithmic Reasoning with Language Models by Composing Decompositions

Stanford University(斯坦福大学)

Eric Zelikman, Qian Huang, Gabriel Poesia, Noah D. Goodman, Nick Haber

AI总结:

Parsel框架将复杂算法任务自动分解为分层自然语言函数描述并结合测试搜索实现,显著提升LLM在程序合成与机器人规划上的表现。

摘要:

尽管大语言模型(LLM)推理近期取得了成功,但LLM在生成复杂程序等分层多步推理任务上仍面临困难。对于这类任务,人类通常先进行高层次的算法设计,再逐步实现各个部分。我们提出Parsel,一个支持代码LLM自动实现和验证复杂算法的框架。借助Parsel,我们自动将算法任务分解为分层的自然语言函数描述,然后利用测试在可能的函数实现组合中进行搜索。我们表明Parsel可跨领域用于需要分层推理的任务,包括程序合成和机器人规划。我们发现,使用Parsel后,LLM在APPS数据集中能解决更多竞赛级问题,其通过率比直接采样AlphaCode和Codex的先前结果高出75%以上,同时通常使用更小的采样预算。此外,借助自动生成的测试,我们发现Parsel能将HumanEval上最先进的pass@1性能从67%提升到85%。我们还发现,使用Parsel生成的LLM机器人规划被认为准确的概率是直接生成规划的两倍以上。最后,我们探讨了Parsel如何应对LLM的局限性,并讨论了Parsel对人类程序员可能具有的用途。我们在https://github.com/ezelikman/parsel发布了代码。

英文摘要:

Despite recent success in large language model (LLM) reasoning, LLMs struggle with hierarchical multi-step reasoning tasks like generating complex programs. For these tasks, humans often start with a high-level algorithmic design and implement each part gradually. We introduce Parsel, a framework enabling automatic implementation and validation of complex algorithms with code LLMs. With Parsel, we automatically decompose algorithmic tasks into hierarchical natural language function descriptions and then search over combinations of possible function implementations using tests. We show that Parsel can be used across domains requiring hierarchical reasoning, including program synthesis and robotic planning. We find that, using Parsel, LLMs solve more competition-level problems in the APPS dataset, resulting in pass rates over 75\% higher than prior results from directly sampling AlphaCode and Codex, while often using a smaller sample budget. Moreover, with automatically generated tests, we find that Parsel can improve the state-of-the-art pass@1 performance on HumanEval from 67\% to 85\%. We also find that LLM-generated robotic plans using Parsel are more than twice as likely to be considered accurate than directly generated plans. Lastly, we explore how Parsel addresses LLM limitations and discuss how Parsel may be useful for human programmers. We release our code at https://github.com/ezelikman/parsel

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

↑