On the Impossibility of Retrain Equivalence in Machine Unlearning

LLM Model Editing Other LLM ML NNGTB FT
机器遗忘旨在有选择性地消除特定训练数据对模型输出的“影响”。理想目标是实现重训练等效性——即模型的行为与仅在保留数据上从头开始训练所得模型完全相同。这一目标最初是针对采用独立同分布数据批次训练的模型提出的,而现代训练流程往往涉及多阶段训练,每一阶段具有不同的数据分布和优化目标,例如大语言模型(LLM)为提升对齐性、推理能力等进行的微调。我们的研究通过理论分析与实验表明,转向多阶段训练为机器遗忘带来了根本性的障碍。理论指出,局部遗忘方法——即仅利用在遗忘集上计算出的梯度的方法——其效果具有路径依赖性。也就是说,模型在遗忘过程中的行为受到其学习过程中各训练阶段顺序的影响,这使得不考虑训练路径的算法无法普遍实现重训练等效性。我们在Llama和Qwen系列模型(10亿至140亿参数)上,使用梯度上升、NPO和SimNPO等局部遗忘算法,在大语言模型的后训练阶段实证验证了这一现象。通过不同顺序执行相同训练阶段所得到的微调模型,在遗忘过程中表现出显著不同的行为,其在GSM8K任务上的准确率下降幅度因训练路径不同而差异超过20%。我们还观察到,某些训练路径始终会产生更难遗忘的模型。在遗忘过程中,概率质量是被压缩到改写表达还是转向其他概念,也取决于训练路径。这些结果一致表明,只要目标模型是分阶段训练得到的,重训练等效性对于局部遗忘算法而言就是一个定义不当的目标。在难以获取模型训练历史的实际场景中,本研究呼吁重新思考机器遗忘的定义及其应满足的理想特性。
Machine unlearning seeks to selectively remove the "influence" of specific training data on a model's outputs. The ideal goal is Retrain Equivalence--behavior identical to a model trained from scratch on only the retained data. This goal was formulated for models trained on i.i.d. data batches, but modern pipelines often involve multi-stage training, with each stage having a distinct data distribution and objective. Examples include LLM fine-tuning for alignment, reasoning ability, etc. Our study shows via theory and experiments that this shift to multi-stage training introduces a fundamental barrier for machine unlearning. The theory indicates that the outcome of local unlearning--methods that only use gradients computed on the forget set--is path-dependent. That is, a model's behavior during unlearning is influenced by the order of its training stages during learning, making it impossible for path-oblivious algorithms to universally achieve Retrain Equivalence. We empirically demonstrate the same phenomenon in LLM post-training across Llama and Qwen models (1B to 14B) with gradient ascent, NPO, and SimNPO local unlearning algorithms. Models fine-tuned via different orderings of identical training stages diverge in behavior during unlearning, with the degradation in GSM8K accuracy after unlearning varying by over 20% across paths. We also observe that some learning paths consistently produce models that unlearn slowly. During unlearning, whether the probability mass gets squeezed into paraphrasing or alternative concepts is also path-dependent. These results consistently show that Retrain Equivalence is an ill-posed target for local unlearning algorithms, so long as the target models are trained in stages. In situations where access to models' training histories is hard, the current work calls for rethinking the definition and desiderata of machine unlearning.
许愿