Abstract
Deep neural networks often lack the safety and robustness guarantees needed to be deployed in safety critical systems. Formal verification techniques can be used to prove input-output safety properties of networks, but when properties are difficult to specify, we rely on the solution to various optimization problems. In this work, we present an algorithm called ZoPE that solves optimization problems over the output of feedforward ReLU networks with low-dimensional inputs. The algorithm eagerly splits the input space, bounding the objective using zonotope propagation at each step, and improves computational efficiency compared to existing mixed-integer programming approaches. We demonstrate how to formulate and solve three types of optimization problems: (i) minimization of any convex function over the output space, (ii) minimization of a convex function over the output of two networks in series with an adversarial perturbation in the layer between them, and (iii) maximization of the difference in output between two networks. Using ZoPE, we observe a \(25\times \) speedup on property 1 of the ACAS Xu neural network verification benchmark compared to several state-of-the-art verifiers, and an \(85\times \) speedup on a set of linear optimization problems compared to a mixed-integer programming baseline. We demonstrate the versatility of the optimizer in analyzing networks by projecting onto the range of a generative adversarial network and visualizing the differences between a compressed and uncompressed network.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Source is at https://github.com/sisl/NeuralPriorityOptimizer.jl.
- 2.
Source is at https://github.com/JuliaReach/LazySets.jl.
- 3.
Available at https://www.gurobi.com and https://www.mosek.com.
- 4.
- 5.
- 6.
- 7.
- 8.
References
Bojarski, M., et al.: End to end learning for self-driving cars, Technical Report (2016). http://arxiv.org/abs/1604.07316
Julian, K.D., Kochenderfer, M.J., Owen, M.P.: Deep neural network compression for aircraft collision avoidance systems. AIAA J. Guid. Control Dyn. 42(3), 598–608 (2019)
Liu, C., Arnon, T., Lazarus, C., Strong, C., Barrett, C., Kochenderfer, M.J.: Algorithms for verifying deep neural networks. Found. Trends® Optim. 4(3–4), 244–404 (2021)
Katz, S.M., Corso, A.L., Strong, C.A., Kochenderfer, M.J.: Verification of image-based neural network controllers using generative models. In: Digital Avionics Systems Conference (DASC) (2021)
Julian, K.D., Lee, R., Kochenderfer, M.J.: Validation of image-based neural network controllers through adaptive stress testing (2020)
Katz, S.M., Julian, K.D., Strong, C.A., Kochenderfer, M.J.: Generating probabilistic safety guarantees for neural network controllers. Mach. Learn. , 1–29 (2021). https://doi.org/10.1007/s10994-021-06065-9
Kynkäänniemi, T., Karras, T., Laine, S., Lehtinen, J., Aila, T.: Improved precision and recall metric for assessing generative models. In: Advances in Neural Information Processing Systems (NeurIPS) (2019)
Mirman, M., Gehr, T., Vechev, M.: Robustness certification with generative models. In: ACM SIGPLAN International Conference on Programming Language Design and Implementation (2021)
Strong, C.A., et al.: Global optimization of objective functions represented by ReLU networks. Mach. Learn. 2010.03258 (2021). https://doi.org/10.1007/s10994-021-06050-2
Singh, G., Gehr, T., Püschel, M., Vechev, M.T.: Boosting robustness certification of neural networks. In: International Conference on Learning Representations (2019)
Bak, S., Tran, H.-D., Hobbs, K., Johnson, T.T.: Improved geometric path enumeration for verifying ReLU neural networks. In: Lahiri, S.K., Wang, C. (eds.) CAV 2020. LNCS, vol. 12224, pp. 66–96. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-53288-8_4
Katz, G., et al.: The Marabou framework for verification and analysis of deep neural networks. In: Dillig, I., Tasiran, S. (eds.) CAV 2019. LNCS, vol. 11561, pp. 443–452. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-25540-4_26
Bunel, R., Mudigonda, P., Turkaslan, I., Torr, P., Lu, J., Kohli, P.: Branch and bound for piecewise linear neural network verification. J. Mach. Learn. Res. 21(2020), 1–39 (2020)
Ehlers, R.: Formal verification of piece-wise linear feed-forward neural networks. In: D’Souza, D., Narayan Kumar, K. (eds.) ATVA 2017. LNCS, vol. 10482, pp. 269–286. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-68167-2_19
Katz, G., Barrett, C., Dill, D.L., Julian, K., Kochenderfer, M.J.: Reluplex: an efficient SMT solver for verifying deep neural networks. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10426, pp. 97–117. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63387-9_5
Wang, S., Pei, K., Whitehouse, J., Yang, J., Jana, S.: Formal security analysis of neural networks using symbolic intervals. In: USENIX Security Symposium 2018, pp. 1599–1614 (2018)
Wu, H., et al.: Parallelization techniques for verifying neural networks. CoRR, vol. abs/2004.08440 (2020). arXiv: 2004.08440
Tjeng, V., Xiao, K., Tedrake, R.: Evaluating robustness of neural networks with mixed integer programming. In: International Conference on Learning Representations (2017)
Singh, G., Gehr, T., Mirman, M., Püschel, M., Vechev, M.T.: Fast and effective robustness certification. In: Advances in Neural Information Processing Systems (NeurIPS) (2018)
Singh, G., Gehr, T., Püschel, M., Vechev, M.: An abstract domain for certifying neural networks. In: Proceedings of the ACM on Programming Languages, vol. 3, no. POPL, pp. 1–30 (2019)
Fujishige, S.: Submodular Functions and Optimization. Elsevier (2005)
Kitahara, T., Sukegawa, N.: A simple projection algorithm for linear programming problems. Algorithmica 81(1), 167–178 (2019)
Lawler, E.L., Wood, D.E.: Branch-and-bound methods: a survey. Oper. Res. 14(4), 699–719 (1966)
Kochenderfer, M.J., Wheeler, T.A.: Algorithms for Optimization. MIT Press, Cambridge (2019)
Althoff, M., Stursberg, O., Buss, M.: Reachability analysis of nonlinear systems with uncertain parameters using conservative linearization. In: IEEE Conference on Decision and Control (CDC), pp. 4042–4048 (2008)
Rubies-Royo, V., Calandra, R., Stipanovic, D.M., Tomlin, C.: Fast neural network verification via shadow prices. arXiv preprint arXiv:1902.07247 (2019)
Yuan, X., He, P., Zhu, Q., Li, X.: Adversarial examples: attacks and defenses for deep learning. IEEE Trans. Neural Netw. Learn. Syst. 30(9), 2805–2824 (2019)
Althoff, M., Frehse, G.: Combining zonotopes and support functions for efficient reachability analysis of linear systems. In: IEEE Conference on Decision and Control (CDC), pp. 7439–7446 (2016)
Althoff, M.: On computing the Minkowski difference of zonotopes. arXiv preprint arXiv:1512.02794 (2015)
Lomuscio, A., Maganti, L.: An approach to reachability analysis for feedforward ReLU neural networks. arXiv preprint arXiv:1706.07351 (2017)
Singh, G., Ganvir, R., Püschel, M., Vechev, M.: Beyond the single neuron convex barrier for neural network certification. In: Advances in Neural Information Processing Systems (NeurIPS), vol. 32, pp. 15 098–15 109 (2019)
Acknowledgments
We would like to acknowledge support from Eric Luxenberg, Haoze Wu, Gagandeep Singh, Chelsea Sidrane, Joe Vincent, Changliu Liu, Tomer Arnon, and Katherine Strong.
Funding in support of this work is from DARPA under contract FA8750-18-C-009, the NASA University Leadership Initiative (grant #80NSSC20M0163), and the National Science Foundation Graduate Research Fellowship under Grant No. DGE-1656518. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of DARPA, any NASA entity, or the National Science Foundation.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Appendix
A Appendix
1.1 A.1 Maximum Distance Between Points in Two Hyperrectangles
We would like to derive an analytical solution for the maximum distance given by a p-norm with \(p \ge 1\) between two hyperrectangles \(H_1\) and \(H_2\). We will let \(\mathbf {c}_1\) and \(\mathbf {c}_2\) be the centers of \(H_1\) and \(H_2\), and \(\mathbf {r}_1\) and \(\mathbf {r}_2\) be the radii of \(H_1\) and \(H_2\). The maximum distance can be found by solving the following optimization problem
The p-norm for finite p is defined as
We expand the objective of our maximization problem to be
and since \(x^\frac{1}{p}\) is monotonically increasing on the non-negative reals for \(p \ge 1\), we can remove the power of \(\frac{1}{p}\) giving us the equivalent problem
Now we see that the constraints \(\mathbf {h}_1 \in H_1\) and \(\mathbf {h}_2 \in H_2\) apply independent constraints to each dimension of \(\mathbf {h}_1\) and \(\mathbf {h}_2\). We also note that the objective can be decomposed coordinate-wise. As a result, in order to solve this optimization problem, we will need to solve n optimization problems of the form
Since \(x^p\) is monotonically increasing for \(p \ge 1\) we can equivalently maximize \(|(\mathbf {h}_1)_i - (\mathbf {h}_2)_i|\). We show an analytic form for the maximum by checking cases. If \((\mathbf {c}_2)_i\) is larger than \((\mathbf {c}_1)_i\), the maximum will be found by pushing \((\mathbf {h}_2)_i\) to its upper bound and \((\mathbf {h}_1)_i\) to its lower bound. Conversely, if \((\mathbf {h}_1)_i\) is larger than \((\mathbf {h}_2)_i\), the maximum will be found by pushing \((\mathbf {h}_1)_i\) to its upper bound and \((\mathbf {h}_2)_i\) to its lower bound. If \((\mathbf {c}_1)_i\) is equal to \((\mathbf {c}_2)_i\), then we can arbitrarily choose one to push to its lower bound and the other to push to its upper bound—we select \((\mathbf {h}_1)_i\) to go to its upper bound and \((\mathbf {h}_2)_i\) to go to its lower bound. As a result we have the optimal inputs
where the sign function is given by
Then, backtracking to our original problem and vectorizing gives us the analytical solution to this optimization problem with optimal value \(d^*\)
where the sign function is applied elementwise. This completes our derivation of the analytical solution for the maximum distance between two points contained in two hyperrectangles.
1.2 A.2 Verifier Configuration for the Collision Avoidance Benchmark
This section describes how each verifier was configured for the collision avoidance benchmark discussed in Sect. 5.1. Table 2 summarizes the non-default parameters for each solver and the location where the parameter was set. Both NNENUM and ERAN by default make use of parallelization, and Marabou has a parallel mode of operation, but for this experiment we restrict all tools to a single core. We ran the experiments on a single core to try to separate the aspects of how each solver was parallelized from what we viewed as the core of its algorithmic approach. We expect ZoPE would parallelize well, especially on more challenging problems. The hyperparameters we ran for ERAN may be better suited for multiple cores than a single core, so further comparison could explore these in more depth. Additionally, the timing results from the Verification of Neural Networks 2020 competitionFootnote 4 for several properties for ERAN were slower than we expected from the change in hardware and the restriction to a single core. Exploring the tool further, we observed that on several problem instances it would return back a failed status before reaching a timeout. On these same instances we saw that ERAN would find several inputs that were almost counter-examples, for example with a margin of \(1 \times 10^{-6}\) from violating the property, flag these as potential counter-examples, then move on. It is possible that the root cause of the abnormalities we observed affected timing results. On problems where ERAN did return a status the results were consistent with the ground truth.
The parameters were chosen based off of a mix of recommendations from developers on their best configuration for the collision avoidance benchmark or existing documented settings for this benchmark. For example, ERAN’s parameters were based off of the VNN20 competition as found at https://github.com/GgnDpSngh/ERAN-VNN-COMP/blob/master/tf_verify/run_acasxu.sh. The code for for Marabou,Footnote 5 NNENUM,Footnote 6 ERAN,Footnote 7 and our optimizer ZoPEFootnote 8 is available for free online.
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Strong, C.A., Katz, S.M., Corso, A.L., Kochenderfer, M.J. (2022). ZoPE: A Fast Optimizer for ReLU Networks with Low-Dimensional Inputs. In: Deshmukh, J.V., Havelund, K., Perez, I. (eds) NASA Formal Methods. NFM 2022. Lecture Notes in Computer Science, vol 13260. Springer, Cham. https://doi.org/10.1007/978-3-031-06773-0_16
Download citation
DOI: https://doi.org/10.1007/978-3-031-06773-0_16
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-06772-3
Online ISBN: 978-3-031-06773-0
eBook Packages: Computer ScienceComputer Science (R0)