[论文解读] Structured Pruning is All You Need for Pruning CNNs at Initialization
本文提出 PreCrop,一种在模型初始化阶段通过优化基于期望的新型代理(SynExp)实现逐层通道密度的结构化剪枝方法,实现了硬件友好型结构化稀疏性的最先进精度。PreCrop 在 ImageNet 上相比细粒度 PAI 方法 SynFlow 最高提升 2.7% 的精度,并通过 PreConfig 实现无需参数的网络宽度重配置,进一步提升精度。
Pruning is a popular technique for reducing the model size and computational cost of convolutional neural networks (CNNs). However, a slow retraining or fine-tuning procedure is often required to recover the accuracy loss caused by pruning. Recently, a new research direction on weight pruning, pruning-at-initialization (PAI), is proposed to directly prune CNNs before training so that fine-tuning or retraining can be avoided. While PAI has shown promising results in reducing the model size, existing approaches rely on fine-grained weight pruning which requires unstructured sparse matrix computation, making it difficult to achieve real speedup in practice unless the sparsity is very high. This work is the first to show that fine-grained weight pruning is in fact not necessary for PAI. Instead, the layerwise compression ratio is the main critical factor to determine the accuracy of a CNN model pruned at initialization. Based on this key observation, we propose PreCropping, a structured hardware-efficient model compression scheme. PreCropping directly compresses the model at the channel level following the layerwise compression ratio. Compared to weight pruning, the proposed scheme is regular and dense in both storage and computation without sacrificing accuracy. In addition, since PreCropping compresses CNNs at initialization, the computational and memory costs of CNNs are reduced for both training and inference on commodity hardware. We empirically demonstrate our approaches on several modern CNN architectures, including ResNet, ShuffleNet, and MobileNet for both CIFAR-10 and ImageNet.
研究动机与目标
- 为解决现有剪枝于初始化(PAI)方法依赖非结构化稀疏计算的问题,该问题在标准硬件上限制了实际运行速度的提升。
- 识别出 PAI 中的模型精度仅取决于逐层参数密度,而非剪枝粒度,从而实现无精度损失的结构化剪枝。
- 提出一种基于新型代理——突触期望(Synaptic Expectation, SynExp)的凸优化框架,以在 FLOPs 或参数量约束下确定最优的逐层密度。
- 提出 PreCrop,一种在通道维度进行剪枝的结构化 PAI 方法,以实现硬件效率;并提出 PreConfig,一种无需成本的网络宽度重配置技术,用于提升精度。
- 证明粗粒度结构化剪枝可达到或超越细粒度非结构化剪枝的性能,同时在通用硬件上实现实际运行速度提升与模型压缩。
提出的方法
- 引入 SynExp(突触期望)作为模型精度的代理,定义为某一层中所有权重重要性得分的期望总和,替代先前方法中使用的总和。
- 将 PAI 建模为一个凸优化问题,通过最小化 SynExp 并施加总模型大小或 FLOPs 的约束,实现高效且最优的逐层密度选择。
- 证明 SynExp 不变量定理:在相同逐层密度下,无论剪枝粒度如何,模型精度保持不变,从而为结构化剪枝提供理论依据。
- 设计 PreCrop 作为结构化 PAI 方法,基于优化后的逐层密度剪枝整个通道,确保与密集矩阵运算的兼容性。
- 提出 PreConfig 作为零成本重配置技术,在权重初始化前调整通道宽度,使用相同的 SynExp 优化密度。
- 在 ResNet、MobileNetV2 和 EfficientNet 上实现并评估 PreCrop 与 PreConfig,覆盖 CIFAR-10 与 ImageNet 数据集,使用相同的训练超参数以确保公平比较。
实验结果
研究问题
- RQ1在模型初始化阶段剪枝的 CNN 精度是否仅取决于每层剩余参数的比例,而与剪枝粒度无关?
- RQ2基于新型期望代理(SynExp)的凸优化是否能在实现结构化稀疏性的同时,超越现有 PAI 方法的精度表现?
- RQ3在通道维度进行结构化剪枝是否可实现与细粒度非结构化剪枝相当或更优的精度,同时在通用硬件上实现实际运行速度提升?
- RQ4在初始化前重新配置网络宽度(PreConfig)是否能以更少的参数和 FLOPs 实现比原始架构更高的精度?
- RQ5所提出的基于 SynExp 的优化框架是否在模型大小、FLOPs 和精度之间的权衡上优于最先进 PAI 方法(如 SynFlow)?
主要发现
- 在 ImageNet 上,当剪枝至原始 FLOPs 的 80% 时,PreCrop 在 MobileNetV2 上相比 SynFlow 提升 2.7% 的精度。
- 对于 EfficientNetB0,PreCrop 在参数量减少至基线 80% 的同时保持相同 FLOPs,精度相比 SynFlow 提升 0.3%。
- 在 ResNet34 上,PreCrop 在相似 FLOPs 和参数量下精度比 SynFlow 低 0.6%,展现出强劲的竞争力。
- PreConfig 在 MobileNetV2 和 EfficientNetB0 上分别实现 0.3% 的精度提升,同时参数量减少 20% 和 19%,且保持与基线相同的 FLOPs。
- PreCrop-FLOPs 在所有 FLOPs 减少程度下均显著优于 SynFlow,尤其在高 FLOPs 减少时优势更明显,表明在计算约束下具有更高的效率。
- SynExp 不变量定理得到实证验证:相同逐层密度下,无论剪枝粒度如何,精度均相近,从而支持无精度损失的结构化剪枝。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。