ArCHer: Training Language Model Agents via Hierarchical Multi-Turn RL

📄 arXiv: 2402.19446v1 📥 PDF

作者: Yifei Zhou, Andrea Zanette, Jiayi Pan, Sergey Levine, Aviral Kumar

分类: cs.LG, cs.AI, cs.CL

发布日期: 2024-02-29


💡 一句话要点

提出ArCHer框架以解决多轮RL在语言模型中的应用问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 层次化强化学习 语言模型 多轮交互 决策支持 样本效率 代理任务 深度学习

📋 核心要点

  1. 现有的单轮强化学习方法无法有效支持多轮交互中的信息获取和决策推理,限制了LLM在复杂任务中的应用。
  2. 本文提出的ArCHer框架采用层次化RL方法,通过并行运行高层次和低层次RL算法,解决多轮交互中的奖励聚合和策略训练问题。
  3. 实验结果显示,ArCHer在代理任务上实现了约100倍的样本效率提升,并在模型容量增大时表现出更好的性能。

📝 摘要(中文)

大型语言模型(LLMs)的广泛应用之一是在目标导向的决策任务中,其中LLM不仅需要为给定提示生成完成,还需在多轮交互中做出智能决策。现有的强化学习(RL)方法主要集中于优化单轮奖励,无法有效支持多轮信息获取、信用分配和过去行为推理。本文提出了一种新的多轮RL算法框架ArCHer,结合了高层次的离线价值基RL算法和低层次的RL算法,以有效处理多轮交互、长时间跨度和延迟奖励。实验证明,ArCHer在代理任务上显著提高了效率和性能,样本效率提升约100倍,并在模型容量增大时表现更佳。

🔬 方法详解

问题定义:本文旨在解决现有单轮RL方法在多轮交互中无法有效进行信息获取、信用分配和推理的问题。这些问题限制了LLM在复杂决策任务中的应用能力。

核心思路:论文提出的ArCHer框架通过层次化RL方法,结合高层次的离线价值基RL算法和低层次的RL算法,能够有效处理多轮交互中的奖励聚合和策略训练,从而提升LLM的决策能力。

技术框架:ArCHer框架包含两个主要模块:高层次的RL算法用于聚合多轮对话中的奖励,低层次的RL算法则在每轮对话中利用高层次的价值函数来训练token策略。整体流程通过并行运行这两个模块来实现高效的多轮RL训练。

关键创新:ArCHer的主要创新在于其层次化结构,能够有效整合多轮交互中的信息,并通过并行算法提升样本效率,这与传统的单轮RL方法有本质区别。

关键设计:在设计中,ArCHer采用了近端策略优化(PPO)等现有单轮RL方法的灵活性,同时针对多轮任务进行了优化,确保在长时间跨度和延迟奖励的情况下仍能有效学习。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,ArCHer在代理任务上实现了约100倍的样本效率提升,相较于现有方法具有显著的性能优势。此外,随着模型容量的增大,ArCHer的性能进一步提升,验证了其在大规模模型上的有效性。

🎯 应用场景

该研究的潜在应用领域包括智能客服、在线教育、自动化决策支持等。通过提升LLM在多轮交互中的决策能力,ArCHer能够为这些领域提供更智能、更高效的解决方案,推动人机交互的进步。

📄 摘要(原文)

A broad use case of large language models (LLMs) is in goal-directed decision-making tasks (or "agent" tasks), where an LLM needs to not just generate completions for a given prompt, but rather make intelligent decisions over a multi-turn interaction to accomplish a task (e.g., when interacting with the web, using tools, or providing customer support). Reinforcement learning (RL) provides a general paradigm to address such agent tasks, but current RL methods for LLMs largely focus on optimizing single-turn rewards. By construction, most single-turn RL methods cannot endow LLMs with the ability to intelligently seek information over multiple turns, perform credit assignment, or reason about their past actions -- all of which are critical in agent tasks. This raises the question: how can we design effective and efficient multi-turn RL algorithms for LLMs? In this paper, we develop a framework for building multi-turn RL algorithms for fine-tuning LLMs, that preserves the flexibility of existing single-turn RL methods for LLMs (e.g., proximal policy optimization), while accommodating multiple turns, long horizons, and delayed rewards effectively. To do this, our framework adopts a hierarchical RL approach and runs two RL algorithms in parallel: a high-level off-policy value-based RL algorithm to aggregate reward over utterances, and a low-level RL algorithm that utilizes this high-level value function to train a token policy within each utterance or turn. Our hierarchical framework, Actor-Critic Framework with a Hierarchical Structure (ArCHer), can also give rise to other RL methods. Empirically, we find that ArCHer significantly improves efficiency and performance on agent tasks, attaining a sample efficiency of about 100x over existing methods, while also improving with larger model capacity (upto the 7 billion scale that we tested on).