Exact Verification of ReLU Neural Control Barrier Functions (2310.09360v1)
Abstract: Control Barrier Functions (CBFs) are a popular approach for safe control of nonlinear systems. In CBF-based control, the desired safety properties of the system are mapped to nonnegativity of a CBF, and the control input is chosen to ensure that the CBF remains nonnegative for all time. Recently, machine learning methods that represent CBFs as neural networks (neural control barrier functions, or NCBFs) have shown great promise due to the universal representability of neural networks. However, verifying that a learned CBF guarantees safety remains a challenging research problem. This paper presents novel exact conditions and algorithms for verifying safety of feedforward NCBFs with ReLU activation functions. The key challenge in doing so is that, due to the piecewise linearity of the ReLU function, the NCBF will be nondifferentiable at certain points, thus invalidating traditional safety verification methods that assume a smooth barrier function. We resolve this issue by leveraging a generalization of Nagumo's theorem for proving invariance of sets with nonsmooth boundaries to derive necessary and sufficient conditions for safety. Based on this condition, we propose an algorithm for safety verification of NCBFs that first decomposes the NCBF into piecewise linear segments and then solves a nonlinear program to verify safety of each segment as well as the intersections of the linear segments. We mitigate the complexity by only considering the boundary of the safe region and by pruning the segments with Interval Bound Propagation (IBP) and linear relaxation. We evaluate our approach through numerical studies with comparison to state-of-the-art SMT-based methods. Our code is available at https://github.com/HongchaoZhang-HZ/exactverif-reluncbf-nips23.
- Safe control synthesis via input constrained control barrier functions. In 2021 60th IEEE Conference on Decision and Control (CDC), pages 6113–6118. IEEE, 2021.
- Control barrier function based quadratic programs with application to bipedal robotic walking. In 2015 American Control Conference (ACC), pages 4542–4548. IEEE, 2015.
- Correctness guarantees for the composition of lane keeping and adaptive cruise control. IEEE Transactions on Automation Science and Engineering, 15(3):1216–1229, 2017.
- High relative degree control barrier functions under input constraints. In 2021 60th IEEE Conference on Decision and Control (CDC), pages 6119–6124. IEEE, 2021.
- Convex synthesis and verification of control-Lyapunov and barrier functions with input constraints. arXiv preprint arXiv:2210.00629, 2022.
- Verification and synthesis of robust control barrier functions: Multilevel polynomial optimization and semidefinite relaxation, 2023.
- A hybrid partitioning strategy for backward reachability of neural feedback loops. In 2023 American Control Conference (ACC), pages 3523–3528. IEEE, 2023.
- Control barrier functions: Theory and applications. In 2019 18th European control conference (ECC), pages 3420–3431. IEEE, 2019.
- Control barrier functions for mechanical systems: Theory and application to robotic grasping. IEEE Transactions on Control Systems Technology, 29(2):530–545, 2019.
- Control barrier function based quadratic programs with application to adaptive cruise control. In 53rd IEEE Conference on Decision and Control, pages 6271–6278. IEEE, 2014.
- Robust control barrier functions under high relative degree and input constraints for satellite trajectories. arXiv preprint arXiv:2107.04094, 2021.
- Safe nonlinear control using robust neural Lyapunov-barrier functions. In Conference on Robot Learning, pages 1724–1735. PMLR, 2022.
- Safe control with learned certificates: A survey of neural Lyapunov, barrier, and contraction methods for robotics and control. IEEE Transactions on Robotics, 2023.
- Safe control under input limits with neural control barrier functions. In Conference on Robot Learning, pages 1970–1980. PMLR, 2023.
- A framework for worst-case and stochastic safety verification using barrier certificates. IEEE Transactions on Automatic Control, 52(8):1415–1428, 2007.
- Control barrier functions for systems with high relative degree. In 2019 IEEE 58th conference on decision and control (CDC), pages 474–479. IEEE, 2019.
- Andrew Clark. Verification and synthesis of control barrier functions. In 2021 60th IEEE Conference on Decision and Control (CDC), pages 6105–6112. IEEE, 2021.
- Safety index synthesis via sum-of-squares programming. arXiv preprint arXiv:2209.09134, 2022.
- SOS construction of compatible control Lyapunov and barrier functions. arXiv preprint arXiv:2305.01222, 2023.
- Safe model-based reinforcement learning with stability guarantees. Advances in Neural Information Processing Systems, 30, 2017.
- Fossil: A software tool for the formal synthesis of Lyapunov functions and barrier certificates using neural networks. In Proceedings of the 24th International Conference on Hybrid Systems: Computation and Control, pages 1–11, 2021.
- Learning safe multi-agent control with decentralized neural barrier certificates. arXiv preprint arXiv:2101.05436, 2021.
- Synthesizing barrier certificates using neural networks. In Proceedings of the 23rd international conference on hybrid systems: Computation and control, pages 1–11, 2020.
- Formal synthesis of lyapunov neural networks. IEEE Control Systems Letters, 5(3):773–778, 2020.
- Verifying neural network controlled systems using neural networks. In 25th ACM International Conference on Hybrid Systems: Computation and Control, pages 1–11, 2022.
- Recent improvements in the SMT solver iSAT. MBMV, 13:231–241, 2013.
- Output reachable set estimation and verification for multilayer neural networks. IEEE Transactions on Neural Networks and Learning Systems, 29(11):5777–5783, 2018.
- Synthesizing barrier certificates of neural network controlled continuous systems via approximations. In 2021 58th ACM/IEEE Design Automation Conference (DAC), pages 631–636. IEEE, 2021.
- Complete verification via multi-neuron relaxation guided branch-and-bound. arXiv preprint arXiv:2205.00263, 2022.
- Deepsplit: An efficient splitting method for neural network verification via indirect effect analysis. In IJCAI, pages 2549–2555, 2021.
- General cutting planes for bound-propagation-based neural network verification. Advances in Neural Information Processing Systems, 35:1656–1670, 2022.
- Reluplex: An efficient SMT solver for verifying deep neural networks. In Computer Aided Verification: 29th International Conference, CAV 2017, Heidelberg, Germany, July 24-28, 2017, Proceedings, Part I 30, pages 97–117. Springer, 2017.
- The Marabou framework for verification and analysis of deep neural networks. In Computer Aided Verification: 31st International Conference, CAV 2019, New York City, NY, USA, July 15-18, 2019, Proceedings, Part I 31, pages 443–452. Springer, 2019.
- Safety certification for stochastic systems via neural barrier functions. IEEE Control Systems Letters, 7:973–978, 2022.
- Safety guarantees for neural network dynamic systems via stochastic barrier functions. Advances in Neural Information Processing Systems, 35:9672–9686, 2022.
- Set-Theoretic Methods in Control, volume 78. Springer, 2008.
- Automatic perturbation analysis for scalable certified robustness and beyond. Advances in Neural Information Processing Systems, 33:1129–1141, 2020.
- Darboux-type barrier certificates for safety verification of nonlinear hybrid systems. In Proceedings of the 13th International Conference on Embedded Software, pages 1–10, 2016.
- Safety verification of reactive controllers for uav flight in cluttered environments using barrier certificates. In 2012 IEEE International Conference on Robotics and Automation, pages 484–490. IEEE, 2012.
- Lester E Dubins. On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents. American Journal of mathematics, 79(3):497–516, 1957.
- A spacecraft benchmark problem for hybrid control and estimation. In 2016 IEEE 55th Conference on Decision and Control (CDC), pages 3300–3305. IEEE, 2016.
- dreal: An SMT solver for nonlinear theories over the reals. In Automated Deduction–CADE-24: 24th International Conference on Automated Deduction, Lake Placid, NY, USA, June 9-14, 2013. Proceedings 24, pages 208–214. Springer, 2013.
- Z3: An efficient SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems: 14th International Conference, TACAS 2008, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2008, Budapest, Hungary, March 29-April 6, 2008. Proceedings 14, pages 337–340. Springer, 2008.
- SOSTOOLS and its control applications. Positive polynomials in control, pages 273–292, 2005.