Skip to main content
QUICK REVIEW

[论文解读] A Deep Neural Network Compression Pipeline: Pruning, Quantization, Huffman Encoding

Song Han, Huizi Mao|arXiv (Cornell University)|Oct 1, 2015
Advanced Neural Network Applications参考文献 8被引用 33
一句话总结

本文提出了一种三阶段深度压缩流水线——剪枝、量化和霍夫曼编码,将神经网络大小减少了35倍至49倍,且无精度损失。该方法通过大幅减小模型尺寸,提升了CPU、GPU和移动GPU平台上的推理速度与能效,从而实现了在嵌入式和移动系统中的高效部署。

ABSTRACT

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.

研究动机与目标

  • 解决在资源受限的嵌入式和移动系统上部署大型、计算密集和内存密集型神经网络的挑战。
  • 在不牺牲模型精度的前提下,减小深度神经网络的存储占用。
  • 通过最小化模型尺寸,实现片上SRAM缓存,减少对较慢的片外DRAM的依赖。
  • 提升移动和边缘设备的推理速度与能效。
  • 促进在带宽和存储受限的移动应用中部署复杂模型。

提出的方法

  • 应用基于大小的剪枝,移除不重要的连接,将参数数量减少9倍至13倍。
  • 应用训练后的量化,将32位浮点权重映射为5位定点表示,强制权重共享。
  • 微调剪枝和量化后的网络,以优化剩余连接和量化中心点。
  • 应用霍夫曼编码,通过熵编码进一步压缩量化后的权重。
  • 将剪枝、量化和霍夫曼编码整合为统一流水线,以最大化压缩效率。
  • 通过最小化内存访问和提升计算效率,优化在CPU、GPU和移动GPU平台上的部署。

实验结果

研究问题

  • RQ1剪枝、量化和熵编码的组合能否在不造成精度下降的情况下,将神经网络大小减少35倍以上?
  • RQ2压缩后的模型在多大程度上可以容纳在片上SRAM中,而非片外DRAM?
  • RQ3该压缩流水线对不同硬件平台上的推理速度和能效有何影响?
  • RQ4该方法能否在保留精度的前提下,有效应用于AlexNet和VGG-16等大型模型?
  • RQ5在移动和嵌入式环境中,压缩比、推理速度与能效之间的权衡关系如何?

主要发现

  • 该压缩流水线将ImageNet数据集上AlexNet的存储大小从240MB减少至6.9MB,实现了35倍的压缩,且无精度损失。
  • 该方法将VGG-16的大小从552MB减少至11.3MB,实现了49倍的压缩比,同时保持了原始精度。
  • 压缩后的模型在CPU、GPU和移动GPU平台上实现了每层推理3至4倍的速度提升。
  • 由于减少了内存带宽和计算量,能效在相同硬件平台上提升了3至7倍。
  • 压缩后的模型可存储在片上SRAM中,而非片外DRAM,从而降低了延迟和功耗。
  • 剪枝、量化和霍夫曼编码的结合,使得在存储和带宽受限的移动应用中部署复杂模型成为可能。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。