深度压缩:通过剪枝、训练量化和霍夫曼编码压缩深度神经网络

Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding

韩松 Song Han · Stanford · 2015-10-01 · arXiv:1510.00149 ↗ · 被引 10164

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

神经网络既计算密集又内存密集,使其难以部署在硬件资源有限的嵌入式系统上。为了解决这一限制,我们引入了“深度压缩”,一个三阶段流程:剪枝、训练量化和霍夫曼编码,它们共同作用将神经网络的存储需求降低 35 倍至 49 倍,而不影响其准确性。我们的方法首先通过仅学习重要连接来剪枝网络。接下来,我们对权重进行量化以强制权重共享,最后应用霍夫曼编码。在前两个步骤之后,我们重新训练网络以微调剩余连接和量化中心。剪枝将连接数量减少 9 倍至 13 倍;量化则将表示每个连接的位数从 32 位减少到 5 位。在 ImageNet 数据集上,我们的方法将 AlexNet 所需的存储从 240MB 减少到 6.9MB,减少了 35 倍,且没有精度损失。我们的方法将 VGG-16 的大小从 552MB 减少到 11.3MB,减少了 49 倍,同样没有精度损失。这使得模型能够适配到片上 SRAM 缓存而非片外 DRAM 内存。我们的压缩方法还促进了在应用大小和下载带宽受限的移动应用中使用复杂神经网络。在 CPU、GPU 和移动 GPU 上进行的基准测试显示,压缩网络在层级别上实现了 3 倍至 4 倍的加速和 3 倍至 7 倍的能效提升。

Neural networks are both computationally intensive and memory intensive, making them difficult to deploy on embedded systems with limited hardware resources. To address this limitation, we introduce "deep compression", a three stage pipeline: pruning, trained quantization and Huffman coding, that work together to reduce the storage requirement of neural networks by 35x to 49x without affecting their accuracy. Our method first prunes the network by learning only the important connections. Next, we quantize the weights to enforce weight sharing, finally, we apply Huffman coding. After the first two steps we retrain the network to fine tune the remaining connections and the quantized centroids. Pruning, reduces the number of connections by 9x to 13x; Quantization then reduces the number of bits that represent each connection from 32 to 5. On the ImageNet dataset, our method reduced the storage required by AlexNet by 35x, from 240MB to 6.9MB, without loss of accuracy. Our method reduced the size of VGG-16 by 49x from 552MB to 11.3MB, again with no loss of accuracy. This allows fitting the model into on-chip SRAM cache rather than off-chip DRAM memory. Our compression method also facilitates the use of complex neural networks in mobile applications where application size and download bandwidth are constrained. Benchmarked on CPU, GPU and mobile GPU, compressed network has 3x to 4x layerwise speedup and 3x to 7x better energy efficiency.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 19)

阅读逐段中英对照全文 →