arXiv:2509.15157cs.LGcs.CL2025-09

通过重写数据主动缩小策略差距,提升大模型微调稳定性。

Mind the Gap: Data Rewriting for Stable Off-Policy Supervised Fine-Tuning

  • 先用模型生成答案,错的就重解,对的保留为训练数据
  • 在5个数学推理任务上优于普通微调和当前最优方法
  • 适合追求稳定高效微调的从业者

大语言模型的监督微调可视为离策略学习问题:专家示范来自固定行为策略,而训练目标是优化目标策略。重要性采样虽是标准工具,但策略差距过大时会导致权重偏斜、方差高、优化不稳定。现有方法通过KL惩罚或裁剪被动限制更新,未能主动缩小差距。本文提出一种简单有效的数据重写框架,在训练前主动缩小策略差距:对每个问题,保留模型正确生成的解答作为在线策略数据,错误解答则通过引导重解修正,仅在必要时回退到专家示范。该方法使训练分布更贴近目标策略,降低方差,提升稳定性。为处理重写后残余偏差,训练阶段额外使用重要性采样,形成数据级对齐与轻量优化级校正结合的两阶段方案。在五个数学推理基准上的实验显示,该方法持续且显著优于原始SFT及当前最先进的动态微调(DFT)方法。数据与代码将发布于https://github.com/NKU-HLT/Off-Policy-SFT。

原文摘要 · Abstract (English)

Supervised fine-tuning (SFT) of large language models can be viewed as an off-policy learning problem, where expert demonstrations come from a fixed behavior policy while training aims to optimize a target policy. Importance sampling is the standard tool for correcting this distribution mismatch, but large policy gaps lead to skewed weights, high variance, and unstable optimization. Existing methods mitigate this issue with KL penalties or clipping, which passively restrict updates rather than actively reducing the gap. We propose a simple yet effective data rewriting framework that proactively shrinks the policy gap before training. For each problem, correct model-generated solutions are kept as on-policy data, while incorrect ones are rewritten through guided re-solving, falling back to expert demonstrations only when needed. This aligns the training distribution with the target policy, reducing variance and improving stability. To handle residual mismatch after rewriting, we additionally apply importance sampling during training, forming a two-stage approach that combines data-level alignment with lightweight optimization-level correction. Experiments on five mathematical reasoning benchmarks show consistent and significant gains over both vanilla SFT and the state-of-the-art Dynamic Fine-Tuning (DFT) approach. Data and code will be released at https://github.com/NKU-HLT/Off-Policy-SFT.

大模型微调离策略学习数据重写数学推理

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