ReFT: Reasoning with Reinforced Fine-Tuning

📄 arXiv: 2401.08967v3 📥 PDF

作者: Trung Quoc Luong, Xinbo Zhang, Zhanming Jie, Peng Sun, Xiaoran Jin, Hang Li

分类: cs.CL

发布日期: 2024-01-17 (更新: 2024-12-13)

备注: ACL 2024 main conference; adjust with reviewer comments; 13 pages


💡 一句话要点

提出ReFT以增强大型语言模型的推理能力

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

关键词: 大型语言模型 推理能力 强化学习 数学问题求解 监督微调 PPO算法 泛化能力

📋 核心要点

  1. 现有的监督微调方法在推理能力上存在不足,尤其是在数学问题求解中,训练数据通常只有单一的推理路径。
  2. 本文提出的ReFT方法通过在线强化学习,利用多个自动采样的推理路径来提升模型的泛化能力。
  3. 实验结果显示,ReFT在多个数据集上显著超越传统的SFT方法,且不需要额外的训练数据。

📝 摘要(中文)

为了提升大型语言模型(LLMs)的推理能力,本文提出了一种名为强化微调(ReFT)的方法。传统的监督微调(SFT)依赖于链式思维(CoT)注释,但其泛化能力不足,尤其在数学问题求解中,训练数据通常只有单一的注释推理路径。ReFT通过首先进行SFT预热,然后采用在线强化学习(具体为PPO算法)进一步微调模型,自动采样多个推理路径并根据真实答案生成奖励。实验结果表明,ReFT在GSM8K、MathQA和SVAMP数据集上显著优于SFT,并且通过结合推理时策略如多数投票和重排序,性能有望进一步提升。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在推理能力上的不足,尤其是在数学问题求解中,现有的监督微调方法仅依赖于单一的推理路径,导致泛化能力有限。

核心思路:ReFT方法通过结合强化学习与监督微调,首先进行预热,然后通过在线强化学习自动生成多个推理路径,从而提升模型的学习效果和泛化能力。

技术框架:ReFT的整体架构包括两个主要阶段:首先是监督微调(SFT),然后是基于PPO算法的在线强化学习阶段。在强化学习阶段,模型根据真实答案自动生成奖励,进一步优化推理路径。

关键创新:ReFT的核心创新在于通过在线强化学习实现多条推理路径的自动采样,显著提升了模型的泛化能力,而不依赖于额外的训练数据。

关键设计:在ReFT中,使用PPO算法进行强化学习,设计了适应于数学问题求解的奖励机制,确保模型能够有效学习到多样化的推理路径。

🖼️ 关键图片

img_0

📊 实验亮点

实验结果表明,ReFT在GSM8K、MathQA和SVAMP数据集上显著优于传统的SFT方法,提升幅度达到XX%(具体数据待补充)。此外,结合推理时的多数投票和重排序策略,性能有望进一步提升,展示了ReFT的强大潜力。

🎯 应用场景

该研究的潜在应用领域包括教育、智能问答系统和自动化数学求解等。通过提升大型语言模型的推理能力,ReFT可以为复杂问题的解决提供更为准确和灵活的支持,未来可能在各类智能应用中发挥重要作用。

📄 摘要(原文)

One way to enhance the reasoning capability of Large Language Models (LLMs) is to conduct Supervised Fine-Tuning (SFT) using Chain-of-Thought (CoT) annotations. This approach does not show sufficiently strong generalization ability, however, because the training only relies on the given CoT data. In math problem-solving, for example, there is usually only one annotated reasoning path for each question in the training data. Intuitively, it would be better for the algorithm to learn from multiple annotated reasoning paths given a question. To address this issue, we propose a simple yet effective approach called Reinforced Fine-Tuning (ReFT) to enhance the generalizability of learning LLMs for reasoning, with math problem-solving as an example. ReFT first warmups the model with SFT, and then employs on-line reinforcement learning, specifically the PPO algorithm in this paper, to further fine-tune the model, where an abundance of reasoning paths are automatically sampled given the question and the rewards are naturally derived from the ground-truth answers. Extensive experiments on GSM8K, MathQA, and SVAMP datasets show that ReFT significantly outperforms SFT, and the performance can be potentially further boosted by combining inference-time strategies such as majority voting and re-ranking. Note that ReFT obtains the improvement by learning from the same training questions as SFT, without relying on extra or augmented training questions. This indicates a superior generalization ability for ReFT.