Skip to main content
QUICK REVIEW

[论文解读] DepGraph: Towards Any Structural Pruning

Gongfan Fang, Xinyin Ma|arXiv (Cornell University)|Jan 30, 2023
Advanced Neural Network Applications被引用 6
一句话总结

该论文提出DepGraph,一种通用且完全自动化的结构化剪枝方法,适用于多种神经网络架构(包括CNN、Transformer、RNN和GNN),通过依赖图建模层间依赖关系,实现对耦合层的同步、一致剪枝。在图结构分组中采用简单的基于范数的准则,无需针对架构进行专门设计,即可在多个基准测试中达到最先进或具有竞争力的性能。

ABSTRACT

Structural pruning enables model acceleration by removing structurally-grouped parameters from neural networks. However, the parameter-grouping patterns vary widely across different models, making architecture-specific pruners, which rely on manually-designed grouping schemes, non-generalizable to new architectures. In this work, we study a highly-challenging yet barely-explored task, any structural pruning, to tackle general structural pruning of arbitrary architecture like CNNs, RNNs, GNNs and Transformers. The most prominent obstacle towards this goal lies in the structural coupling, which not only forces different layers to be pruned simultaneously, but also expects all removed parameters to be consistently unimportant, thereby avoiding structural issues and significant performance degradation after pruning. To address this problem, we propose a general and {fully automatic} method, \emph{Dependency Graph} (DepGraph), to explicitly model the dependency between layers and comprehensively group coupled parameters for pruning. In this work, we extensively evaluate our method on several architectures and tasks, including ResNe(X)t, DenseNet, MobileNet and Vision transformer for images, GAT for graph, DGCNN for 3D point cloud, alongside LSTM for language, and demonstrate that, even with a simple norm-based criterion, the proposed method consistently yields gratifying performances.

研究动机与目标

  • 为解决在CNN、Transformer、RNN和GNN等多样化神经网络架构中实现结构化剪枝的泛化挑战。
  • 克服现有基于架构特异性的手动剪枝方案缺乏可迁移性的局限。
  • 利用统一框架建模层间结构耦合关系(即由于架构约束,剪枝某一层需同时剪枝其他层)。
  • 设计一种分组级重要性准则,确保耦合层间重要性的一致性,最大限度减少性能下降。
  • 实现完全自动化、与架构无关的结构化剪枝,无需任务特定或网络特定的调优。

提出的方法

  • 构建依赖图(DepGraph),显式建模神经网络中所有层之间的层间依赖关系,捕捉如跳跃连接和批归一化等结构耦合。
  • 通过图遍历识别依赖图中的最大连通分量,从而确定必须一起剪枝的层组。
  • 从依赖图中推导分组矩阵,将每层映射到其对应的耦合组,确保剪枝过程中的结构一致性。
  • 设计一种分组级重要性准则,评估每组内参数的综合重要性,实现耦合层间的一致稀疏化。
  • 对每组应用简单的基于范数的重要性评分,避免依赖复杂训练过程或架构特异性指标。
  • 通过同时移除整个参数组的方式执行结构化剪枝,保持网络完整性并支持高效推理。

实验结果

研究问题

  • RQ1能否开发一种通用方法,在无需架构先验知识的前提下,实现对多样化神经网络架构的结构化剪枝?
  • RQ2如何系统性地建模复杂架构(如残差块、注意力机制)中的层间依赖关系,以实现安全、同步的剪枝?
  • RQ3分组级重要性准则是否能在结构化剪枝过程中优于逐层准则,更好地保持模型精度?
  • RQ4当与依赖建模结合时,简单的基于范数准则在多大程度上可实现与使用复杂准则的最先进方法相当的性能?
  • RQ5所提出方法是否可泛化至非CNN架构,如Transformer、RNN、GNN,以及3D点云和图模型?

主要发现

  • 在CIFAR-10上,DepGraph在ResNet-56上实现2.57倍加速,准确率达到93.64%,优于未剪枝模型的93.53%。
  • 在ImageNet-1k上,DepGraph在ResNeXt-50上实现71.87%的top-1准确率,仅下降1.14%,并实现2.09倍加速,优于先前方法的准确率保持能力。
  • 对于视觉Transformer(ViT-B/16),DepGraph+EMA在仅下降1.39%准确率的情况下,保持81.07%的top-1准确率,并实现10.4倍加速。
  • 在非图像任务中,DepGraph在DGCNN上实现11.98倍加速,准确率仅下降0.08%,展现出强大的泛化能力。
  • 在图学习任务(PPI)中,DepGraph实现8.43倍加速,微F1分数仅下降0.025,证明其在GNN上的有效性。
  • 该方法在不同架构间具有良好的泛化能力:在LSTM(AGNews)、DGCNN(ModelNet40)和GAT(PPI)上均取得具有竞争力的结果,即使仅使用基础的基于范数准则。

更好的研究,从现在开始

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

无需绑定信用卡

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