# 无遗忘学习

**无遗忘学习**（Learning without Forgetting，LwF）是一种面向卷积神经网络的持续学习方法，由李志忠（Zhizhong Li）与德里克·霍伊姆（Derek Hoiem）于 2016 年提出。它仅使用新任务的数据在新任务上训练网络，同时保持网络在先前任务上的性能。<sup>[1](https://arxiv.org/abs/1606.09282)</sup> 具体做法是：记录旧网络在新任务图像上的输出，并加入一个知识蒸馏损失（即训练一个网络去模仿另一个网络的输出），使更新后的网络在这些图像上的输出尽量接近所记录的值。<sup>[1](https://arxiv.org/abs/1606.09282)</sup> 该方法的会议版本发表于 ECCV 2016，后扩展为期刊版本。<sup>[1](https://arxiv.org/abs/1606.09282)</sup>

| 关键事实 | 详情 |
|---|---|
| 作者与日期 | 李志忠与德里克·霍伊姆；2016 年 6 月 29 日提交至 arXiv，会议版本发表于 ECCV 2016，后更新为期刊版本<sup>[1](https://arxiv.org/abs/1606.09282)</sup> |
| 数据要求 | 仅使用新任务数据；不存储先前任务的样本或标签<sup>[1](https://arxiv.org/abs/1606.09282)</sup><sup> • </sup><sup>[2](https://www.ecva.net/papers/eccv_2022/papers_ECCV/papers/136830672.pdf)</sup> |
| 机制 | 记录原始网络对新任务数据的响应，然后在学习新任务的同时训练以保留这些响应<sup>[1](https://arxiv.org/abs/1606.09282)</sup> |
| 报告的表现 | 与特征提取和微调相比表现更优，与使用原任务数据（假定不可得）的多任务学习表现相当<sup>[1](https://arxiv.org/abs/1606.09282)</sup> |
| 蒸馏设置 | 温度 θ = 2；蒸馏损失与新任务的分类损失权重相等<sup>[3](https://openaccess.thecvf.com/content/ICCV2021W/DeepMTL/papers/Oren_In_Defense_of_the_Learning_Without_Forgetting_for_Task_Incremental_ICCVW_2021_paper.pdf)</sup> |
| 方法类别 | 基于蒸馏，不做经验回放；通常与 EWC、MAS 等正则化方法归为一类<sup>[4](https://robotics.ntua.gr/wp-content/uploads/sites/2/2021_EfthymiouEtAl_VisualRobotPerceptionSystem-ChildRobotInteract_Technologies-1.pdf)</sup> |

## 问题背景

当神经网络依次学习一系列任务时，在后续任务上的训练可能损害其在先前任务上的性能，这种失效模式称为灾难性遗忘，最早由麦克洛斯基（McCloskey）和科恩（Cohen）于 1989 年识别。新任务往往会覆盖过去学到的权重。<sup>[5](https://www.cs.uic.edu/~liub/lifelong-learning/continual-learning.pdf)</sup>

李志忠与霍伊姆将问题表述为把网络参数划分为三组：所有任务共用的共享参数、先前任务专属的参数，以及为新任务随机初始化的参数。在他们的图像分类示例中，共享参数是 AlexNet 风格网络的五个卷积层和两个全连接层，旧任务参数是已有的分类输出层，新任务参数是一个新的输出层，例如用于场景分类。他们比较了三种传统的适配策略：特征提取，即冻结共享参数、只训练新的输出层；微调，即更新共享参数和新参数而保持旧输出层不变；以及联合多任务训练，即同时优化所有部分，但需要存储所有任务的训练数据。特征提取限制了新任务的性能，微调损害了旧任务的性能，而联合训练速度慢且需要旧数据。LwF 的设计初衷正是同时解决这些弱点。<sup>[5](https://www.cs.uic.edu/~liub/lifelong-learning/continual-learning.pdf)</sup>

## 方法

**核心流程。** 在新任务上训练之前，该方法使用共享参数和旧任务的输出头，记录现有网络在新任务训练样本上的预测。在新任务上训练时，损失函数由新任务真实标签上的标准分类损失与一个蒸馏项组成，后者惩罚新网络在同一批图像上的输出与所记录的旧输出之间的偏离。因此，旧响应充当先前任务分类器的目标，而可获取的真实标签监督新任务的分类器。<sup>[1](https://arxiv.org/abs/1606.09282)</sup><sup> • </sup><sup>[6](https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/cvi2.70013)</sup> 以伪代码形式表述，该算法使用共享参数和旧任务参数记录新任务样本上的预测，并将其用于目标函数。<sup>[5](https://www.cs.uic.edu/~liub/lifelong-learning/continual-learning.pdf)</sup>

蒸馏作用于旧特征提取与先前任务分类头及其更新后的对应部分之间。遵循原作者的建​​议，后续实现将蒸馏温度设为 θ = 2，并令蒸馏损失与新任务的分类损失权重相同。<sup>[3](https://openaccess.thecvf.com/content/ICCV2021W/DeepMTL/papers/Oren_In_Defense_of_the_Learning_Without_Forgetting_for_Task_Incremental_ICCVW_2021_paper.pdf)</sup>

**不存储什么。** LwF 不保留先前任务的任何样本。这使它区别于 iCaRL——后者保留一个存储的样本集并使用类似的蒸馏目标——也区别于一般的基于回放的方法。<sup>[2](https://www.ecva.net/papers/eccv_2022/papers_ECCV/papers/136830672.pdf)</sup> 由于维护先前任务的数据既不可取也无法扩展，LwF 仅使用当前任务的数据进行知识蒸馏。<sup>[3](https://openaccess.thecvf.com/content/ICCV2021W/DeepMTL/papers/Oren_In_Defense_of_the_Learning_Without_Forgetting_for_Task_Incremental_ICCVW_2021_paper.pdf)</sup>

## 原论文报告的结果

作者报告称，LwF 与常用的特征提取和微调适配技术相比表现更优，与使用原任务数据（他们假定不可得）的多任务学习表现相当。<sup>[1](https://arxiv.org/abs/1606.09282)</sup> 他们还报告了一个更令人惊讶的观察：在旧任务与新任务数据集相似的情况下，LwF 或许能够取代微调，从而提升新任务的性能——这意味着旧任务保留约束可以充当正则化项，不仅保护旧任务，还能帮助新任务。<sup>[1](https://arxiv.org/abs/1606.09282)</sup>

## 影响与后续评价

LwF 成为持续学习研究中的标准基线。综述文献将其描述为一种典型或代表性方法，它出现在与弹性权重巩固（EWC）、MAS、iCaRL 和经验回放并列的比较基准中。<sup>[6](https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/cvi2.70013)</sup><sup> • </sup><sup>[4](https://robotics.ntua.gr/wp-content/uploads/sites/2/2021_EfthymiouEtAl_VisualRobotPerceptionSystem-ChildRobotInteract_Technologies-1.pdf)</sup><sup> • </sup><sup>[7](https://github.com/soualahmohammedzakaria/Anti-Forgetting-Benchmark)</sup> 其蒸馏思想被后续工作继承：iCaRL、LwM 等类增量方法采用了蒸馏损失，2019 年的一项类增量方案引入了全局蒸馏变体，以利用无标签数据流。<sup>[8](https://arxiv.org/abs/1903.12648)</sup>

后续评估进一步完善了这幅图景。2021 年一项题为《为任务增量学习中的无遗忘学习辩护》的研究指出，该方法常被当作替罪羊式基线，但与许多较新的方法不同，它能从残差架构和简单的数据增强技术中获益。<sup>[3](https://openaccess.thecvf.com/content/ICCV2021W/DeepMTL/papers/Oren_In_Defense_of_the_Learning_Without_Forgetting_for_Task_Incremental_ICCVW_2021_paper.pdf)</sup> 另一方面，迁移学习领域的工作表明，网络预训练本身也会遭受灾难性遗忘，这促成了诸如“无遗忘迁移”（Transfer without Forgetting）之类的混合方法——它建立在一个固定的预训练姊妹网络之上，通过逐层损失项传播源域知识；据报道，在各数据集和缓冲区大小上，其类增量准确率比其他持续学习方法平均高出 4.81%。<sup>[9](https://www.ecva.net/papers/eccv_2022/papers_ECCV/html/7950_ECCV_2022_paper.php)</sup> 一项关于持续学习中知识蒸馏的综述发现，蒸馏在缓解遗忘方面起着关键作用，同时指出当它与数据回放结合时，分类偏置会削弱其效果，而分离 softmax 损失可以抵消这一偏置。<sup>[10](https://pubmed.ncbi.nlm.nih.gov/39423075/)</sup>

## References

1. [Zhizhong Li and Derek Hoiem (2016, updated 2017). Learning without Forgetting. arXiv:1606.09282.](https://arxiv.org/abs/1606.09282)
2. [Boschini et al. (2022). Transfer without Forgetting. ECCV 2022.](https://www.ecva.net/papers/eccv_2022/papers_ECCV/papers/136830672.pdf)
3. [Oren et al. (2021). In Defense of the Learning Without Forgetting for Task Incremental Learning. ICCV 2021 Workshops.](https://openaccess.thecvf.com/content/ICCV2021W/DeepMTL/papers/Oren_In_Defense_of_the_Learning_Without_Forgetting_for_Task_Incremental_ICCVW_2021_paper.pdf)
4. [Efthymiou et al. (2021). Visual Perception System for Child-Robot Interaction. Technologies.](https://robotics.ntua.gr/wp-content/uploads/sites/2/2021_EfthymiouEtAl_VisualRobotPerceptionSystem-ChildRobotInteract_Technologies-1.pdf)
5. [Chen and Liu (2018). Lifelong Machine Learning, Chapter 4: Continual Learning and Catastrophic Forgetting. University of Illinois at Chicago.](https://www.cs.uic.edu/~liub/lifelong-learning/continual-learning.pdf)
6. [Qu (2025). Recent Advances of Continual Learning in Computer Vision: An Overview. IET Computer Vision.](https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/cvi2.70013)
7. [Anti-Forgetting Benchmark, GitHub repository describing LwF as a distillation-based method.](https://github.com/soualahmohammedzakaria/Anti-Forgetting-Benchmark)
8. [Lee, Lee, Shin, and Lee (2019). Overcoming Catastrophic Forgetting with Unlabeled Data in the Wild. ICCV 2019.](https://arxiv.org/abs/1903.12648)
9. [Transfer without Forgetting, ECVA paper page, ECCV 2022.](https://www.ecva.net/papers/eccv_2022/papers_ECCV/html/7950_ECCV_2022_paper.php)
10. [Continual Learning With Knowledge Distillation: A Survey. PubMed.](https://pubmed.ncbi.nlm.nih.gov/39423075/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Neural networks and deep learning › Deep learning software and hardware › Fine-tuning and transfer of deep models

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/learning-without-forgetting

English original: https://www.edgepedia.org/learning-without-forgetting
