QEBVerif: Quantization Error Bound Verification of Neural Networks

Yedi Zhang, Fu Song, Jun Sun
12/6/2022
cs.LGcs.AI

Official code: S3L-official/QEBVerif (5 stars, Python, last commit 2023-12-25).

Abstract

To alleviate the practical constraints for deploying deep neural networks (DNNs) on edge devices, quantization is widely regarded as one promising technique. It reduces the resource requirements for computational power and storage space by quantizing the weights and/or activation tensors of a DNN into lower bit-width fixed-point numbers, resulting in quantized neural networks (QNNs).

Show full abstract

While it has been empirically shown to introduce minor accuracy loss, critical verified properties of a DNN might become invalid once quantized. Existing verification methods focus on either individual neural networks (DNNs or QNNs) or quantization error bound for partial quantization. In this work, we propose a quantization error bound verification method, named QEBVerif, where both weights and activation tensors are quantized. QEBVerif consists of two parts, i.e., a differential reachability analysis (DRA) and a mixed-integer linear programming (MILP) based verification method. DRA performs difference analysis between the DNN and its quantized counterpart layer-by-layer to compute a tight quantization error interval efficiently. If DRA fails to prove the error bound, then we encode the verification problem into an equivalent MILP problem which can be solved by off-the-shelf solvers. Thus, QEBVerif is sound, complete, and reasonably efficient. We implement QEBVerif and conduct extensive experiments, showing its effectiveness and efficiency.

View on arXivView PDF

Code Implementations(1)

Source code for paper "QEBVerif: Quantization Error Bound Verification of Neural Networks" (CAV 2023)

51Python, ShellMay 22, 20232 years ago

Similar Papers

Cite this paper

@article{zhang2022qebverif,
  title  = {QEBVerif: Quantization Error Bound Verification of Neural Networks},
  author = {Yedi Zhang and Fu Song and Jun Sun},
  year   = {2022},
  eprint = {2212.02781},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.02781}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.02781.svg)](https://codeofpaper.com/paper/2212.02781)

Discussion