Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning

📄 arXiv: 2402.05808v2 📥 PDF

作者: Zhiheng Xi, Wenxiang Chen, Boyang Hong, Senjie Jin, Rui Zheng, Wei He, Yiwen Ding, Shichun Liu, Xin Guo, Junzhe Wang, Honglin Guo, Wei Shen, Xiaoran Fan, Yuhao Zhou, Shihan Dou, Xiao Wang, Xinbo Zhang, Peng Sun, Tao Gui, Qi Zhang, Xuanjing Huang

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

发布日期: 2024-02-08 (更新: 2024-03-17)

备注: Preprint. Codes released: https://github.com/WooooDyy/LLM-Reverse-Curriculum-RL


💡 一句话要点

提出R$^3$方法以解决复杂推理中的监督问题

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

关键词: 反向课程学习 强化学习 推理能力 大型语言模型 结果监督 过程监督 模型优化 智能问答

📋 核心要点

  1. 现有方法在复杂推理中面临的挑战是如何有效地提供监督,尤其是在缺乏过程监督的情况下。
  2. R$^3$方法通过反向课程强化学习,从正确的演示中学习,逐步滑动推理起始状态,以实现更有效的模型探索。
  3. 实验结果表明,R$^3$在多个推理任务上显著提升了性能,尤其在GSM8K任务中表现优异。

📝 摘要(中文)

本文提出了一种新颖的方法R$^3$,通过反向课程强化学习(RL)仅使用结果监督来实现大型语言模型的推理能力。应用RL于复杂推理的核心挑战在于识别导致正奖励的动作序列并提供适当的监督。结果监督提供稀疏奖励,而过程监督则需要大量人工标注。R$^3$通过学习正确的演示来克服这些限制,逐步将推理的起始状态从演示的结束滑动到开始,从而在各个阶段促进模型探索。使用Llama2-7B模型,我们的方法在八个推理任务上平均超越RL基线4.1分,特别是在GSM8K的程序推理中,超出基线4.2分,且Codellama-7B + R$^3$在没有额外数据的情况下表现与更大模型相当。

🔬 方法详解

问题定义:本文旨在解决复杂推理任务中监督不足的问题,现有方法在提供稀疏奖励的同时,无法有效识别错误位置,导致优化困难。

核心思路:R$^3$通过反向课程强化学习的方式,从正确的演示中学习,逐步调整推理的起始状态,使模型能够在各个阶段进行有效探索。

技术框架:R$^3$的整体架构包括三个主要模块:演示学习模块、反向推理模块和奖励信号生成模块。演示学习模块负责收集和处理正确的推理示例,反向推理模块则逐步调整推理起始状态,奖励信号生成模块则提供相应的奖励反馈。

关键创新:R$^3$的核心创新在于通过反向滑动推理起始状态,结合结果监督与过程监督的优点,显著提高了模型的推理能力。这一方法与传统的过程监督方法本质上不同,后者需要大量人工标注。

关键设计:在参数设置上,R$^3$采用了动态调整的奖励机制,损失函数设计上结合了结果和过程的反馈,网络结构则基于现有的Llama2-7B模型进行优化,以适应反向推理的需求。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,R$^3$在八个推理任务上平均超越了RL基线4.1分,特别是在GSM8K的程序推理任务中,超出基线4.2分。此外,Codellama-7B + R$^3$在没有额外数据的情况下,表现与更大模型相当,显示出其高效性和实用性。

🎯 应用场景

该研究的潜在应用领域包括智能问答系统、自动推理和决策支持系统等。通过提升大型语言模型的推理能力,R$^3$方法能够在教育、医疗、金融等多个行业中提供更为精准的智能服务,具有重要的实际价值和广泛的未来影响。

📄 摘要(原文)

In this paper, we propose R$^3$: Learning Reasoning through Reverse Curriculum Reinforcement Learning (RL), a novel method that employs only outcome supervision to achieve the benefits of process supervision for large language models. The core challenge in applying RL to complex reasoning is to identify a sequence of actions that result in positive rewards and provide appropriate supervision for optimization. Outcome supervision provides sparse rewards for final results without identifying error locations, whereas process supervision offers step-wise rewards but requires extensive manual annotation. R$^3$ overcomes these limitations by learning from correct demonstrations. Specifically, R$^3$ progressively slides the start state of reasoning from a demonstration's end to its beginning, facilitating easier model exploration at all stages. Thus, R$^3$ establishes a step-wise curriculum, allowing outcome supervision to offer step-level signals and precisely pinpoint errors. Using Llama2-7B, our method surpasses RL baseline on eight reasoning tasks by $4.1$ points on average. Notebaly, in program-based reasoning on GSM8K, it exceeds the baseline by $4.2$ points across three backbone models, and without any extra data, Codellama-7B + R$^3$ performs comparable to larger models or closed-source models.