用低困惑度令牌学习缓解大模型微调中的遗忘问题
Mitigating Forgetting in LLM Fine-Tuning via Low-Perplexity Token Learning
- 通过屏蔽高困惑度令牌,提升微调后模型的跨任务稳定性
- 在多个模型上验证,使用生成数据可减少非目标任务性能下降30%以上
- 为避免灾难性遗忘提供了可解释的新思路,适合模型优化研究者
保持模型在不同领域的一致性能是机器学习中的基本挑战。尽管近期研究探索了使用大模型生成数据进行微调,但其对跨领域泛化的影响仍不明确。本文系统分析发现,相较于真实数据微调,使用大模型生成数据不仅能提升目标任务性能,还能显著降低非目标任务的退化程度。通过分析多领域任务的数据序列,我们证明这种鲁棒性提升源于大模型生成序列中高困惑度令牌的减少。基于此,我们进一步发现,在真实数据中屏蔽高困惑度令牌,也能实现与生成数据相当的非目标任务性能保持效果。在Gemma 2 IT 2B、Llama 3 8B Instruct及三个额外模型上的广泛实验均支持该结论。据我们所知,这是首个基于令牌困惑度降低提供实证解释的灾难性遗忘缓解方法,为构建更稳健的微调策略提供了重要洞见。
原文摘要 · Abstract (English)
Maintaining consistent model performance across domains is a fundamental challenge in machine learning. While recent work has explored using LLM-generated data for fine-tuning, its impact on cross-domain generalization remains poorly understood. This paper presents a systematic analysis revealing that fine-tuning with LLM-generated data not only improves target task performance but also reduces non-target task degradation compared to fine-tuning with ground truth data. Through analyzing the data sequence in tasks of various domains, we demonstrate that this enhancement of non-target task robustness stems from the reduction of high perplexity tokens found in LLM-generated sequences. Following our findings, we showed that masking high perplexity tokens in ground truth training data achieves similar non-target task performance preservation, comparable to using LLM-generated data. Extensive experiments across different model families and scales, including Gemma 2 IT 2B, Llama 3 8B Instruct, and three additional models, agree with our findings. To the best of our knowledge, this is the first work to provide an empirical explanation based on token perplexity reduction to mitigate catastrophic forgetting in LLMs after fine-tuning, offering valuable insights for developing more robust fine-tuning strategies.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。