通过合成数据与分步强化学习,提升模型多步推理与工具使用能力。
Synthetic Data Generation & Multi-Step RL for Reasoning & Tool Use
- 将多步任务拆解为子轨迹,分步生成合成数据并优化。
- 在多个数据集上相对准确率提升11.1%至21.5%。
- 训练一个任务可零样本提升其他任务表现,适合复杂推理场景。
强化学习已被证明能提升大语言模型性能,但传统方法如RLHF或RLAIF将其视为单步问题。随着对复杂推理与代理任务的关注增加,语言模型需经过多步文本生成、推理和环境交互才能输出答案。本文提出一种针对多步优化场景的合成数据生成与强化学习方法——分步强化学习(SWiRL)。该方法迭代生成多步推理与工具使用数据,并基于这些数据进行学习。其核心是简单的分步分解机制:将每条多步轨迹拆分为对应原模型每个动作的子轨迹,再对子轨迹进行合成数据筛选与强化学习优化。我们在多个多步工具使用、问答及数学推理任务上评估了SWiRL,实验显示其在GSM8K、HotPotQA、CofCA、MuSiQue和BeerQA上的相对准确率分别提升21.5%、12.3%、14.8%、11.1%和15.3%。令人振奋的是,该方法展现出任务间泛化能力:仅在HotPotQA(文本问答)上训练,即可使GSM8K(数学数据集)的零样本性能提升16.9%相对准确率。
原文摘要 · Abstract (English)
Reinforcement learning has been shown to improve the performance of large language models. However, traditional approaches like RLHF or RLAIF treat the problem as single-step. As focus shifts toward more complex reasoning and agentic tasks, language models must take multiple steps of text generation, reasoning and environment interaction before generating a solution. We propose a synthetic data generation and RL methodology targeting multi-step optimization scenarios. This approach, called Step-Wise Reinforcement Learning (SWiRL), iteratively generates multi-step reasoning and tool use data, and then learns from that data. It employs a simple step-wise decomposition that breaks each multi-step trajectory into multiple sub-trajectories corresponding to each action by the original model. It then applies synthetic data filtering and RL optimization on these sub-trajectories. We evaluated SWiRL on a number of multi-step tool use, question answering, and mathematical reasoning tasks. Our experiments show that SWiRL outperforms baseline approaches by 21.5%, 12.3%, 14.8%, 11.1%, and 15.3% in relative accuracy on GSM8K, HotPotQA, CofCA, MuSiQue, and BeerQA, respectively. Excitingly, the approach exhibits generalization across tasks: for example, training only on HotPotQA (text question-answering) improves zero-shot performance on GSM8K (a math dataset) by a relative 16.9%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。