# 弹性权重巩固

**弹性权重巩固**（Elastic weight consolidation，EWC）是一种基于正则化的神经网络持续学习算法，通过对先前学习任务中重要的权重的变化施加二次惩罚来保护这些权重，每个权重的惩罚按其估计的重要性进行缩放。该方法由 [Google DeepMind](https://www.edgepedia.org/zh/google-deepmind) 的 James Kirkpatrick 及其同事在 2017 年《美国国家科学院院刊》的论文《克服神经网络中的灾难性遗忘》中提出，其灵感来自神经科学中的突触巩固——大脑借此过程使持久的记忆不易被覆盖<sup>[1](https://doi.org/10.1073/pnas.1611835114)</sup>。

| 关键事实 | 详情 |
|---|---|
| 所解决的问题 | 灾难性遗忘：当网络在多个任务上依次训练时，对任务 A 重要的权重会被改变以满足任务 B 的目标<sup>[1](https://doi.org/10.1073/pnas.1611835114)</sup> |
| 机制 | 对权重变化施加二次惩罚，每个权重的惩罚由学习每个任务后计算的 Fisher 信息矩阵的对角线加权<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC5856534/)</sup> |
| 原始结果 | 在依次经历的多个强化学习问题上的结果，包括 Atari 2600 游戏<sup>[1](https://doi.org/10.1073/pnas.1611835114)</sup> |
| 近似 | 完整 Fisher 信息矩阵的大小与网络参数数量的平方成正比，因此 EWC 使用其对角线<sup>[3](https://link.springer.com/article/10.1007/s11263-026-03018-4)</sup> |
| 主要变体 | 在线 EWC 维护一个持续运行的惩罚而非每个任务的 Fisher 矩阵；Kronecker 因子分解近似超越了对角线<sup>[4](https://www.mdpi.com/2227-7390/14/15/2774)</sup> |
| 实践中的巩固强度 | 推荐的初始巩固强度为 \( \lambda = 5000 \)，通过交叉验证调优<sup>[5](https://www.thepingouin.com/2025/06/12/ewc-consolidation-elastique-poids-apprentissage-continu-guide-en/)</sup> |
| 采用情况 | 被称为最流行的持续学习方法之一，到 2025 年引用超过 8,000 次<sup>[6](https://iclr.cc/media/iclr-2025/Slides/31332.pdf)</sup> |

## 所解决的问题

[灾难性遗忘](https://www.edgepedia.org/zh/catastrophic-forgetting)具体发生在网络于多个任务上依次训练时：编码任务 A 解决方案的权重被改变以满足任务 B 的目标，导致在先前任务上的性能崩溃<sup>[1](https://doi.org/10.1073/pnas.1611835114)</sup>。朴素顺序训练是衡量持续学习方法的基线。在一项使用 FB15k-237 上 TransE 嵌入的知识图谱链接预测实验中，朴素顺序训练产生了 12.62% 的遗忘，而 EWC 将其降低到 6.85%，减少了 45.7%<sup>[7](https://ceur-ws.org/Vol-4162/paper3.pdf)</sup>。

## 算法原理

EWC 在学习新任务时向损失函数添加二次惩罚<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC5856534/)</sup>。在一个任务上训练完成后，该方法使用 Fisher 信息矩阵的对角线估计每个权重对该任务性能的重要程度。Fisher 信息衡量模型输出分布对每个参数变化的敏感度；在旧任务上 Fisher 信息高的权重在被扰动时会使旧任务的预测发生很大变化，因此受到较大的惩罚，而信息量低的权重可以自由移动。惩罚将重要权重锚定在其旧值附近，每个权重具有个性化的刚度，这就是巩固之所以“弹性”的含义<sup>[5](https://www.thepingouin.com/2025/06/12/ewc-consolidation-elastique-poids-apprentissage-continu-guide-en/)</sup>。

完整的 Fisher 信息矩阵难以计算和存储，因为其大小与网络参数数量的平方成正比；因此 EWC 使用对角近似<sup>[3](https://link.springer.com/article/10.1007/s11263-026-03018-4)</sup>。这一对角假设具有实际后果。Fisher 对角线的精确计算复杂度与输出数量成线性关系，这使该方法的适用范围局限于低维输出空间<sup>[8](https://spectra.mathpix.com/article/2021.09.00005/continual-learning)</sup>。用参数空间的因子分解旋转对网络重新参数化，可近似对角化 Fisher 信息矩阵，从而改善 EWC 在顺序任务上的性能<sup>[9](https://arxiv.org/abs/1802.02950)</sup>。

另一个实际问题是 Fisher 信息如何估计。原始论文没有很好地描述确切的实现方式，也没有提供官方代码，网上流传着多种不同的实现；2025 年 ICLR 的一篇博客文章对它们进行了比较，发现最常用的计算方法做出的近似甚至比经验 Fisher 更粗糙，而且许多已报告的 EWC 结果很可能可以通过改变 Fisher 的计算方式来改善<sup>[10](https://iclr-blogposts.github.io/2025/blog/fisher/)</sup>。用于估计 Fisher 对角线的样本数量也影响估计的质量<sup>[5](https://www.thepingouin.com/2025/06/12/ewc-consolidation-elastique-poids-apprentissage-continu-guide-en/)</sup>。

## 理论批评

二次惩罚的贝叶斯推导在发表后受到质疑。当时在伦敦 Twitter 工作的研究科学家 Ferenc Huszár 发表了 2018 年 PNAS 的一篇评论，表明虽然二次惩罚可以完美地建模新任务，但在双任务情况下惩罚可能被放置在错误的锚点周围，他还给出了涵盖两个以上任务的扩展推导<sup>[2](https://pmc.ncbi.nlm.nih.gov/articles/PMC5856534/)</sup><sup> • </sup><sup>[11](https://arxiv.org/abs/1712.03847)</sup>。原始论文仅针对双任务情况推导了二次惩罚，因此其对于多任务设置的适用性受到了质疑<sup>[8](https://spectra.mathpix.com/article/2021.09.00005/continual-learning)</sup>。

## 变体与相关方法

**在线 EWC。** 为每个任务存储单独的 Fisher 矩阵使原始方法对长任务序列不切实际<sup>[12](https://zheda-mai.github.io/files/Zheda_Mai_20211_MASc_thesis_long.pdf)</sup>。在线 EWC 由 Jonathan Schwarz 及其同事在 2018 年的 Progress & Compress 框架中提出，维护一个单一的持续惩罚，以额外的近似为代价递归地累积 Fisher<sup>[4](https://www.mdpi.com/2227-7390/14/15/2774)</sup><sup> • </sup><sup>[5](https://www.thepingouin.com/2025/06/12/ewc-consolidation-elastique-poids-apprentissage-continu-guide-en/)</sup>。Progress & Compress 本身训练一个连接到主动学习列的固定大小知识库，将每个新任务蒸馏到知识库中同时保护先前的技能，无需架构增长、无需存储数据、无需任务特定参数<sup>[13](https://proceedings.mlr.press/v80/schwarz18a.html)</sup>。

**超越对角线。** Ritter 及其同事用 Kronecker 因子分解的块对角 Hessian 近似取代了对角线<sup>[4](https://www.mdpi.com/2227-7390/14/15/2774)</sup>。其他工作改进了对角线本身：在应用 EWC 之前旋转参数空间可在顺序任务上带来显著更好的性能<sup>[9](https://arxiv.org/abs/1802.02950)</sup>。

**同类正则化方法。** [突触智能](https://www.edgepedia.org/zh/synaptic-intelligence)（Synaptic Intelligence）从每个参数对神经元激活的贡献来估计其重要性，记忆感知突触（Memory Aware Synapses）学习每个任务的重要参数记忆；两者在策略上与 EWC 相似<sup>[14](https://link.springer.com/article/10.1007/s11063-024-11709-7)</sup>。一项统一分析表明，尽管源于截然不同的动机，SI 和 MAS 都被证明是 Fisher 信息平方根的近似，而 Fisher 信息则为 EWC 提供了有理论依据的基础<sup>[15](https://arxiv.org/abs/2006.06357)</sup>。

## 应用

EWC 已被应用于数据以序列形式到达的各个领域。在强化学习中，原始论文将 EWC 与深度网络结合用于依次游玩的 [Atari 2600](https://www.edgepedia.org/zh/atari-2600) 游戏<sup>[1](https://doi.org/10.1073/pnas.1611835114)</sup>。在医学中，它首次被应用于多发性硬化症病灶分割中的域增量学习，使模型能够适应新域同时以最少的数据需求保留先前的知识<sup>[16](https://pmc.ncbi.nlm.nih.gov/articles/PMC12148725/)</sup>，它还出现在胸部 X 光片分类的联邦持续学习中，每个客户端为每个任务估计一个对角 Fisher 向量<sup>[17](https://pmc.ncbi.nlm.nih.gov/articles/PMC13500843/)</sup>。它还被用于 Gemma2 20 亿参数语言模型在立陶宛语语料上的全参数持续预训练，在英语和立陶宛语理解和困惑度基准上进行了评估<sup>[18](https://arxiv.org/abs/2505.05946)</sup>，以及用于知识图谱链接预测，其相对于回放方法的优势被归因于在回放缓冲区有限时对参数进行有理论依据的保护<sup>[7](https://ceur-ws.org/Vol-4162/paper3.pdf)</sup>。

## 局限性

文献中反复出现三个局限性。第一，原始公式需要为每个任务存储一个 Fisher 信息矩阵，这在长任务序列中变得不切实际<sup>[12](https://zheda-mai.github.io/files/Zheda_Mai_20211_MASc_thesis_long.pdf)</sup>。第二，当任务非常不同时，例如图像分类后接文本翻译，EWC 可能过度约束新任务的学习，因为几乎所有权重都受到不可忽略的惩罚<sup>[5](https://www.thepingouin.com/2025/06/12/ewc-consolidation-elastique-poids-apprentissage-continu-guide-en/)</sup>。

## References

1. [James Kirkpatrick et al. (2017). Overcoming catastrophic forgetting in neural networks. PNAS.](https://doi.org/10.1073/pnas.1611835114)
2. [Ferenc Huszár (2018). Note on the quadratic penalties in elastic weight consolidation. PNAS 115(11):E2496–E2497.](https://pmc.ncbi.nlm.nih.gov/articles/PMC5856534/)
3. [EFC++: Elastic Feature Consolidation with Prototype Re-balancing for Cold Start Exemplar-free Incremental Learning. IJCV.](https://link.springer.com/article/10.1007/s11263-026-03018-4)
4. [Modern Continual Learning with Foundation Models, Evaluation Challenges, and Future Directions. MDPI Mathematics.](https://www.mdpi.com/2227-7390/14/15/2774)
5. [EWC: Elastic Weight Consolidation for Continual Learning. The Pingouin.](https://www.thepingouin.com/2025/06/12/ewc-consolidation-elastique-poids-apprentissage-continu-guide-en/)
6. [On the Computation of the Fisher Information in Continual Learning, ICLR 2025 slides.](https://iclr.cc/media/iclr-2025/Slides/31332.pdf)
7. [Gaganpreet Jhajj, Fuhua Lin. Elastic Weight Consolidation for Knowledge Graph Continual Learning: An Empirical Evaluation. CEUR Vol-4162.](https://ceur-ws.org/Vol-4162/paper3.pdf)
8. [Spectra: Towards continual task learning in artificial neural networks.](https://spectra.mathpix.com/article/2021.09.00005/continual-learning)
9. [Rotate your Networks: Better Weight Consolidation and Less Catastrophic Forgetting. arXiv.](https://arxiv.org/abs/1802.02950)
10. [On the Computation of the Fisher Information in Continual Learning. ICLR Blogposts 2025.](https://iclr-blogposts.github.io/2025/blog/fisher/)
11. [Ferenc Huszár (2017). On Quadratic Penalties in Elastic Weight Consolidation. arXiv.](https://arxiv.org/abs/1712.03847)
12. [Zheda Mai. Comparative Empirical Study of Online Continual Learning, MASc thesis.](https://zheda-mai.github.io/files/Zheda_Mai_20211_MASc_thesis_long.pdf)
13. [Jonathan Schwarz et al. (2018). Progress & Compress: A scalable framework for continual learning. PMLR 80:4528–4537.](https://proceedings.mlr.press/v80/schwarz18a.html)
14. [Continual Learning in Medicine: A Systematic Literature Review. Neural Processing Letters.](https://link.springer.com/article/10.1007/s11063-024-11709-7)
15. [Unifying Regularisation Methods for Continual Learning. arXiv.](https://arxiv.org/abs/2006.06357)
16. [Mitigating catastrophic forgetting in Multiple sclerosis lesion segmentation using elastic weight consolidation. PMC.](https://pmc.ncbi.nlm.nih.gov/articles/PMC12148725/)
17. [Federated continual learning for privacy-preserving chest radiograph classification. PMC.](https://pmc.ncbi.nlm.nih.gov/articles/PMC13500843/)
18. [Elastic Weight Consolidation for Full-Parameter Continual Pre-Training of Gemma2. arXiv.](https://arxiv.org/abs/2505.05946)
19. [Improved Elastic Weight Consolidation as an Optimization Constraint for Continual Learning. ResearchGate.](https://www.researchgate.net/publication/407154153_IMPROVED_ELASTIC_WEIGHT_CONSOLIDATION_AS_AN_OPTIMIZATION_CONSTRAINT_FOR_CONTINUAL_LEARNING)

---
*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/elastic-weight-consolidation

English original: https://www.edgepedia.org/elastic-weight-consolidation
