# PackNet

PackNet 是一种用于深度神经网络的持续学习方法，由伊利诺伊大学厄巴纳-香槟分校的阿伦·马利亚（Arun Mallya）和斯维特兰娜·拉泽布尼克（Svetlana Lazebnik）提出。该方法通过迭代剪枝和冻结权重，将多个任务添加到一个固定大小的单一网络中，使每个任务占据各自的稀疏子网络<sup>[1](https://arxiv.org/abs/1711.05769)</sup>。该方法利用了大型过参数化网络中的冗余：一个任务训练完成后，最不重要的权重被剪除，存活的权重被冻结，释放出的参数则被复用于学习下一个任务<sup>[1](https://arxiv.org/abs/1711.05769)</sup>。该工作在 CVPR 2018 上发表（第 7765–7773 页）<sup>[2](https://openaccess.thecvf.com/content_cvpr_2018/html/Mallya_PackNet_Adding_Multiple_CVPR_2018_paper.html)</sup>。

| 关键事实 | 详情 |
|---|---|
| 来源 | 阿伦·马利亚和斯维特兰娜·拉泽布尼克，伊利诺伊大学厄巴纳-香槟分校；arXiv 2017 年 11 月 15 日，CVPR 2018<sup>[1](https://arxiv.org/abs/1711.05769)</sup><sup> • </sup><sup>[2](https://openaccess.thecvf.com/content_cvpr_2018/html/Mallya_PackNet_Adding_Multiple_CVPR_2018_paper.html)</sup> |
| 核心循环 | 用全部空闲权重在当前任务上训练，每层剪除幅度最小的 50% 或 75% 合格权重，冻结存活权重，然后在释放的权重上训练下一个任务<sup>[3](https://arxiv.org/html/1711.05769)</sup> |
| 存储开销 | N 个任务时每个参数至多需要 log₂(N) 比特；向一个 537 MB 的 ImageNet 训练 VGG-16 添加一个和三个任务分别花费约 17 MB 和 34 MB，四个任务仅增加 1/16 的模型大小<sup>[3](https://arxiv.org/html/1711.05769)</sup> |
| 标志性结果 | 向 ImageNet 训练的 VGG-16 添加三个细粒度分类任务（CUBS Birds、Stanford Cars、Oxford Flowers），top-1 误差仅比单独网络差 2.38%、1.78% 和 1.10%；一个 595 MB 的模型替代了总计 2,173 MB 的四个模型<sup>[3](https://arxiv.org/html/1711.05769)</sup> |
| 推理成本 | 无额外运行时开销，因为权重在乘法时只是被掩码开/关；但无法对所有任务同时推理，且必须知道任务身份才能选择掩码<sup>[3](https://arxiv.org/html/1711.05769)</sup> |
| 主要局限 | 固定容量设计：每个任务消耗剩余权重的一部分，因此容量最终会耗尽，后续任务受到影响<sup>[4](https://openaccess.thecvf.com/content/CVPR2026/papers/Chen_Parameter-efficient_Continual_Learning_for_Enhancing_Plasticity_without_Forgetting_under_Limited_CVPR_2026_paper.pdf)</sup> |

## 所解决的问题

当神经网络在新任务上微调时，对先前任务重要的权重被改变，其性能随之退化，这一现象称为灾难性遗忘<sup>[3](https://arxiv.org/html/1711.05769)</sup>。此前的方案如[无遗忘学习](https://www.edgepedia.org/zh/learning-without-forgetting)（LwF）和弹性权重巩固（EWC）通过代理损失来保留旧知识：LwF 使用蒸馏损失来保留激活值，而 EWC 对被认为对先前任务重要的参数变化施加惩罚<sup>[3](https://arxiv.org/html/1711.05769)</sup>。PackNet 则始终针对当前任务进行优化，并通过直接冻结权重在结构上保护旧任务<sup>[1](https://arxiv.org/abs/1711.05769)</sup>。

## 方法原理

**训练循环。** 从一个在初始任务上训练好的网络出发，PackNet 从每个卷积层和全连接层中剪除固定比例的合格权重：权重按绝对值大小排序，最低的 50% 或 75% 被置零<sup>[3](https://arxiv.org/html/1711.05769)</sup>。剪枝会导致精度突然下降，因此网络需要以较少的轮数重新训练以恢复；在作者的实验中，剪枝和重新训练的耗时大约是简单微调的 1.5 倍<sup>[3](https://arxiv.org/html/1711.05769)</sup>。存活的权重随后为该任务永久冻结。下一个任务在剪枝后的权重上训练，这些权重从零恢复，循环重复，直到所有任务添加完毕或没有空闲参数为止<sup>[3](https://arxiv.org/html/1711.05769)</sup>。

**冻结什么。** 只有属于当前任务的权重被剪枝；先前任务的权重从不修改，这保证了添加新任务时先前任务的性能不变<sup>[3](https://arxiv.org/html/1711.05769)</sup>。作者发现无需学习任务特定的偏置，在使用批归一化的网络中，他们在第一轮剪枝和重新训练后冻结了增益、偏置和运行统计量，从而减少了每个任务的开销<sup>[3](https://arxiv.org/html/1711.05769)</sup>。

**掩码与存储。** 每个任务的唯一额外开销是一个指示哪些参数活跃的稀疏掩码。由于任务 K 首次使用的参数会被任务 K 到 N 的所有任务使用，掩码每个参数至多需要 log₂(N) 比特，而非每个任务一比特<sup>[3](https://arxiv.org/html/1711.05769)</sup>。推理时，应用所选任务的掩码，使网络精确复现该任务训练期间学到的滤波器<sup>[3](https://arxiv.org/html/1711.05769)</sup>。

## 实验结果

原始评估向一个 ImageNet 训练的 VGG-16 添加三个细粒度分类任务——CUBS Birds、Stanford Cars 和 Oxford Flowers——覆盖全部六种任务顺序，每种顺序运行三次<sup>[3](https://arxiv.org/html/1711.05769)</sup>。初始剪枝 50%，之后每个任务后剪枝 75%，误差与单独训练网络的误差相差不超过 1–2%，单一打包模型使用 595 MB，而四个单独网络共需 2,173 MB<sup>[3](https://arxiv.org/html/1711.05769)</sup>。该方法始终优于 LwF——LwF 在旧任务上的误差随每添加一个数据集而增加，而 PackNet 在先前任务上的误差保持固定<sup>[3](https://arxiv.org/html/1711.05769)</sup>。

**规模与架构。** 向一个 75% 剪枝的 ImageNet 网络添加大规模 Places365 数据集（180 万张训练图像），top-1 误差与单独训练网络的 top-1 误差相差不超过 0.64%，且优于联合训练的模型——后者在 ImageNet 上的 top-1 误差为 33.49%，而单独训练为 28.42%<sup>[3](https://arxiv.org/html/1711.05769)</sup>。该方案还推广到了使用批归一化的 VGG-16、ResNet-50 和 DenseNet-121，更深的 ResNet 和 DenseNet 网络在剪枝后在 ImageNet 上仅损失 0.45% 和 0.04% 的 top-1 精度<sup>[3](https://arxiv.org/html/1711.05769)</sup>。

**为何采用权重级剪枝。** 作者与基于滤波器的剪枝进行了比较，后者移除整个滤波器。每轮剪除 400 个滤波器、共 10 轮，消除了 VGG-16 的 12,416 个滤波器中的 4,000 个（约 30%），而这 4,000 个中有 3,730 个来自全连接层，导致低层剩余参数太少，无法有效微调新任务；基于滤波器的剪枝只允许添加一个额外任务<sup>[5](https://openaccess.thecvf.com/content_cvpr_2018/papers/Mallya_PackNet_Adding_Multiple_CVPR_2018_paper.pdf)</sup>。

## 在持续学习研究中的定位

PackNet 被归类为参数隔离或基于架构的方法：它通过在固定大小的模型中为每个任务分配专用的冻结子网络来防止遗忘<sup>[6](https://mochi-lab.vercel.app/survey/ch1-continual-learning/architecture-methods)</sup><sup> • </sup><sup>[7](https://www.sciencedirect.com/science/article/abs/pii/S0893608025011074)</sup>。相关方法以不同方式识别重要参数：UCL 使用参数不确定性，AGS-CL 使用激活值，而 CLNP 在神经元级别进行剪枝<sup>[7](https://www.sciencedirect.com/science/article/abs/pii/S0893608025011074)</sup><sup> • </sup><sup>[8](https://arxiv.org/abs/1903.04476)</sup>。PathNet 追求类似的冻结旧路径的目标，但需要计算密集的进化搜索，PackNet 避免了这一点<sup>[3](https://arxiv.org/html/1711.05769)</sup>。

**已知弱点。** 由于 PackNet 在推理时需要任务身份来选择正确的掩码，它适用于任务增量设置；Continual World 机器人基准明确指出了这一依赖<sup>[9](https://www.researchgate.net/publication/351840323_Continual_World_A_Robotic_Benchmark_For_Continual_Reinforcement_Learning)</sup>。后续工作还发现了一个可塑性问题：在固定剪枝率下，长任务序列中容量迅速耗尽，PackNet 在后期更复杂的任务上表现不佳<sup>[4](https://openaccess.thecvf.com/content/CVPR2026/papers/Chen_Parameter-efficient_Continual_Learning_for_Enhancing_Plasticity_without_Forgetting_under_Limited_CVPR_2026_paper.pdf)</sup>。一项长序列分析发现，由于每个任务获得的是相对比例的容量，无论模型大小如何，饱和都发生在同一点；在一项实验中，初始 90% 的剪枝率两次衰减后有效剪枝率为 72.9%<sup>[10](https://qmro.qmul.ac.uk/xmlui/bitstream/handle/123456789/105625/Slabaugh%20A%20Continual%20Learning%202021%20Accepted.pdf?sequence=2)</sup>。在效率方面，一项受人类睡眠周期启发的研究发现，采用 PackNet 的权重冻结方式，达到给定性能水平所需的权重可能超过替代方案的两倍<sup>[11](https://arxiv.org/abs/2010.15187)</sup>。

**扩展。** 高效稀疏 PackNet（ESPN）是一种推理高效的变体，应用联合通道和权重剪枝，将任务嵌入通道稀疏的子网络中，计算所需的 FLOPs 最多减少 80%，同时大致保持精度<sup>[12](https://arxiv.org/abs/2203.02026)</sup>。PackNet 作为标准基线被收录在 [Avalanche](https://www.edgepedia.org/zh/avalanche) 等持续学习库中，在任务增量场景下于 Split Tiny ImageNet 上达到 ACC = 0.46<sup>[13](https://github.com/ContinualAI/continual-learning-baselines)</sup>。

## 同名的另一种方法

PackNet 也是一种无关架构的名称，用于[自监督单目深度估计](https://www.edgepedia.org/zh/self-supervised-monocular-depth-estimation)，由丰田研究所的机器学习团队在 CVPR 2020 上发表。该 PackNet 使用对称的打包和解包模块配合三维卷积来压缩和解压保留细节的表示，以 TRI-ML packnet-sfm 仓库分发<sup>[14](https://github.com/TRI-ML/packnet-sfm)</sup>。

## References

1. [Arun Mallya, Svetlana Lazebnik (2017). PackNet: Adding Multiple Tasks to a Single Network by Iterative Pruning. arXiv:1711.05769.](https://arxiv.org/abs/1711.05769)
2. [PackNet: Adding Multiple Tasks to a Single Network by Iterative Pruning, CVPR 2018 Open Access Repository](https://openaccess.thecvf.com/content_cvpr_2018/html/Mallya_PackNet_Adding_Multiple_CVPR_2018_paper.html)
3. [PackNet: Adding Multiple Tasks to a Single Network by Iterative Pruning (arXiv HTML, v2)](https://arxiv.org/html/1711.05769)
4. [Chen et al. Parameter-efficient Continual Learning for Enhancing Plasticity without Forgetting under Limited Model Capacity, CVPR 2026](https://openaccess.thecvf.com/content/CVPR2026/papers/Chen_Parameter-efficient_Continual_Learning_for_Enhancing_Plasticity_without_Forgetting_under_Limited_CVPR_2026_paper.pdf)
5. [Mallya & Lazebnik, CVPR 2018 paper PDF](https://openaccess.thecvf.com/content_cvpr_2018/papers/Mallya_PackNet_Adding_Multiple_CVPR_2018_paper.pdf)
6. [Architecture-Based Methods, Mochi Lab continual learning survey](https://mochi-lab.vercel.app/survey/ch1-continual-learning/architecture-methods)
7. [Continual learning: A systematic literature review, ScienceDirect](https://www.sciencedirect.com/science/article/abs/pii/S0893608025011074)
8. [Golkar, Kagan, Cho (2019). Continual Learning via Neural Pruning. arXiv:1903.04476.](https://arxiv.org/abs/1903.04476)
9. [Continual World: A Robotic Benchmark For Continual Reinforcement Learning](https://www.researchgate.net/publication/351840323_Continual_World_A_Robotic_Benchmark_For_Continual_Reinforcement_Learning)
10. [PackNet Long Sequence Capacity Analysis, QMUL (Continual Learning 2021 appendix)](https://qmro.qmul.ac.uk/xmlui/bitstream/handle/123456789/105625/Slabaugh%20A%20Continual%20Learning%202021%20Accepted.pdf?sequence=2)
11. [Ball, Li, Lamb, Zhang (2020). A Study on Efficiency in Continual Learning Inspired by Human Learning. arXiv:2010.15187.](https://arxiv.org/abs/2010.15187)
12. [Li, Li, Asif, Oymak (2022). Provable and Efficient Continual Representation Learning. arXiv:2203.02026.](https://arxiv.org/abs/2203.02026)
13. [ContinualAI continual-learning-baselines (Avalanche)](https://github.com/ContinualAI/continual-learning-baselines)
14. [TRI-ML packnet-sfm: 3D Packing for Self-Supervised Monocular Depth Estimation](https://github.com/TRI-ML/packnet-sfm)

---
*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/packnet

English original: https://www.edgepedia.org/packnet
