arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.00147cs.LGcs.AI
收藏

RAFT:用于缓解遗忘的领域微调的数据精炼与自适应蒸馏

RAFT: Data Refinement and Adaptive Distillation for Domain Fine-Tuning with Alleviated Forgetting

Beijing Academy of Artificial Intelligence (BAAI)(北京人工智能研究院);Beijing Jiaotong University (BJTU)(北京交通大学)

Yuduo Li, Xiaofeng Shi, Qian Kou, Longbin Yu, Hua Zhou

AI总结:

提出RAFT框架,通过数据精炼(自条件重写、语义过滤、答案融合)和答案条件在线蒸馏(top-K温度蒸馏、EMA自适应损失平衡)来解决领域微调中的监督兼容性差距和轨迹保持差距,在提升领域性能的同时缓解通用能力退化。

摘要:

领域特定的监督微调(SFT)通常以提高领域内性能为代价,导致模型通用能力下降。我们将这种退化归因于领域SFT中的两个实际差距:监督兼容性差距,即领域目标在风格和推理格式上与原始模型的自然响应不同;以及轨迹保持差距,即教师强制SFT优化固定目标令牌,而不约束模型在其自身生成前缀上的行为。这个过程未能保留模型的原始行为。我们提出RAFT(用于缓解遗忘的领域微调的数据精炼与自适应蒸馏),一个两阶段框架来解决这两个因素。首先,RAFT通过自条件重写、语义过滤和答案融合构建模型兼容的监督。其次,RAFT执行答案条件在线蒸馏,其中原始指令调优模型在学生生成的轨迹上提供软目标,同时以融合答案作为有用上下文进行条件化。我们进一步引入top-K温度蒸馏和基于EMA的自适应损失平衡来稳定领域-通用权衡。在三个指令调优骨干和五个领域上,RAFT相比标准SFT将平均领域准确率提高了23.2%,同时恢复了MS-Bench和IFEval上SFT引起的部分退化,相对改进分别为18.2%和10.2%。这些结果表明,将数据精炼与轨迹级保持相结合为缓解遗忘的领域微调提供了有效方案。

英文摘要:

Domain-specific supervised fine-tuning (SFT) often improves in-domain performance at the cost of degrading a model's general capabilities. We view this degradation through two practical gaps in domain SFT: a supervision-compatibility gap, where domain targets differ in style and reasoning format from the original model's natural responses, and a trajectory-preservation gap, where teacher-forced SFT optimizes fixed target tokens without constraining the model's behavior on its own generated prefixes. This process fails to preserve the model's original behavior. We propose RAFT (Data Refinement and Adaptive Distillation for Domain Fine-Tuning with Alleviated Forgetting), a two-stage framework that addresses both factors. First, RAFT constructs model-compatible supervision through self-conditioned rewriting, semantic filtering, and answer fusion. Second, RAFT performs Answer-Conditioned On-Policy Distillation, where the original instruction-tuned model provides soft targets on student-generated trajectories while being conditioned on the fused answer as helpful context. We further introduce top-K temperature distillation and EMA-based adaptive loss balancing to stabilize the domain-general trade-off. Across three instruction-tuned backbones and five domains, RAFT improves average domain accuracy by 23.2% over standard SFT, while recovering part of the SFT-induced degradation on MS-Bench and IFEval, with relative improvements of 18.2% and 10.2%, respectively. These results show that coupling data refinement with trajectory-level preservation provides an effective recipe for domain fine-tuning with alleviated forgetting.

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

↑