arXiv:2602.11220cs.LGcs.CL2026-02

用强化学习优化数据重写,减少大模型微调时的遗忘问题

Patch the Distribution Mismatch: RL Rewriting Agent for Stable Off-Policy SFT

  • 将数据重写建模为策略学习,匹配模型自然问答生成分布
  • 在保持任务一致性前提下提升重写数据多样性,降低遗忘率12.34%
  • 适合需要稳定微调且下游数据分布偏移大的场景

大语言模型虽进展迅速,但下游适配仍依赖监督微调(SFT)。当下游数据与预训练分布差异显著时,SFT易引发灾难性遗忘。现有数据重写方法多基于提示诱导的条件分布采样,生成结果未必契合模型自然问答风格,且固定模板易导致多样性崩溃。为此,本文将数据重写视为策略学习问题,设计一种基于强化学习的重写代理,联合优化问答风格分布对齐与数据多样性,并在严格任务一致性约束下构建更高质量的重写数据集。实验表明,该方法在下游性能接近标准SFT的同时,非下游基准上的遗忘率平均降低12.34%。代码已开源。

原文摘要 · Abstract (English)

Large language models (LLMs) have made rapid progress, yet adapting them to downstream scenarios still commonly relies on supervised fine-tuning (SFT). When downstream data exhibit a substantial distribution shift from the model's prior training distribution, SFT can induce catastrophic forgetting. To narrow this gap, data rewriting has been proposed as a data-centric approach that rewrites downstream training data prior to SFT. However, existing methods typically sample rewrites from a prompt-induced conditional distribution, so the resulting targets are not necessarily aligned with the model's natural QA-style generation distribution. Moreover, reliance on fixed templates can lead to diversity collapse. To address these issues, we cast data rewriting as a policy learning problem and learn a rewriting policy that better matches the backbone's QA-style generation distribution while preserving diversity. Since distributional alignment, diversity and task consistency are automatically evaluable but difficult to optimize end-to-end with differentiable objectives, we leverage reinforcement learning to optimize the rewrite distribution under reward feedback and propose an RL-based data-rewriting agent. The agent jointly optimizes QA-style distributional alignment and diversity under a hard task-consistency gate, thereby constructing a higher-quality rewritten dataset for downstream SFT. Extensive experiments show that our method achieves downstream gains comparable to standard SFT while reducing forgetting on non-downstream benchmarks by 12.34% on average. Our code is available at https://anonymous.4open.science/r/Patch-the-Prompt-Gap-4112 .

大模型微调数据重写强化学习分布对齐

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