True Knowledge Comes from Practice: Aligning LLMs with Embodied Environments via Reinforcement Learning
作者: Weihao Tan, Wentao Zhang, Shanqi Liu, Longtao Zheng, Xinrun Wang, Bo An
分类: cs.LG, cs.AI, cs.CL
发布日期: 2024-01-25 (更新: 2024-03-11)
备注: Accepted by ICLR2024
💡 一句话要点
提出TWOSOME框架以解决LLMs与环境不对齐问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱三:空间感知与语义 (Perception & Semantics) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 强化学习 决策代理 知识对齐 样本效率 智能系统 在线学习
📋 核心要点
- 现有大型语言模型在简单决策任务中表现不佳,主要由于其知识与环境之间的不对齐。
- TWOSOME框架通过将LLMs作为决策代理,利用强化学习与环境高效交互,解决了知识对齐问题。
- 实验结果显示,TWOSOME在经典决策环境Overcooked和模拟家庭环境VirtualHome中,样本效率和性能显著优于基线方法。
📝 摘要(中文)
尽管大型语言模型(LLMs)在众多任务中表现出色,但在简单决策任务中常常失败,原因在于LLMs的知识与环境之间的不对齐。相反,强化学习(RL)代理从零开始学习策略,虽然与环境始终对齐,但难以有效利用先验知识进行探索。为缩小这一差距,本文提出了TWOSOME,一个新颖的在线框架,利用LLMs作为决策代理,通过RL与具身环境高效交互和对齐,无需任何准备数据集或环境的先验知识。实验结果表明,TWOSOME在样本效率和性能上显著优于传统RL方法PPO和提示调优方法SayCan,并在未见任务上展现出优越的泛化能力。
🔬 方法详解
问题定义:本文旨在解决大型语言模型(LLMs)在决策任务中与环境不对齐的问题。现有方法如强化学习(RL)代理虽然能够与环境对齐,但难以有效利用先验知识进行高效探索。
核心思路:TWOSOME框架通过将LLMs作为决策代理,利用强化学习的方式与环境进行高效交互,避免了对准备数据集和先验知识的依赖,从而实现知识的有效对齐。
技术框架:TWOSOME的整体架构包括行为策略生成、策略稳定性增强和参数高效训练三个主要模块。首先,通过查询LLMs的联合概率生成行为策略;其次,提出两种归一化方法和四条提示设计原则以增强策略的稳定性;最后,设计了一个参数高效的训练架构,采用共享的冻结LLM和低秩适配器(LoRA)进行PPO更新。
关键创新:TWOSOME的主要创新在于将LLMs与RL结合,形成了一种新的在线框架,显著提高了样本效率和决策性能。这一方法与传统RL方法的本质区别在于其不依赖于环境的先验知识。
关键设计:在TWOSOME中,采用了两种归一化方法来增强策略的稳定性,并设计了四条提示原则。此外,训练架构中使用了共享的冻结LLM和低秩适配器(LoRA),使得参数更新更加高效。
🖼️ 关键图片
📊 实验亮点
TWOSOME在样本效率和性能上显著优于传统的强化学习方法PPO和提示调优方法SayCan。在经典决策环境Overcooked和模拟家庭环境VirtualHome中,TWOSOME的表现提升幅度明显,且在未见任务上展现出更强的泛化能力,验证了其有效性。
🎯 应用场景
TWOSOME框架具有广泛的应用潜力,尤其在需要实时决策的具身智能系统中,如机器人控制、自动驾驶和智能家居等领域。通过有效对齐LLMs与环境,该方法能够提升智能体的决策能力和适应性,推动智能系统的实际应用和发展。
📄 摘要(原文)
Despite the impressive performance across numerous tasks, large language models (LLMs) often fail in solving simple decision-making tasks due to the misalignment of the knowledge in LLMs with environments. On the contrary, reinforcement learning (RL) agents learn policies from scratch, which makes them always align with environments but difficult to incorporate prior knowledge for efficient explorations. To narrow the gap, we propose TWOSOME, a novel general online framework that deploys LLMs as decision-making agents to efficiently interact and align with embodied environments via RL without requiring any prepared datasets or prior knowledge of the environments. Firstly, we query the joint probabilities of each valid action with LLMs to form behavior policies. Then, to enhance the stability and robustness of the policies, we propose two normalization methods and summarize four prompt design principles. Finally, we design a novel parameter-efficient training architecture where the actor and critic share one frozen LLM equipped with low-rank adapters (LoRA) updated by PPO. We conduct extensive experiments to evaluate TWOSOME. i) TWOSOME exhibits significantly better sample efficiency and performance compared to the conventional RL method, PPO, and prompt tuning method, SayCan, in both classical decision-making environment, Overcooked, and simulated household environment, VirtualHome. ii) Benefiting from LLMs' open-vocabulary feature, TWOSOME shows superior generalization ability to unseen tasks. iii) Under our framework, there is no significant loss of the LLMs' original ability during online PPO finetuning.