Skip to main content
QUICK REVIEW

[论文解读] Pruning and Slicing Neural Networks using Formal Verification

Ori Lahav, Guy Katz|arXiv (Cornell University)|May 28, 2021
Adversarial Robustness in Machine Learning参考文献 40被引用 4
一句话总结

该论文提出了一种基于形式化验证的剪枝与切片框架,用于压缩深度神经网络(DNN),在保持输出等价性或有界误差的前提下减小模型规模。通过利用基于SMT的形式化验证技术,该方法识别出冗余神经元,包括相位冗余、k-前向冗余和结果保持型冗余,并应用网络切片技术对输入空间进行划分,从而实现高达71%的DNN规模缩减,且具备正确的形式化保证。

ABSTRACT

Deep neural networks (DNNs) play an increasingly important role in various computer systems. In order to create these networks, engineers typically specify a desired topology, and then use an automated training algorithm to select the network's weights. While training algorithms have been studied extensively and are well understood, the selection of topology remains a form of art, and can often result in networks that are unnecessarily large - and consequently are incompatible with end devices that have limited memory, battery or computational power. Here, we propose to address this challenge by harnessing recent advances in DNN verification. We present a framework and a methodology for discovering redundancies in DNNs - i.e., for finding neurons that are not needed, and can be removed in order to reduce the size of the DNN. By using sound verification techniques, we can formally guarantee that our simplified network is equivalent to the original, either completely, or up to a prescribed tolerance. Further, we show how to combine our technique with slicing, which results in a family of very small DNNs, which are together equivalent to the original. Our approach can produce DNNs that are significantly smaller than the original, rendering them suitable for deployment on additional kinds of systems, and even more amenable to subsequent formal verification. We provide a proof-of-concept implementation of our approach, and use it to evaluate our techniques on several real-world DNNs.

研究动机与目标

  • 解决由于启发式架构选择导致DNN模型过大,从而限制其在资源受限设备上部署的问题。
  • 通过使用验证技术而非依赖启发式剪枝方法,为移除神经元提供形式化保证。
  • 将冗余检测从‘死亡’神经元扩展至相位冗余、k-前向冗余和结果保持型冗余神经元。
  • 将剪枝与输入域切片相结合,实现子网络专业化,以加快推理速度。
  • 实现可扩展、可验证的DNN压缩,同时在预设容差范围内保持模型准确性。

提出的方法

  • 利用Marabou这一基于SMT的DNN验证器进行形式化验证,以检查移除特定神经元后,网络输出是否在容差范围内保持不变。
  • 定义并检测四种类型的冗余:死亡神经元、相位冗余神经元、k-前向冗余神经元以及结果保持型冗余神经元。
  • 通过将输入空间划分为子域的方式实施输入域切片,从而独立简化每个子网络。
  • 在形式化验证前,使用仿真对候选神经元进行过滤,以减少验证查询次数。
  • 将剪枝与切片结合,生成一系列小型、专用的DNN,每个子网络均适用于特定的输入子域。
  • 通过每个子域的单次最终验证查询,验证神经元移除的正确性,以确保结果保持行为。

实验结果

研究问题

  • RQ1能否利用形式化验证识别并移除不仅在输出上冗余,而且在影响网络行为方面也冗余的神经元?
  • RQ2能否将冗余检测从‘死亡’神经元扩展到移除后仅引起有界输出偏差的神经元?
  • RQ3输入域切片是否能揭示在完整网络中不明显的额外冗余?
  • RQ4剪枝与切片的结合是否能显著减小DNN规模,同时保持输出保真度的形式化保证?
  • RQ5输入子域复杂度在多大程度上影响可实现的剪枝程度?

主要发现

  • 所提方法在机载防撞网络上实现了高达71%的整体DNN规模缩减,同时在预设容差范围内保持输出等价性。
  • 在75%的输入子域中,该方法成功识别并移除了额外12.3%的前向冗余与结果保持型神经元。
  • 在某些子域中,简化流程将网络简化为线性变换,表明由于切片导致的完全线性化。
  • 在方法失败的子域中,候选可移除神经元数量与成功案例相近,表明候选神经元质量具有一致性。
  • 该方法在不依赖特定激活函数的前提下实现了显著压缩,与以往仅限于ReLU网络的研究不同。
  • 该框架与底层验证引擎无关,可与任何DNN验证工具(包括基于SMT、线性规划或抽象解释的工具)集成。

更好的研究,从现在开始

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

无需绑定信用卡

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