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

MA-RLHF:基于宏动作的人类反馈强化学习

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

Baidu Inc.(百度公司)

Yekun Chai, Haoran Sun, Huang Fang, Shuohuan Wang, Yu Sun, Hua Wu

AI总结:

针对token级RLHF长序列信用分配困难,本文提出MA-RLHF,通过宏动作缩短动作与奖励距离,在多任务上显著提升性能并加快收敛。

摘要:

人类反馈强化学习(RLHF)已被证明能有效使大型语言模型(LLM)与人类偏好对齐。然而,token级RLHF在长序列上存在信用分配问题:延迟奖励使模型难以判断哪些动作促成了偏好结果,这阻碍了学习效率并拖慢收敛。本文提出MA-RLHF,这是一个简单而有效的RLHF框架,将宏动作——即token序列或更高层次的语言结构——纳入学习过程。通过在更高抽象层次上操作,该方法缩短了动作与奖励之间的时间距离,促进更快、更准确的信用分配。这带来了更稳定的策略梯度估计,并提升了每个episode内的学习效率,同时在训练或推理期间均不增加计算复杂度。作者通过涵盖多种模型规模和任务的大量实验验证了该方法,任务包括文本摘要、对话生成、问答和程序合成。与标准RLHF相比,该方法取得了显著性能提升:文本摘要和代码生成中的性能增益最高达30%,对话任务达18%,问答任务达8%。值得注意的是,该方法在训练时间上达到与原始RLHF同等性能的速度快1.7至2倍,并且在继续训练后仍持续优于后者。代码和数据已公开发布于https://github.com/ernie-research/MA-RLHF。

英文摘要:

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.

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

↑