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

单个标记回滚:通过策略梯度引导大语言模型的监督微调

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

The Chinese University of Hong Kong(香港中文大学);Noah’s Ark Lab, Huawei(华为诺亚实验室);ChatEDA Tech(ChatEDA技术公司)

Rui Ming, Haoyuan Wu, Shoubo Hu, Zhuolun He, Bei Yu

AI总结:

通过策略梯度引导监督微调,单个标记回滚(OTR)在多个基准测试中优于标准SFT,展示了on-policy数据对泛化能力的重要性。

摘要:

监督微调(SFT)是适应大语言模型(LLMs)的主要方法,但其泛化能力往往不如强化学习(RL)。在本文中,我们提出这种性能差异不仅仅源于损失函数,而是更根本的不同:SFT从固定且预先收集的数据集中学习,而RL利用当前策略采样的on-policy数据。基于这一假设,我们引入了单个标记回滚(OTR),一种新的微调算法,通过策略梯度方法引导SFT。OTR通过将每个标记生成过程重新定义为单步强化学习轨迹,重新框架了自回归学习过程。在每一步中,它通过从当前策略分布中采样多个候选标记进行蒙特卡洛“回滚”。然后,使用监督数据中的真实标记为这些样本提供奖励信号。通过策略梯度引导,我们的算法将静态的off-policy监督数据重新利用为动态的on-policy信号,在标记级别上捕获on-policy学习的泛化优势,同时避免了完整句子生成的成本开销。通过在数学推理、代码生成和一般领域推理等多样化的挑战性基准上进行广泛实验,我们证明OTR在各方面都优于标准SFT。我们的发现确立了OTR作为微调LLMs的强大且实用的替代方法,并提供了有力的证据,表明on-policy数据的性质是泛化能力的关键驱动因素,为LLMs的微调提供了新的有前景的方向。

英文摘要:

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.

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

↑