arXiv:2509.26313cs.CL2025-09被引 9

用单步强化学习思想改进监督微调,让模型更会举一反三。

One-Token Rollout: Guiding Supervised Fine-Tuning of LLMs with Policy Gradient

  • 将每个词生成视为一个单步强化学习轨迹,用策略梯度引导训练
  • 在数学推理、代码生成等任务上显著优于传统监督微调
  • 适合追求更强泛化能力的LLM微调场景

监督微调(SFT)是适配大语言模型的主要方法,但其泛化能力常弱于强化学习(RL)。本文认为,差异不仅源于损失函数,更根本在于数据机制:SFT使用静态预收集数据,而RL采用当前策略生成的在线数据。为此,我们提出单令牌滚动(OTR)算法,通过策略梯度指导SFT。OTR将自回归生成重构为单步强化学习过程,每一步对当前策略分布采样多个候选词,以监督数据中的真实词作为奖励信号,引导优化。该方法使静态离线数据在词级实现动态在线信号,兼具在线学习的泛化优势与低成本开销。在涵盖数学推理、代码生成和通用推理的多个挑战性基准上,实验表明OTR持续优于标准SFT。结果证明,数据的在线性是提升泛化的核心因素,为大模型微调提供了新方向。

原文摘要 · Abstract (English)

Supervised fine-tuning (SFT) is the predominant method for adapting large language models (LLMs), yet it often struggles with generalization compared to reinforcement learning (RL). In this work, we posit that this performance disparity stems not just from the loss function, but from a more fundamental difference: SFT learns from a fixed, pre-collected dataset, whereas RL utilizes on-policy data sampled from the current policy. Building on this hypothesis, we introduce one-token rollout (OTR), a novel fine-tuning algorithm that guides SFT with the policy gradient method. OTR reframes the autoregressive learning process by treating each token generation as a single-step reinforcement learning trajectory. At each step, it performs a Monte Carlo ``rollout'' by sampling multiple candidate tokens from the current policy's distribution. The ground-truth token from the supervised data is then used to provide a reward signal to these samples. Guided by policy gradient, our algorithm repurposes static, off-policy supervised data into a dynamic, on-policy signal at the token level, capturing the generalization benefits of on-policy learning while bypassing the costly overhead of full sentence generation. Through extensive experiments on a diverse suite of challenging benchmarks spanning mathematical reasoning, code generation, and general domain reasoning, we demonstrate that OTR consistently outperforms standard SFT. Our findings establish OTR as a powerful and practical alternative for fine-tuning LLMs and provide compelling evidence that the on-policy nature of data is a critical driver of generalization, offering a promising new direction for fine-tuning LLMs.

大模型微调强化学习策略梯度

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