2025-08-08 · 进阶 · 机器学习 · 自然语言处理

On the Generalization of SFT: A Reinforcement Learning Perspective with Reward Rectification

本文提出了一种名为动态微调(DFT)的方法,通过动态调整目标函数的缩放比例,显著提高了大型语言模型(LLM)在监督微调(SFT)中的泛化能力。

更新于 2025-09-27。作者:Yongliang Wu、Yizhou Zhou、Zhou Ziheng、Yingzhe Peng、Xinyu Ye、Xinting Hu、Wenbo Zhu、Lu Qi、Ming-Hsuan Yang、Xu Yang。

中文摘要

我们提出了一种简单而理论上有动力的改进方案,用于大型语言模型(LLM)的监督微调(SFT),以解决其相对于强化学习(RL)的泛化能力有限的问题。通过数学分析,我们揭示了标准SFT梯度隐含地编码了一种可能严重限制模型泛化能力的奖励结构。为了纠正这一点,我们提出了动态微调(DFT),通过动态调整目标函数与每个标记的概率来稳定每个标记的梯度更新。令人瞩目地,这一行代码的改变在多个具有挑战性的基准和基础模型上显著优于标准SFT,展示了大幅提升的泛化能力。此外,我们的方法在离线RL设置中也表现出有竞争力的结果,提供了一种有效且更简单的替代方案。这项工作将理论洞察和实际解决方案相结合,大幅提升了SFT的性能。代码将在https://github.com/yongliang-wu/DFT上提供。

英文摘要

We present a simple yet theoretically motivated improvement to Supervised Fine-Tuning (SFT) for the Large Language Model (LLM), addressing its limited generalization compared to reinforcement learning (RL). Through mathematical analysis, we reveal that standard SFT gradients implicitly encode a problematic reward structure that may severely restrict the generalization capabilities of model. To rectify this, we propose Dynamic Fine-Tuning (DFT), stabilizing gradient updates for each token by dynamically rescaling the objective function with the probability of this token. Remarkably, this single-line code change significantly outperforms standard SFT across multiple challenging benchmarks and base models, demonstrating greatly improved generalization. Additionally, our approach shows competitive results in offline RL settings, offering an effective yet simpler alternative. This work bridges theoretical insight and practical solutions, substantially advancing SFT performance. The code will be available at https://github.com/yongliang-wu/DFT.

解读

一句话总结

本文提出了一种名为动态微调(DFT)的方法,通过动态调整目标函数的缩放比例,显著提高了大型语言模型(LLM)在监督微调(SFT)中的泛化能力。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt