用模型自生成数据重播,缓解大模型持续学习时的遗忘问题。
On-Policy Replay for Continual Supervised Fine-Tuning

- 让模型自己生成回答,筛选后作为新训练数据回放。
- 在1%回放预算下,遗忘率降低46%,优于传统方法。
- 无需额外模型或损失函数,适合持续微调场景。
持续监督微调(SFT)是适应大语言模型应对下游任务流的标准方法,但存在早期能力灾难性遗忘的问题。近期研究表明,使用模型自身输出作为监督信号(即在线策略信号)比离线策略监督更能有效减少遗忘。现有方法通过引入新训练目标(如带教师副本的自蒸馏损失)传递该信号,带来额外前向传播、调度敏感性和风格漂移。本文提出将在线策略信号直接注入训练数据源:基于最近检查点,在少量历史提示上生成响应,按任务奖励筛选后,将保留的(提示, 模型回答)对作为普通SFT样本重播。无教师模型、无辅助损失、无需实时蒸馏。在三个7-8B指令微调模型(Qwen2.5-7B-Instruct、Qwen3-8B、Llama3.1-8B-Instruct)上测试,结果一致显示遗忘减少;在最严苛压力测试中(Qwen2.5-7B-Instruct, Sequential SFT BWT -13.93),10%回放预算下将BWT提升至-0.65,1%预算下达-2.29,较调优后的普通重播基线|BWT|降低46%,三模型均实现42%-46%降幅。我们提供一种KL收缩解释,将本方法与以往在线策略蒸馏方法置于同一框架,并揭示反直觉现象:低分重播始终劣于普通重播,表明OPR核心优势在于在线策略分布,而非回答质量本身。代码已开源。
原文摘要 · Abstract (English)
Continual supervised fine-tuning (SFT) is the de facto recipe for adapting large language models (LLMs) to a stream of downstream tasks, but it suffers from catastrophic forgetting of earlier capabilities. Recent work shows that on-policy signals -- training on the model's own outputs -- reduce forgetting more reliably than off-policy supervision. Existing on-policy methods route this signal through a new training objective (e.g., self-distillation losses with a teacher copy), inheriting an extra forward pass, schedule sensitivity, and stylistic drift from the teacher.We instead route the on-policy signal through the training data source. Our method, On-Policy Replay (OPR), rolls out the most recent checkpoint on a small budget of historical prompts, filters the generations by a task reward, and replays the surviving (prompt, model response) pairs as ordinary SFT examples. There is no teacher, no auxiliary loss, and no on-the-fly distillation. Across three 7--8B instruction-tuned backbones (Qwen2.5-7B-Instruct, Qwen3-8B, Llama3.1-8B-Instruct) on the TRACE continual-learning benchmark, OPR consistently reduces forgetting; on the sharpest stress test (Qwen2.5-7B-Instruct, Sequential SFT BWT -13.93), OPR lifts BWT to -0.65 at a 10% replay budget and to -2.29 at a 1% budget -- a 46% reduction in |BWT| over a tuned Vanilla Replay baseline, with 42--46% reductions observed across all three backbones. We give a KL-shrinkage interpretation that places OPR and prior on-policy distillation methods on a single axis, and we present a counterintuitive finding that explains why Vanilla Replay is already a strong baseline: low-score replay is uniformly worse than Vanilla Replay, demonstrating that the active ingredient in OPR is the on-policy distribution, not the response quality alone.Our code is available at https://github.com/Yancey2024/OnPolicyReplay.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。