[论文解读] Is Reinforcement Learning (Not) for Natural Language Processing: Benchmarks, Baselines, and Building Blocks for Natural Language Policy Optimization
该论文介绍 RL4LMs,这是一个用于以强化学习训练语言模型的开源库;GRUE 基准用于评估基于 RL 的 NLP 对人类偏好的一致性;以及 NLPO,一种带有令牌级掩码的在策略 RL 算法,相较 PPO 在 LM 对齐任务中提高稳定性和性能。
We tackle the problem of aligning pre-trained large language models (LMs) with human preferences. If we view text generation as a sequential decision-making problem, reinforcement learning (RL) appears to be a natural conceptual framework. However, using RL for LM-based generation faces empirical challenges, including training instability due to the combinatorial action space, as well as a lack of open-source libraries and benchmarks customized for LM alignment. Thus, a question rises in the research community: is RL a practical paradigm for NLP? To help answer this, we first introduce an open-source modular library, RL4LMs (Reinforcement Learning for Language Models), for optimizing language generators with RL. The library consists of on-policy RL algorithms that can be used to train any encoder or encoder-decoder LM in the HuggingFace library (Wolf et al. 2020) with an arbitrary reward function. Next, we present the GRUE (General Reinforced-language Understanding Evaluation) benchmark, a set of 6 language generation tasks which are supervised not by target strings, but by reward functions which capture automated measures of human preference. GRUE is the first leaderboard-style evaluation of RL algorithms for NLP tasks. Finally, we introduce an easy-to-use, performant RL algorithm, NLPO (Natural Language Policy Optimization) that learns to effectively reduce the combinatorial action space in language generation. We show 1) that RL techniques are generally better than supervised methods at aligning LMs to human preferences; and 2) that NLPO exhibits greater stability and performance than previous policy gradient methods (e.g., PPO (Schulman et al. 2017)), based on both automatic and human evaluations.
研究动机与目标
- 证明 RL 能够有效地将预训练的语言模型与人类偏好对齐。
- 提供一个开源的模块化工具包,用于基于 RL 的语言模型优化。
- 引入 GRUE,作为由人类偏好奖励驱动的基于 RL 的 NLP 任务的基准。
- 提出 NLPO,以减小语言生成中的大动作空间并提高训练稳定性。
提出的方法
- 开发 RL4LMs,一个与 HuggingFace 模型和 stable-baselines-3 兼容的在策略 RL 工具包。
- 将语言生成建模为以令牌为单位的马尔可夫决策过程,具有逐令牌或逐序列奖励。
- 引入 NLPO,一种使用 top-p 掩码的掩蔽 PPO 变体,以在训练期间减少行动空间。
- 定义基于 KL 的正则化奖励,以在任务奖励和保持接近基础 LM 之间取得平衡。
- 创建 GRUE,这是一个多任务基准,具有多样的基于奖励的评估和人类研究。
- 提供广泛的消融研究和分析,比较 PPO、NLPO 以及监督+RL 设置。
实验结果
研究问题
- RQ1在多样化的 NLP 任务中,RL 技术是否能在将语言模型与人类偏好对齐方面超越有监督微调?
- RQ2在大动作空间的语言生成任务中,NLPO 是否比 PPO 提供更高的稳定性与性能?
- RQ3奖励质量、基线 KL 正则化和掩蔽在多大程度上影响 RL 的稳定性和对齐质量?
- RQ4与纯监督方法相比,RL 方法在数据效率或参数效率方面是否有所提升?
- RQ5在基于 RL 的语言策略优化中,自动化指标与人类判断的相关性有多强?
主要发现
- 在所评估的任务中,RL 方法通常在将语言模型与人类偏好对齐方面超越了监督方法。
- NLPO 在自动评估和人工评估中都比 PPO 展现出更高的稳定性和性能。
- KL 惩罚和面向任务的掩蔽(top-p)有助于缓解奖励欺骗并提升对齐质量。
- 监督型热启动和数据高效的奖励学习能够在较小模型上取得强劲性能。
- 在改进奖励模型时,RL 比监督学习在数据效率上可能更高,而将 NLPO 与监督结合在某些任务中可以超越大型监督模型。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。