arXiv:2410.02743cs.CL2024-10ICLR被引 15

用宏观动作提升语言模型对齐效率,训练更快更稳。

MA-RLHF: Reinforcement Learning from Human Feedback with Macro Actions

  • 将多个词元合并为宏观动作,缩短奖励与行为的时间距离
  • 文本摘要和代码生成任务性能最高提升30%,对话任务提升18%
  • 训练速度比传统方法快1.7至2倍,适合长序列生成任务

基于人类反馈的强化学习(RLHF)在对齐大语言模型与人类偏好方面表现优异。然而,传统的词元级RLHF在长序列中面临信用分配难题,延迟奖励使模型难以判断哪些行为导致了理想结果,影响学习效率并延缓收敛。本文提出MA-RLHF,一种简单有效的RLHF框架,将一系列词元或更高层次的语言结构作为宏观动作引入学习过程。通过在更高抽象层级操作,该方法缩短了动作与奖励之间的时间距离,实现更快速、更准确的信用分配,从而获得更稳定的策略梯度估计,提升每轮训练的学习效率,且不增加训练或推理时的计算开销。我们在多种模型规模和任务上进行实验验证,涵盖文本摘要、对话生成、问答和程序合成。结果表明,本方法相比标准RLHF有显著性能提升:文本摘要与代码生成任务最高提升30%,对话任务提升18%,问答任务提升8%。值得注意的是,该方法在训练时间上达到传统RLHF同等效果的1.7至2倍速度,并在持续训练中保持优势。代码与数据已公开于https://github.com/ernie-research/MA-RLHF。

原文摘要 · Abstract (English)

Reinforcement learning from human feedback (RLHF) has demonstrated effectiveness in aligning large language models (LLMs) with human preferences. However, token-level RLHF suffers from the credit assignment problem over long sequences, where delayed rewards make it challenging for the model to discern which actions contributed to preferred outcomes. This hinders learning efficiency and slows convergence.In this paper, we propose MA-RLHF, a simple yet effective RLHF framework that incorporates macro actions -- sequences of tokens or higher-level language constructs -- into the learning process. By operating at higher level of abstraction, our approach reduces the temporal distance between actions and rewards, facilitating faster and more accurate credit assignment. This results in more stable policy gradient estimates and enhances learning efficiency within each episode, all without increasing computational complexity during training or inference. We validate our approach through extensive experiments across various model sizes and tasks, including text summarization, dialogue generation, question answering, and program synthesis. Our method achieves substantial performance improvements over standard RLHF, with performance gains of up to 30% in text summarization and code generation, 18% in dialogue, and 8% in question answering tasks. Notably, our approach reaches parity with vanilla RLHF 1.7 ~ 2 times faster in terms of training time and continues to outperform it with further training. We make our code and data publicly available at https://github.com/ernie-research/MA-RLHF.

RLHF语言模型强化学习高效训练

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。