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

仅训练一次:一种一次性神经网络训练和修剪框架

Only Train Once: A One-Shot Neural Network Training And Pruning Framework

Tianyi Chen, Bo Ji, Tianyu Ding, Biyi Fang, Guanyi Wang, Zhihui Zhu, Luming Liang, Yixin Shi, Sheng Yi, Xiao Tu

摘要:

结构化修剪是将深度神经网络(DNN)部署到资源受限设备上的常用技术。然而,现有的剪枝方法通常是启发式的,任务指定的,并需要一个额外的微调过程。为了克服这些限制,我们提出了一个框架,将DNN压缩到更苗条的架构中,具有竞争力的性能和显着的FLOPs减少仅训练一次(OTO)。OTO包含两个键:(i)我们将DNN的参数划分为零不变组,使我们能够在不影响输出的情况下修剪零组;(ii)为了促进零组,我们然后制定了一个结构化稀疏优化问题,并提出了一种新的优化算法,半空间随机投影梯度(HSPG)来解决它,它在组稀疏性探索方面优于标准的近似方法,并保持相当的收敛性。为了证明OTO的有效性,我们从头开始同时训练和压缩完整的模型,而无需微调推理加速和参数减少,并在VGG 16上为CIFAR 10,ResNet 50为CIFAR 10和BERT为SQuAD取得了最先进的结果,并在ResNet 50上为ImageNet取得了竞争性结果。源代码可在https://github.com/tianyic/only_train_once上获得。

英文摘要:

Structured pruning is a commonly used technique in deploying deep neural networks (DNNs) onto resource-constrained devices. However, the existing pruning methods are usually heuristic, task-specified, and require an extra fine-tuning procedure. To overcome these limitations, we propose a framework that compresses DNNs into slimmer architectures with competitive performances and significant FLOPs reductions by Only-Train-Once (OTO). OTO contains two keys: (i) we partition the parameters of DNNs into zero-invariant groups, enabling us to prune zero groups without affecting the output; and (ii) to promote zero groups, we then formulate a structured-sparsity optimization problem and propose a novel optimization algorithm, Half-Space Stochastic Projected Gradient (HSPG), to solve it, which outperforms the standard proximal methods on group sparsity exploration and maintains comparable convergence. To demonstrate the effectiveness of OTO, we train and compress full models simultaneously from scratch without fine-tuning for inference speedup and parameter reduction, and achieve state-of-the-art results on VGG16 for CIFAR10, ResNet50 for CIFAR10 and Bert for SQuAD and competitive result on ResNet50 for ImageNet. The source code is available at https://github.com/tianyic/only_train_once.

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

↑