arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.14403cs.CVcs.AIcs.LG
收藏

基于延迟引导的层自适应结构化剪枝

Layer-adaptive Structured Pruning Guided by Latency

Kuaishou(快手);Shanghai Jiao Tong University(上海交通大学)

Siyuan Pan, Linna Zhang, Jie Zhang, Xiaoshuang Li, Liang Hou, Xiaobing Tu

AI总结:

本文提出层自适应结构化剪枝方法 SP-LAMP,将非结构化剪枝的 LAMP 分数推广到结构化场景,并结合分组背包求解器在延迟约束下优化剪枝,在保证精度的同时显著降低推理延迟。

摘要:

结构化剪枝能够简化网络架构并提升推理速度。结合最终模型部署所依赖的底层硬件和推理引擎,通过使用延迟协同损失函数来共同指导网络剪枝,可以获得更好的结果。现有以优化延迟为目标的剪枝方法已展现出领先的性能,然而它们往往忽略了网络中的硬件特征与连接关系。为解决这一问题,我们通过将非结构化剪枝中的全局重要性分数 LAMP 推导到结构化剪枝中,提出了一种全局重要性分数 SP-LAMP(Structured Pruning Layer-Adaptive Magnitude-based Pruning,层自适应幅值结构化剪枝)。在 SP-LAMP 中,每一层包含一个 SP-LAMP 分数为 1 的滤波器,其余滤波器被分组处理。我们利用分组背包求解器在延迟约束下最大化 SP-LAMP 分数。此外,我们改进了延迟采集策略,使其更加准确。特别地,对于 ImageNet 和 CIFAR10 上的 ResNet50/ResNet18,SP-LAMP 分别实现了 1.28 倍/8.45 倍的加速,同时 top-1 准确率分别变化 +1.7%/-1.57%。在 CIFAR10 上的 ResNet56 实验结果表明,与替代方法相比,我们的算法在保证准确率和 FLOPs 的同时实现了更低的延迟。

英文摘要:

Structured pruning can simplify network architecture and improve inference speed. Combined with the underlying hardware and inference engine in which the final model is deployed, better results can be obtained by using latency collaborative loss function to guide network pruning together. Existing pruning methods that optimize latency have demonstrated leading performance, however, they often overlook the hardware features and connection in the network. To address this problem, we propose a global importance score SP-LAMP(Structured Pruning Layer-Adaptive Magnitude-based Pruning) by deriving a global importance score LAMP from unstructured pruning to structured pruning. In SP-LAMP, each layer includes a filter with an SP-LAMP score of 1, and the remaining filters are grouped. We utilize a group knapsack solver to maximize the SP-LAMP score under latency constraints. In addition, we improve the strategy of collect the latency to make it more accurate. In particular, for ResNet50/ResNet18 on ImageNet and CIFAR10, SP-LAMP is 1.28x/8.45x faster with +1.7%/-1.57% top-1 accuracy changed, respectively. Experimental results in ResNet56 on CIFAR10 demonstrate that our algorithm achieves lower latency compared to alternative approaches while ensuring accuracy and FLOPs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑