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

Hessian-Aware剪枝和最优神经植入

Hessian-Aware Pruning and Optimal Neural Implant

Peking University(北京大学);University of California, Berkeley(加州大学伯克利分校)

Shixing Yu, Zhewei Yao, Amir Gholami, Zhen Dong, Sehoon Kim, Michael W Mahoney, Kurt Keutzer

摘要:

剪枝是减少神经网络模型内存占用和FLOP的有效方法。然而,现有的结构化修剪方法往往会导致显着的准确性下降,适度的修剪水平。为了解决这个问题,我们引入了一种新的Hessian感知修剪(HAP)方法,结合神经植入方法,使用二阶灵敏度作为结构化修剪的度量。基本思想是修剪不敏感的组件,并对中度敏感的组件使用神经植入,而不是完全修剪它们。对于后一种方法,中等灵敏度的组件被替换为低秩植入物,该植入物比原始组件更小且计算成本更低。我们使用相对Hessian迹来测量灵敏度,而不是文献中常用的基于幅度的灵敏度度量。我们测试HAP的计算机视觉任务和自然语言任务,我们取得了新的国家的最先进的结果。具体而言,HAP在PreResNet 29/ResNet 50(CIFAR-10/ImageNet)上实现了小于$0.1\%$ / $0.5\%$的退化,其中超过70\%/50\%的参数被修剪。同时,HAP算法在基于变换的模型上的头修剪性能也明显优于基于梯度的头修剪算法(当参数修剪率达到60%时,头修剪率可达0.8%)。该框架已开放源代码,可在线查阅。

英文摘要:

Pruning is an effective method to reduce the memory footprint and FLOPs associated with neural network models. However, existing structured-pruning methods often result in significant accuracy degradation for moderate pruning levels. To address this problem, we introduce a new Hessian Aware Pruning (HAP) method coupled with a Neural Implant approach that uses second-order sensitivity as a metric for structured pruning. The basic idea is to prune insensitive components and to use a Neural Implant for moderately sensitive components, instead of completely pruning them. For the latter approach, the moderately sensitive components are replaced with with a low rank implant that is smaller and less computationally expensive than the original component. We use the relative Hessian trace to measure sensitivity, as opposed to the magnitude based sensitivity metric commonly used in the literature. We test HAP for both computer vision tasks and natural language tasks, and we achieve new state-of-the-art results. Specifically, HAP achieves less than $0.1\%$/$0.5\%$ degradation on PreResNet29/ResNet50 (CIFAR-10/ImageNet) with more than 70\%/50\% of parameters pruned. Meanwhile, HAP also achieves significantly better performance (up to 0.8\% with 60\% of parameters pruned) as compared to gradient based method for head pruning on transformer-based models. The framework has been open sourced and available online.

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

↑