Skip to main content
QUICK REVIEW

[论文解读] Scalable Verification of Quantized Neural Networks (Technical Report)

Thomas A. Henzinger, Mathias Lechner|arXiv (Cornell University)|Dec 15, 2020
Adversarial Robustness in Machine Learning参考文献 27被引用 4
一句话总结

本文提出了一种可扩展的基于SMT的量化神经网络验证框架,该框架考虑了标准验证方法中被忽略的位级舍入误差。通过引入变量预计算、最小位宽编码和冗余消除技术,该方法在对抗鲁棒性基准测试中相比现有工具实现了高达1,000倍的加速,证明了尽管存在PSPACE难的复杂性,位精确验证仍是可行的。

ABSTRACT

Formal verification of neural networks is an active topic of research, and recent advances have significantly increased the size of the networks that verification tools can handle. However, most methods are designed for verification of an idealized model of the actual network which works over real arithmetic and ignores rounding imprecisions. This idealization is in stark contrast to network quantization, which is a technique that trades numerical precision for computational efficiency and is, therefore, often applied in practice. Neglecting rounding errors of such low-bit quantized neural networks has been shown to lead to wrong conclusions about the network's correctness. Thus, the desired approach for verifying quantized neural networks would be one that takes these rounding errors into account. In this paper, we show that verifying the bit-exact implementation of quantized neural networks with bit-vector specifications is PSPACE-hard, even though verifying idealized real-valued networks and satisfiability of bit-vector specifications alone are each in NP. Furthermore, we explore several practical heuristics toward closing the complexity gap between idealized and bit-exact verification. In particular, we propose three techniques for making SMT-based verification of quantized neural networks more scalable. Our experiments demonstrate that our proposed methods allow a speedup of up to three orders of magnitude over existing approaches.

研究动机与目标

  • 为解决实际中广泛应用但常因舍入误差被忽略的量化神经网络形式化验证中的空白。
  • 证明即使在逻辑可满足性属于NP的情况下,使用位向量规格说明的量化神经网络验证问题仍是PSPACE难的。
  • 弥合理想化(实值)与位精确(量化)神经网络验证之间的可扩展性差距。
  • 开发实用的SMT编码技术,以减小编码规模并提升量化网络的求解器性能。
  • 在标准对抗鲁棒性基准测试中展示显著的性能提升。

提出的方法

  • 提出一种技术,预先计算与输入无关的某些变量和约束,从而减小SMT编码规模。
  • 提出变量的最小位宽编码,与之前的工作相比显著缩小了位向量表示。
  • 开发一种冗余消除启发式方法,利用网络语义中的位级冗余来简化编码。
  • 应用抽象解释分析量化网络的可达值范围,以指导更高效的编码。
  • 将这些技术集成到使用位向量逻辑的基于SMT的验证流水线中。
  • 采用组合式SMT求解器(Boolector),并在多个基准测试中评估性能。

实验结果

研究问题

  • RQ1使用位向量规格说明的量化神经网络验证问题是否比理想化的实值网络更加复杂?
  • RQ2尽管存在PSPACE难的复杂性,能否使基于SMT的量化网络验证实现可扩展?
  • RQ3哪些特定的编码优化在基于SMT的量化网络验证中带来最大的性能提升?
  • RQ4忽略位级舍入误差会对验证结果的正确性产生何种影响?
  • RQ5各项优化技术对整体性能提升的贡献程度如何?

主要发现

  • 证明了使用位向量规格说明的量化神经网络验证问题是PSPACE难的,即使其底层逻辑可满足性属于NP。
  • 所提方法在对抗鲁棒性验证基准测试中相比现有工具实现了超过三个数量级的加速(最高达1,000倍)。
  • 在MNIST数据集上,该方法在7.9小时累计运行时间内解决了318个实例(占391个实例的81.3%),优于所有消融变体。
  • ReLU简化技术对性能提升贡献最大,而位宽最小化和冗余消除由于求解器启发式策略的影响,贡献有限。
  • 消融研究显示,禁用任意一项主要技术都会导致解决的实例数量减少,证实了各项技术的独立贡献。
  • 结果表明,通过针对性的编码优化,位精确验证是可行且实用的。

更好的研究,从现在开始

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

无需绑定信用卡

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