Skip to main content
QUICK REVIEW

[论文解读] Hessian-Aware Pruning and Optimal Neural Implant

Shixing Yu, Zhewei Yao|arXiv (Cornell University)|Jan 22, 2021
Advanced Neural Network Applications参考文献 72被引用 5
一句话总结

本文提出Hessian感知剪枝(Hessian-Aware Pruning, HAP),一种基于二阶结构化剪枝方法,利用Hessian迹识别并剪除神经网络中不敏感的组件,同时用低秩神经植入物替换中等敏感的组件以保持精度。HAP在多项任务上达到最先进性能,包括在PreResNet29(CIFAR-10)上实现70%参数剪枝时精度损失低于0.1%,在ResNet50(ImageNet)上实现50%参数减少时精度比HRank高出最多2%。

ABSTRACT

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.

研究动机与目标

  • 解决在中等至高剪枝率下结构化剪枝常见的显著精度下降问题。
  • 开发一种快速、可扩展的二阶敏感性度量方法,用于识别可剪枝的不敏感神经组件。
  • 提出一种神经植入物机制,将中等敏感组件替换为植入物而非完全剪除。
  • 通过减少参数量和FLOPs提升模型效率,同时在视觉和自然语言处理任务中保持高精度。
  • 通过广泛的实证评估,证明HAP优于现有的基于权重大小和梯度的剪枝方法。

提出的方法

  • 使用Hessian迹作为二阶敏感性度量,根据其对损失曲面平坦度的影响对神经网络通道进行排序和优先剪枝。
  • 通过移除Hessian迹敏感度最低的完整通道实施结构化剪枝,实现高效的组级剪枝,而非逐参数分析。
  • 对于中等敏感组件,用计算成本更低、参数更少的低秩神经植入物替代原层。
  • 通过微调剪枝后带植入物的模型来恢复并提升精度,利用Hessian迹指导植入物的应用位置。
  • 结合Hessian敏感性分析与低秩近似,仅对敏感层选择性地应用植入物,从而提升效率与性能。
  • 通过匹配HAP与基于大小的基线方法的FLOPs,确保公平比较,实现对参数效率的直接性能评估。

实验结果

研究问题

  • RQ1通过Hessian迹测量的二阶敏感性是否优于基于权重大小的度量方法在结构化神经网络剪枝中的表现?
  • RQ2用低秩神经植入物替换中等敏感组件是否能缓解高剪枝率下的精度下降?
  • RQ3HAP在精度、参数量和FLOPs方面与SOTA剪枝方法(如EigenDamage和HRank)相比如何?
  • RQ4与对整个模型应用朴素低秩近似的做法相比,Hessian感知的植入物部署在多大程度上提升了性能?
  • RQ5HAP是否能在包括视觉模型(如ResNet)和NLP模型(如RoBERTa)在内的多种架构上保持高精度?

主要发现

  • 在PreResNet29(CIFAR-10)上,HAP在仅保留原始参数31%的情况下达到94.3%的精度,精度损失低于0.1%。
  • 在ResNet50(ImageNet)上,HAP在剪除近50%参数后仍达到75.1%的top-1精度,精度损失仅为0.5%。
  • 与先前SOTA方法HRank相比,HAP在ResNet50上实现最高达2%的精度提升,同时参数量和FLOPs更少。
  • 在MRPC和QNLI数据集上对RoBERTa进行头剪枝时,HAP在60%头剪枝率下相比梯度基线精度最高提升0.89%。
  • 与基于大小的剪枝相比,HAP在相同FLOP水平下实现相近精度(92.06%),但仅使用21.01%的参数,而基于大小的方法需38.25%的参数。
  • 消融实验表明,基于Hessian的敏感性排序显著优于随机或反向排序,HAP在保留35.5%参数时精度比R-HAP高出超过3%。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。