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.
翻译:[translated abstract in Chinese]
结构化剪枝通过移除神经网络中结构分组的参数实现模型加速。然而,不同模型的参数分组模式差异显著,依赖人工设计分组方案的架构特定剪枝器难以推广至新架构。本文研究一项极具挑战性且鲜有探索的任务——任意结构化剪枝,旨在应对任意架构(如CNN、RNN、GNN和Transformer)的通用结构化剪枝。实现该目标的主要障碍在于结构耦合问题:该问题不仅要求不同层必须同时剪枝,还需确保所有被移除参数具有一致性不重要性,从而避免剪枝后产生结构缺陷及显著性能下降。为解决此问题,我们提出一种通用且全自动的方法——依赖图(DepGraph),通过显式建模层间依赖关系,对耦合参数进行综合分组以实施剪枝。本文在多种架构与任务上进行了广泛评估,包括图像领域的ResNe(X)t、DenseNet、MobileNet与Vision Transformer,图数据领域的GAT,三维点云领域的DGCNN,以及语言建模领域的LSTM。实验表明,即使采用简单的范数基准则,所提方法仍能持续取得令人满意的性能。