arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.06218cs.LGcs.AI
收藏

SUBP:面向1xN稀疏CNN多线程加速的软均匀块剪枝

SUBP: Soft Uniform Block Pruning for 1xN Sparse CNNs Multithreading Acceleration

Zhejiang University(浙江大学);State Grid Corporation of China(国家电网有限公司)

Jingyang Xiang, Siqi Li, Jun Chen, Shipeng Bai, Yukai Ma, Guang Dai, Yong Liu

AI总结:

本文提出软均匀块剪枝(SUBP)方法,从头训练均匀1×N稀疏CNN,通过块重生长实现均衡负载,在ImageNet上优于现有稀疏方法。

摘要:

卷积神经网络(CNNs)中的稀疏性研究已广泛用于在资源受限环境中压缩和加速模型。通过约束输出通道上N个连续权重为组内非零,具有1×N稀疏性的最新网络因其三个突出优点而广受欢迎:1)通过块稀疏行矩阵节省大量存储空间;2)在高稀疏度下具有优异的性能;3)在具有高级向量扩展(AVX)的CPU上实现显著加速。现有工作需要基于密集预训练权重选择和微调1×N稀疏权重,导致训练成本和内存访问开销高、模型质量次优,以及线程间工作负载不均衡(不同输出通道的稀疏度不同)等问题。为克服这些问题,本文提出了一种新颖的软均匀块剪枝(SUBP)方法,从头开始训练均匀的1×N稀疏结构化网络。具体而言,我们的方法在训练过程中基于块角度冗余和重要性采样,以均匀方式反复允许被剪枝的块重新生长到网络中。这不仅使模型对预训练的依赖减少,降低了模型冗余和永久剪枝重要块的风险,还实现了均衡的工作负载。在ImageNet上,跨多种CNN架构的综合实验表明,我们的SUBP始终优于基于预训练模型或从头训练的现有1×N和结构化稀疏方法。源代码和模型可在https://github.com/JingyangXiang/SUBP获取。

英文摘要:

The study of sparsity in Convolutional Neural Networks (CNNs) has become widespread to compress and accelerate models in environments with limited resources. By constraining N consecutive weights along the output channel to be group-wise non-zero, the recent network with 1$\times$N sparsity has received tremendous popularity for its three outstanding advantages: 1) A large amount of storage space saving by a \emph{Block Sparse Row} matrix. 2) Excellent performance at a high sparsity. 3) Significant speedups on CPUs with Advanced Vector Extensions. Recent work requires selecting and fine-tuning 1$\times$N sparse weights based on dense pre-trained weights, leading to the problems such as expensive training cost and memory access, sub-optimal model quality, as well as unbalanced workload across threads (different sparsity across output channels). To overcome them, this paper proposes a novel \emph{\textbf{S}oft \textbf{U}niform \textbf{B}lock \textbf{P}runing} (SUBP) approach to train a uniform 1$\times$N sparse structured network from scratch. Specifically, our approach tends to repeatedly allow pruned blocks to regrow to the network based on block angular redundancy and importance sampling in a uniform manner throughout the training process. It not only makes the model less dependent on pre-training, reduces the model redundancy and the risk of pruning the important blocks permanently but also achieves balanced workload. Empirically, on ImageNet, comprehensive experiments across various CNN architectures show that our SUBP consistently outperforms existing 1$\times$N and structured sparsity methods based on pre-trained models or training from scratch. Source codes and models are available at \url{https://github.com/JingyangXiang/SUBP}.

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

↑