arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.19446cs.LGcs.AIcs.CL
收藏

ArCHer:通过层级式多轮 RL 训练语言模型智能体

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

University of California, Berkeley(加州大学伯克利分校);Google DeepMind(谷歌DeepMind)

Yifei Zhou, Andrea Zanette, Jiayi Pan, Sergey Levine, Aviral Kumar

AI总结:

本文提出层级式多轮 RL 框架 ArCHer,通过并行的高层价值学习与低层 token 策略训练,使 LLM 智能体高效处理长程交互,并实现约 100 倍样本效率提升。

摘要:

大型语言模型(LLM)的一个广泛用例是目标导向的决策任务(或称“智能体”任务),在这类任务中,LLM 不仅需要为给定提示生成补全,还需要在多轮交互中做出智能决策以完成任务(例如在与网页交互、使用工具或提供客户支持时)。强化学习(RL)为解决此类智能体任务提供了一种通用范式,但当前面向 LLM 的 RL 方法主要关注优化单轮奖励。就其构造方式而言,大多数单轮 RL 方法无法赋予 LLM 在多个轮次中智能地寻求信息、进行信用分配或推理其过去行动的能力——而这些能力在智能体任务中都至关重要。这就引出了一个问题:我们如何才能为 LLM 设计有效且高效的多轮 RL 算法?在本文中,我们开发了一个用于构建多轮 RL 算法以微调 LLM 的框架,该框架保留了现有面向 LLM 的单轮 RL 方法(例如近端策略优化)的灵活性,同时能够有效适应多轮、长视野和延迟奖励。为此,我们的框架采用层级式 RL 方法,并并行运行两种 RL 算法:一种高层的离策略、基于价值的 RL 算法,用于聚合跨话语的奖励;以及一种低层 RL 算法,它利用该高层价值函数在每个话语或轮次内训练 token 策略。我们的层级框架,即具有层级结构的 Actor-Critic 框架(Actor-Critic Framework with a Hierarchical Structure,ArCHer),还可以衍生出其他 RL 方法。实验上,我们发现 ArCHer 显著提升了智能体任务上的效率和性能,相对于现有方法实现了约 100 倍的样本效率,同时还能随模型容量增大而提升(最高达到我们测试的 70 亿规模)。

英文摘要:

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).

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

↑