[论文解读] Automated Model Compression by Jointly Applied Pruning and Quantization
该论文提出AJPQ,一种自动化的模型压缩框架,通过将剪枝与量化联合优化为统一的混合精度量化问题,利用分层强化学习同时确定层稀疏度和通道特定的位宽。通过将剪枝视为0位量化,AJPQ实现了更高的压缩效率和性能——在仅造成极小精度损失的情况下,模型大小减少5倍以上,FLOPs减少2倍,优于AMC+HAQ等顺序方法。
In the traditional deep compression framework, iteratively performing network pruning and quantization can reduce the model size and computation cost to meet the deployment requirements. However, such a step-wise application of pruning and quantization may lead to suboptimal solutions and unnecessary time consumption. In this paper, we tackle this issue by integrating network pruning and quantization as a unified joint compression problem and then use AutoML to automatically solve it. We find the pruning process can be regarded as the channel-wise quantization with 0 bit. Thus, the separate two-step pruning and quantization can be simplified as the one-step quantization with mixed precision. This unification not only simplifies the compression pipeline but also avoids the compression divergence. To implement this idea, we propose the automated model compression by jointly applied pruning and quantization (AJPQ). AJPQ is designed with a hierarchical architecture: the layer controller controls the layer sparsity, and the channel controller decides the bit-width for each kernel. Following the same importance criterion, the layer controller and the channel controller collaboratively decide the compression strategy. With the help of reinforcement learning, our one-step compression is automatically achieved. Compared with the state-of-the-art automated compression methods, our method obtains a better accuracy while reducing the storage considerably. For fixed precision quantization, AJPQ can reduce more than five times model size and two times computation with a slight performance increase for Skynet in remote sensing object detection. When mixed-precision is allowed, AJPQ can reduce five times model size with only 1.06% top-5 accuracy decline for MobileNet in the classification task.
研究动机与目标
- 解决深度神经网络压缩中顺序剪枝与量化导致的次优性能和高时间成本问题。
- 通过将剪枝重新解释为0位通道级量化,将网络剪枝与量化统一为单一联合优化问题。
- 利用分层强化学习实现自动化、全局最优的压缩策略搜索,最大限度减少人工干预。
- 通过在单一统一流程中协同优化层稀疏度与通道位宽,提升压缩效率并保持精度。
提出的方法
- 将剪枝重新表述为通道级0位量化,使稀疏度与位宽的联合优化成为单一混合精度量化问题。
- 设计一种分层强化学习架构,包含用于连续空间中稀疏度控制的层控制器,以及用于每通道位宽选择的通道控制器。
- 使用深度确定性策略梯度(DDPG)训练层控制器,以确定每层最优保留比例。
- 对两个控制器采用相同的显著性准则,确保层与通道间压缩决策的一致性与协同性。
- 设计一种奖励函数,对违反模型大小或FLOP约束的方案施加惩罚,同时奖励性能保持,以实现高效探索。
- 采用两阶段搜索:首先由层控制器确定保留的通道;随后由通道控制器为剩余通道分配位宽。
实验结果
研究问题
- RQ1剪枝与量化能否被有效统一为单一优化问题,以提升压缩效率?
- RQ2与顺序方法相比,联合优化稀疏度与位宽选择是否能实现更优的模型压缩并减少性能退化?
- RQ3分层强化学习能否有效探索跨层与通道的大型混合精度配置搜索空间?
- RQ4所提出的奖励函数与现有方法相比,在引导高效且精确的压缩搜索方面表现如何?
- RQ5所提出的层选择策略(大层优先)是否在压缩效果上优于现有策略(如深层优先)?
主要发现
- 在遥感目标检测的Skynet模型上,AJPQ实现模型大小减少5倍以上、FLOPs减少2倍,top-5精度仅上升0.001%。
- 在图像分类的MobileNet模型上,AJPQ在混合精度量化下实现5倍模型大小压缩,top-5精度仅下降1.06%。
- 在Skynet上,AJPQ实现0.744× FLOP减少与0.001%精度提升,优于AMC+HAQ在两项指标上的表现。
- 由于一步压缩机制,分层AJPQ框架相比顺序的AMC+HAQ流水线,时间消耗减少近一半。
- AJPQ的“大层优先”层选择规则相比HAQ的“深层优先”规则,实现0.09更高的top-1精度与0.004更大的模型大小压缩。
- 所提出的奖励函数能有效过滤不可行的压缩方案,减少探索噪声,实现比AMC与HAQ更快的收敛速度与更优性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。