Skip to main content
QUICK REVIEW

[论文解读] To Compress, or Not to Compress: Characterizing Deep Learning Model Compression for Embedded Inference

Qing Qin, Jie Ren|arXiv (Cornell University)|Oct 21, 2018
Advanced Neural Network Applications参考文献 19被引用 7
一句话总结

本文对NVIDIA Jetson TX2嵌入式平台上模型压缩技术——剪枝与量化——进行了全面的实证表征,评估了其在11种不同深度学习模型上对推理速度、能耗、模型大小和准确率的影响。研究结果表明,压缩效果高度依赖于模型架构和目标平台,不存在通用的最优配置,同时为根据应用约束选择压缩策略提供了可操作的指导建议。

ABSTRACT

The recent advances in deep neural networks (DNNs) make them attractive for embedded systems. However, it can take a long time for DNNs to make an inference on resource-constrained computing devices. Model compression techniques can address the computation issue of deep inference on embedded devices. This technique is highly attractive, as it does not rely on specialized hardware, or computation-offloading that is often infeasible due to privacy concerns or high latency. However, it remains unclear how model compression techniques perform across a wide range of DNNs. To design efficient embedded deep learning solutions, we need to understand their behaviors. This work develops a quantitative approach to characterize model compression techniques on a representative embedded deep learning architecture, the NVIDIA Jetson Tx2. We perform extensive experiments by considering 11 influential neural network architectures from the image classification and the natural language processing domains. We experimentally show that how two mainstream compression techniques, data quantization and pruning, perform on these network architectures and the implications of compression techniques to the model storage size, inference time, energy consumption and performance metrics. We demonstrate that there are opportunities to achieve fast deep inference on embedded systems, but one must carefully choose the compression settings. Our results provide insights on when and how to apply model compression techniques and guidelines for designing efficient embedded deep learning systems.

研究动机与目标

  • 理解模型压缩技术在真实嵌入式系统中的性能权衡。
  • 评估剪枝与量化在资源受限设备上对推理时间、能耗、模型大小和准确率的影响。
  • 识别在何种情况下以及如何有效应用压缩技术以优化嵌入式深度学习工作负载。
  • 基于应用特定约束,提供数据驱动的模型压缩优化指导。
  • 揭示模型大小减少并不总能带来更快的推理速度,挑战了该领域中的既有假设。

提出的方法

  • 在NVIDIA Jetson TX2平台上,针对来自图像分类与自然语言处理领域的11种代表性DNN进行了广泛实验。
  • 应用两种主流压缩技术:基于大小的剪枝和训练后权重量化,分别实现8位与4位精度。
  • 测量并比较关键指标:推理延迟、能耗、模型存储大小以及压缩前后的预测准确率。
  • 采用定量的跨架构评估框架,分析不同网络架构下的压缩行为。
  • 评估剪枝与量化联合应用的效果,以评估协同增益。
  • 分析压缩对不同类型网络的影响,包括CNNs与RNNs,以识别架构相关的趋势。

实验结果

研究问题

  • RQ1在嵌入式平台上,剪枝与量化如何影响多样化DNN架构的推理时间、能耗、模型大小和准确率?
  • RQ2通过压缩减小模型大小是否总能在嵌入式设备上带来更快的推理速度?
  • RQ3对于RNNs或CNNs等特定网络类型,剪枝与量化哪种压缩技术能提供更好的性能权衡?
  • RQ4剪枝与量化联合应用的性能影响是什么?何时量化带来的开销会超过剪枝带来的收益?
  • RQ5我们能否识别出在嵌入式部署中能平衡大小、速度与准确率的帕累托最优压缩参数配置?

主要发现

  • 剪枝可实现对预测准确率的细粒度控制,尤其对具有循环结构的RNNs效果显著。
  • 量化在减小模型大小方面比剪枝更有效,但由于硬件特定的内存访问模式,可能不会总是降低推理时间。
  • 压缩带来的性能提升高度依赖于底层神经网络架构,不存在适用于所有场景的统一配置。
  • 剪枝与量化结合可产生协同增益,但仅当量化开销未抵消稀疏性带来的收益时才成立。
  • 模型大小减少并不保证推理速度提升——部分压缩模型由于内存访问或计算模式低效,反而出现延迟增加。
  • 对于需要高预测置信度的应用(如监控),由于剪枝具有可控的准确率权衡,因此更优。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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