[论文解读] OPQ: Compressing Deep Neural Networks with One-shot Pruning-Quantization
本文提出了一种新型方法——一次性剪枝-量化(OPQ),该方法仅使用预训练权重,通过解析计算,无需微调过程中的迭代或手动调优,即可确定深度神经网络的最优剪枝掩码和量化码书。OPQ通过引入统一的逐通道量化方案,每层共享一个码书,显著降低了开销,在实现最先进压缩率的同时,仅造成极小的精度损失,尤其在高倍率压缩下表现优异。
As Deep Neural Networks (DNNs) usually are overparameterized and have millions of weight parameters, it is challenging to deploy these large DNN models on resource-constrained hardware platforms, e.g., smartphones. Numerous network compression methods such as pruning and quantization are proposed to reduce the model size significantly, of which the key is to find suitable compression allocation (e.g., pruning sparsity and quantization codebook) of each layer. Existing solutions obtain the compression allocation in an iterative/manual fashion while finetuning the compressed model, thus suffering from the efficiency issue. Different from the prior art, we propose a novel One-shot Pruning-Quantization (OPQ) in this paper, which analytically solves the compression allocation with pre-trained weight parameters only. During finetuning, the compression module is fixed and only weight parameters are updated. To our knowledge, OPQ is the first work that reveals pre-trained model is sufficient for solving pruning and quantization simultaneously, without any complex iterative/manual optimization at the finetuning stage. Furthermore, we propose a unified channel-wise quantization method that enforces all channels of each layer to share a common codebook, which leads to low bit-rate allocation without introducing extra overhead brought by traditional channel-wise quantization. Comprehensive experiments on ImageNet with AlexNet/MobileNet-V1/ResNet-50 show that our method improves accuracy and training efficiency while obtains significantly higher compression rates compared to the state-of-the-art.
研究动机与目标
- 解决现有DNN压缩剪枝-量化方法中迭代或手动调优效率低下的问题。
- 仅使用预训练模型参数,实现层间剪枝比例与量化码书的同步、解析式确定。
- 通过每层强制使用统一码书,降低逐通道量化带来的计算与硬件开销。
- 在不牺牲模型精度的前提下实现高倍率压缩,尤其在极端压缩水平下表现优异。
- 提供一种一次性、非迭代的框架,在微调过程中固定压缩模块,从而提升训练效率。
提出的方法
- 利用拉普拉斯概率密度函数构建统一的剪枝误差模型,从预训练权重中解析计算各层的剪枝比例。
- 直接从预训练模型中推导出基于重要性的剪枝掩码,无需迭代掩码优化。
- 提出一种统一的逐通道量化方法,使某一层内所有通道共享一个量化器,从而消除逐通道码书的开销。
- 通过最小化近似量化误差,解析计算每层的量化步长(Δi),利用剪枝后权重的方差进行推导。
- 在微调过程中固定剪枝掩码与量化参数,仅更新网络权重以补偿压缩带来的精度损失。
- 采用误差近似技术验证解析解的有效性,结果显示理论误差与实际剪枝及量化误差高度一致。
实验结果
研究问题
- RQ1是否仅从预训练权重出发,无需迭代优化,即可解析确定剪枝与量化分配?
- RQ2是否通过每层共享单一码书的统一逐通道量化方案,能在保持高倍率压缩效率的同时降低开销?
- RQ3一次性剪枝-量化是否能在不造成显著精度下降的前提下,实现高于现有方法的压缩率?
- RQ4理论误差近似与真实模型中的剪枝与量化误差相比,表现如何?
- RQ5该方法在AlexNet、MobileNet-V1和ResNet-50等多样化架构上,在极端压缩水平下是否依然有效?
主要发现
- OPQ在ImageNet数据集上,针对AlexNet、MobileNet-V1和ResNet-50均实现了SOTA压缩率,显著优于先前方法。
- 即使在极高倍率压缩下,该方法仍能提升模型精度,展现出对激进剪枝与量化具有强鲁棒性。
- 解析剪枝与量化误差近似与实际误差高度吻合,验证了方法的理论基础可靠性。
- 统一的逐通道量化方案相比传统逐通道方法显著降低了硬件开销,有利于高效部署。
- 通过在微调过程中固定压缩模块,OPQ降低了训练复杂度,相比迭代优化方法,训练效率更高。
- 实验结果证实,仅凭预训练模型参数,即可在一次性操作中确定最优剪枝与量化策略。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。