Skip to main content
QUICK REVIEW

[论文解读] Connectivity Matters: Neural Network Pruning Through the Lens of Effective Sparsity

Artem Vysogorets, Julia Kempe|arXiv (Cornell University)|Jul 5, 2021
Model Reduction and Neural Networks被引用 9
一句话总结

本文通过考虑因输入/输出流断开而被禁用的连接(而不仅仅是显式剪枝的连接),提出了有效稀疏度(effective sparsity)作为神经网络剪枝更准确的度量方式。实验表明,许多剪枝算法在直接稀疏度下表现更优,但在有效稀疏度下优势消失,尤其在高稀疏压缩场景下。本文还提出一种低成本方法以实现有效稀疏度,重新验证了通过合理分层分配策略的随机剪枝可优于复杂方法。

ABSTRACT

Neural network pruning is a fruitful area of research with surging interest in high sparsity regimes. Benchmarking in this domain heavily relies on faithful representation of the sparsity of subnetworks, which has been traditionally computed as the fraction of removed connections (direct sparsity). This definition, however, fails to recognize unpruned parameters that detached from input or output layers of underlying subnetworks, potentially underestimating actual effective sparsity: the fraction of inactivated connections. While this effect might be negligible for moderately pruned networks (up to 10-100 compression rates), we find that it plays an increasing role for thinner subnetworks, greatly distorting comparison between different pruning algorithms. For example, we show that effective compression of a randomly pruned LeNet-300-100 can be orders of magnitude larger than its direct counterpart, while no discrepancy is ever observed when using SynFlow for pruning [Tanaka et al., 2020]. In this work, we adopt the lens of effective sparsity to reevaluate several recent pruning algorithms on common benchmark architectures (e.g., LeNet-300-100, VGG-19, ResNet-18) and discover that their absolute and relative performance changes dramatically in this new and more appropriate framework. To aim for effective, rather than direct, sparsity, we develop a low-cost extension to most pruning algorithms. Further, equipped with effective sparsity as a reference frame, we partially reconfirm that random pruning with appropriate sparsity allocation across layers performs as well or better than more sophisticated algorithms for pruning at initialization [Su et al., 2020]. In response to this observation, using a simple analogy of pressure distribution in coupled cylinders from physics, we design novel layerwise sparsity quotas that outperform all existing baselines in the context of random pruning.

研究动机与目标

  • 解决标准剪枝基准中使用直接稀疏度的缺陷,该方法忽略了因结构断连而被禁用的连接。
  • 证明在高稀疏压缩场景下,直接稀疏度会显著低估实际稀疏度,从而扭曲不同剪枝算法之间的比较。
  • 提出一种对现有剪枝算法的低成本扩展,使其能够针对有效稀疏度而非直接稀疏度进行优化。
  • 在有效稀疏度的框架下重新评估近期剪枝算法,揭示性能排名在此新度量下发生显著变化。
  • 证明在有效稀疏度框架下,通过优化分层稀疏度配额的随机剪枝可优于更复杂的算法。

提出的方法

  • 将有效稀疏度定义为被禁用连接的比例——即对任意输入均不影响网络输出的连接,无论其是显式剪枝还是因结构断连而失效。
  • 为大多数剪枝方法提出一种简单、低成本的算法扩展,确保仅在不影响网络计算流的前提下移除剪枝连接。
  • 利用计算图分析识别并统计剪枝后被禁用的边,将其与显式移除的边区分开。
  • 借鉴耦合气缸中压力分布的热力学类比,设计新型分层稀疏度配额,以提升随机剪枝的性能。
  • 在标准基准上实现并评估多种剪枝算法(如 SynFlow、SNIP、GraSP、随机剪枝),同时使用直接稀疏度和有效稀疏度两种度量。
  • 在不同架构(LeNet、VGG、ResNet)和数据集(MNIST、CIFAR、TinyImageNet、ImageNet)上采用一致的实验设置,确保公平比较。

实验结果

研究问题

  • RQ1在高稀疏压缩场景下,直接稀疏度与有效稀疏度之间的差异如何影响神经网络剪枝算法的基准测试?
  • RQ2在直接稀疏度下表现良好的剪枝算法,在有效稀疏度下是否仍保持其优势?
  • RQ3当以有效稀疏度作为评估指标时,通过优化分层稀疏度配额的随机剪枝是否能优于更复杂的剪枝算法?
  • RQ4结构断连(即被禁用的神经元)对剪枝子网络的实际压缩效率有何影响?
  • RQ5如何对现有剪枝算法进行最小计算开销的修改,使其能够针对有效稀疏度而非直接稀疏度进行优化?

主要发现

  • 在随机剪枝网络中,有效稀疏度在极端压缩水平下可比直接稀疏度高出数个数量级,揭示了标准基准中的重大缺陷。
  • 在直接稀疏度下表现最佳的 SynFlow 算法,在有效稀疏度下优势消失,表明其性能在以往评估中被高估。
  • 对于 LeNet-300-100,有效压缩率可比直接压缩率高出最多 10 倍,而 SynFlow 未表现出此类差异。
  • 不同算法中直接稀疏度与有效稀疏度的差距显著不同,其中随机剪枝的差距最大,导致性能比较失真。
  • 基于热力学类比推导出的分层稀疏度配额在有效稀疏度评估下,优于所有现有基线,在随机剪枝场景中表现最优。
  • 在高稀疏压缩场景下,有效稀疏度揭示出:通过合理分层分配策略的随机剪枝,其性能与复杂的数据依赖型方法相当或更优,挑战了以往对算法优越性的假设。

更好的研究,从现在开始

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

无需绑定信用卡

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