arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2405.16450cs.LGcs.AIcs.PL

利用大语言模型引导搜索合成程序化强化学习策略

Synthesizing Programmatic Reinforcement Learning Policies with Large Language Model Guided Search

National Taiwan University(台湾大学);Microsoft(微软公司)

Max Liu, Chan-Hung Yu, Wei-Hsu Lee, Cheng-Wei Hung, Yen-Chun Chen, Shao-Hua Sun

AI总结:

本文提出LLM-GS框架,通过Pythonic-DSL策略和Scheduled Hill Climbing算法,利用大语言模型引导搜索高效合成程序化强化学习策略,显著提升样本效率并降低使用门槛。

摘要:

程序化强化学习(PRL)已被探索用于通过程序来表示策略,以此实现可解释性和泛化能力。尽管已有成果显示出良好前景,但当前最先进的PRL方法仍受样本效率低下的制约,通常需要数千万次程序与环境的交互。为应对这一挑战,我们提出了一种新颖的LLM引导搜索框架(LLM-GS)。我们的核心思路是利用大语言模型(LLM)的编程专长和常识推理能力,来提升无假设、随机猜测式搜索方法的效率。针对LLM难以在领域特定语言(DSL)中生成精确且语法正确程序的问题,我们提出了一种Pythonic-DSL策略——先让LLM生成Python代码,再将其转换为DSL程序。为进一步优化LLM生成的程序,我们开发了一种名为Scheduled Hill Climbing的搜索算法,旨在高效探索程序化搜索空间,从而持续改进程序。在Karel领域的实验结果表明,我们的LLM-GS框架具有优越的有效性和效率。大量消融研究进一步验证了Pythonic-DSL策略和Scheduled Hill Climbing算法的关键作用。此外,我们在两个新任务上进行了实验,结果表明LLM-GS能够使不具备编程技能以及不了解领域或DSL知识的用户,通过自然语言描述任务即可获得高性能程序。

英文摘要:

Programmatic reinforcement learning (PRL) has been explored for representing policies through programs as a means to achieve interpretability and generalization. Despite promising outcomes, current state-of-the-art PRL methods are hindered by sample inefficiency, necessitating tens of millions of program-environment interactions. To tackle this challenge, we introduce a novel LLM-guided search framework (LLM-GS). Our key insight is to leverage the programming expertise and common sense reasoning of LLMs to enhance the efficiency of assumption-free, random-guessing search methods. We address the challenge of LLMs' inability to generate precise and grammatically correct programs in domain-specific languages (DSLs) by proposing a Pythonic-DSL strategy - an LLM is instructed to initially generate Python codes and then convert them into DSL programs. To further optimize the LLM-generated programs, we develop a search algorithm named Scheduled Hill Climbing, designed to efficiently explore the programmatic search space to improve the programs consistently. Experimental results in the Karel domain demonstrate our LLM-GS framework's superior effectiveness and efficiency. Extensive ablation studies further verify the critical role of our Pythonic-DSL strategy and Scheduled Hill Climbing algorithm. Moreover, we conduct experiments with two novel tasks, showing that LLM-GS enables users without programming skills and knowledge of the domain or DSL to describe the tasks in natural language to obtain performant programs.

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

↑