Skip to main content
QUICK REVIEW

[论文解读] Training Deep Neural Networks with Joint Quantization and Pruning of Weights and Activations

Xinyu Zhang, Ian Colbert|arXiv (Cornell University)|Oct 15, 2021
Advanced Neural Network Applications参考文献 53被引用 7
一句话总结

本文提出了一种统一框架,用于在训练过程中对深度神经网络中的权重和激活值进行联合量化与非结构化剪枝。通过引入延迟量化和饱和量化,并将非结构化剪枝扩展至激活值空间,作者证明了剪枝与量化的顺序显著影响模型性能——由此提出非交换性假设,表明最优训练策略在判别性任务与生成性任务之间存在差异,相较于最先进方法,实现了更高的内存效率性能表现。

ABSTRACT

Quantization and pruning are core techniques used to reduce the inference costs of deep neural networks. State-of-the-art quantization techniques are currently applied to both the weights and activations; however, pruning is most often applied to only the weights of the network. In this work, we jointly apply novel uniform quantization and unstructured pruning methods to both the weights and activations of deep neural networks during training. Using our methods, we empirically evaluate the currently accepted prune-then-quantize paradigm across a wide range of computer vision tasks and observe a non-commutative nature when applied to both the weights and activations of deep neural networks. Informed by these observations, we articulate the non-commutativity hypothesis: for a given deep neural network being trained for a specific task, there exists an exact training schedule in which quantization and pruning can be introduced to optimize network performance. We identify that this optimal ordering not only exists, but also varies across discriminative and generative tasks. Using the optimal training schedule within our training framework, we demonstrate increased performance per memory footprint over existing solutions.

研究动机与目标

  • 为解决深度神经网络中权重与激活值联合优化量化与剪枝的空白问题。
  • 探究剪枝与量化应用顺序是否影响模型性能,挑战默认的‘先剪枝后量化’范式。
  • 在判别性与生成性计算机视觉任务中评估该框架,这在先前工作中较为罕见。
  • 开发新型量化技术——延迟量化与饱和量化,以提升训练稳定性并降低对初始化的敏感性。
  • 将非结构化剪枝扩展至激活值空间,并通过实证评估其影响,据作者所知,这是首次此类全面研究。

提出的方法

  • 提出一种新颖的训练框架,在反向传播过程中对权重和激活值同时应用均匀量化与非结构化剪枝。
  • 引入‘延迟量化’——将直通估计器(STE)的使用推迟至训练后期阶段,以降低对权重初始化的敏感性。
  • 引入‘饱和量化’——在训练过程中使用分位数对激活值分布进行截断,以缓解长尾分布与异常值的影响。
  • 将Zhu和Gupta(2017)的非结构化权重剪枝方法扩展至激活值空间,实现对单个激活值的剪枝。
  • 采用灵活的训练调度策略,支持对‘先剪枝后量化’与‘先量化后剪枝’两种顺序的评估。
  • 使用统一框架直接控制权重与激活值的目标位宽与稀疏度,实现在硬件约束下的精确压缩。

实验结果

研究问题

  • RQ1当在权重与激活值上同时应用剪枝与量化时,其应用顺序是否会影响深度神经网络的性能?
  • RQ2对激活值进行联合量化与剪枝,与仅剪枝权重的传统方法相比有何差异?
  • RQ3在深度神经网络中,当对权重与激活值同时应用剪枝与量化时,是否存在非交换关系?
  • RQ4在判别性任务与生成性任务之间,最优训练调度(先剪枝后量化 vs. 先量化后剪枝)是否存在差异?
  • RQ5所提出的框架是否能在内存效率性能表现上超越现有最先进压缩技术?

主要发现

  • 联合量化与剪枝的最优训练调度具有非交换性:性能取决于剪枝与量化应用的顺序。
  • 对于图像分类等判别性任务(如CIFAR10),‘先剪枝后量化’调度在内存效率性能表现上更优。
  • 对于图像到图像翻译等生成性任务(使用GANs),‘先量化后剪枝’调度优于标准范式。
  • 在CIFAR10上,该框架在现有方法中实现了最高的性能密度(PD),具有最小的内存占用与最优的压缩约束下准确率。
  • 饱和量化有效减轻了长尾激活值分布的影响,提升了GAN训练的稳定性。
  • 将非结构化剪枝扩展至激活值空间显著提升了内存效率性能表现,尤其在资源受限的推理场景中优势明显。

更好的研究,从现在开始

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

无需绑定信用卡

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