Language models (LMs) are known to suffer from forgetting of previously learned examples when fine-tuned, breaking stability of deployed LM systems. Despite efforts on mitigating forgetting, few have investigated whether, and how forgotten upstream examples are associated with newly learned tasks. Insights on such associations enable efficient and targeted mitigation of forgetting. In this paper, we empirically analyze forgetting that occurs in $N$ upstream examples while the model learns $M$ new tasks and visualize their associations with a $M \times N$ matrix. We empirically demonstrate that the degree of forgetting can often be approximated by simple multiplicative contributions of the upstream examples and newly learned tasks. We also reveal more complicated patterns where specific subsets of examples are forgotten with statistics and visualization. Following our analysis, we predict forgetting that happens on upstream examples when learning a new task with matrix completion over the empirical associations, outperforming prior approaches that rely on trainable LMs. Project website: https://inklab.usc.edu/lm-forgetting-prediction/
翻译:语言模型在微调过程中常出现对先前学习示例的遗忘现象,这会破坏已部署语言模型系统的稳定性。尽管已有诸多缓解遗忘的研究,但关于被遗忘的上游示例是否及如何与新学习任务相关联的探讨仍显不足。对此类关联机制的深入理解有助于实现高效且有针对性的遗忘缓解。本文通过实证分析,研究了模型在学习$M$个新任务时对$N$个上游示例产生的遗忘现象,并利用$M \times N$关联矩阵进行可视化呈现。实验表明,遗忘程度通常可近似表示为上游示例与新学习任务之间简单的乘性贡献关系。通过统计分析与可视化手段,我们进一步揭示了特定示例子集被遗忘的复杂模式。基于上述分析,我们通过对经验关联矩阵进行补全来预测学习新任务时上游示例的遗忘情况,其性能优于依赖可训练语言模型的现有方法。项目网站:https://inklab.usc.edu/lm-forgetting-prediction/