Provably Safe Neural Network Controllers via Differential Dynamic Logic

2402.10998

YC

0

Reddit

0

Published 6/17/2024 by Samuel Teuber, Stefan Mitsch, Andr'e Platzer

🧠

Abstract

While neural networks (NNs) have potential as autonomous controllers for Cyber-Physical Systems, verifying the safety of NN based control systems (NNCSs) poses significant challenges for the practical use of NNs, especially when safety is needed for unbounded time horizons. One reason is the intractability of analyzing NNs, ODEs and hybrid systems. To this end, we introduce VerSAILLE (Verifiably Safe AI via Logically Linked Envelopes): The first general approach that allows reusing control theory results for NNCS verification. By joining forces, we exploit the efficiency of NN verification tools while retaining the rigor of differential dynamic logic (dL). Based on provably safe control envelopes in dL, we derive specifications for the NN which is proven via NN verification. We show that a proof of the NN adhering to the specification is mirrored by a dL proof on the infinite-time safety of the NNCS. The NN verification properties resulting from hybrid systems typically contain nonlinear arithmetic and arbitrary logical structures while efficient NN verification merely supports linear constraints. To overcome this divide, we present Mosaic: An efficient, sound and complete verification approach for polynomial real arithmetic properties on piece-wise linear NNs. Mosaic partitions complex verification queries into simple queries and lifts off-the-shelf linear constraint tools to the nonlinear setting in a completeness-preserving manner by combining approximation with exact reasoning for counterexample regions. Our evaluation demonstrates the versatility of VerSAILLE and Mosaic: We prove infinite-time safety on the classical Vertical Airborne Collision Avoidance NNCS verification benchmark for two scenarios while (exhaustively) enumerating counterexample regions in unsafe scenarios. We also show that our approach significantly outperforms State-of-the-Art tools in closed-loop NNV.

Create account to get full access

or

If you already have an account, we'll log you in

Overview

  • Neural networks (NNs) have potential as autonomous controllers for Cyber-Physical Systems, but verifying their safety is a significant challenge, especially for unbounded time horizons.
  • The paper introduces VerSAILLE: a general approach that allows reusing control theory results for NN-based control system (NNCS) verification.
  • The paper also presents Mosaic: an efficient, sound, and complete verification approach for polynomial real arithmetic properties on piece-wise linear NNs.

Plain English Explanation

Neural networks (NNs) are a type of machine learning model that can be used to control complex systems, like self-driving cars or industrial robots. However, ensuring the safety of these NN-based control systems (NNCSs) is a major challenge, especially when we need to guarantee safety over an unlimited time period.

The researchers introduce a new approach called VerSAILLE that helps solve this problem. VerSAILLE combines the efficiency of NN verification tools with the rigor of control theory, allowing researchers to prove that an NNCS will be safe no matter how long it runs.

To make this possible, the researchers also developed a new verification tool called Mosaic. Mosaic can efficiently and accurately check the safety of NNs that use complex mathematical functions, which is a common challenge for existing NN verification tools.

Overall, these new techniques could help make NNs more practical for controlling safety-critical systems, by giving engineers a way to be confident that the NN-based controller will behave safely no matter what happens.

Technical Explanation

The paper presents two key contributions to address the challenge of verifying the safety of NNCSs:

  1. VerSAILLE (Verifiably Safe AI via Logically Linked Envelopes): This is a general approach that allows reusing control theory results for NNCS verification. VerSAILLE exploits the efficiency of NN verification tools while retaining the rigor of differential dynamic logic (dL). The key idea is to derive specifications for the NN based on provably safe control envelopes in dL, which are then verified using NN verification tools. This ensures that a proof of the NN adhering to the specification is mirrored by a dL proof on the infinite-time safety of the NNCS.

  2. Mosaic: To overcome the mismatch between the nonlinear arithmetic and logical structures typically found in hybrid systems verification and the linear constraints supported by efficient NN verification tools, the researchers developed Mosaic. Mosaic is an efficient, sound, and complete verification approach for polynomial real arithmetic properties on piece-wise linear NNs. It partitions complex verification queries into simple queries and lifts off-the-shelf linear constraint tools to the nonlinear setting in a completeness-preserving manner by combining approximation with exact reasoning for counterexample regions.

The evaluation of the proposed techniques demonstrates their versatility. The researchers were able to prove infinite-time safety on the classical Vertical Airborne Collision Avoidance NNCS verification benchmark for two scenarios, while also (exhaustively) enumerating counterexample regions in unsafe scenarios. They also show that their approach significantly outperforms state-of-the-art tools in closed-loop NNCS verification.

Critical Analysis

The paper presents a comprehensive approach to verifying the safety of NNCSs, addressing several key challenges in this domain. The integration of control theory and NN verification tools through VerSAILLE is a novel and promising direction, as it allows leveraging the strengths of both frameworks.

One potential limitation of the research is the focus on piece-wise linear NNs in the Mosaic verification approach. While this covers an important class of NNs, it may not be directly applicable to NNs with more complex activation functions or architectures. Extending the Mosaic approach to handle a wider range of NN structures could further enhance its applicability.

Additionally, the paper does not explore the scalability of the proposed techniques to large-scale, real-world NNCSs. Investigating the performance and computational requirements of VerSAILLE and Mosaic on more complex systems would be valuable for assessing their practicality in industrial settings.

Conclusion

The VerSAILLE and Mosaic approaches introduced in this paper represent significant advancements in the verification of safety for NN-based control systems. By bridging the gap between control theory and NN verification, the researchers have developed a comprehensive framework that can rigorously prove the safety of NNCSs over unbounded time horizons.

This work has important implications for the deployment of NNs in safety-critical applications, such as autonomous vehicles, industrial robotics, and medical devices. As the use of NNs continues to grow in these domains, tools like VerSAILLE and Mosaic will be essential for ensuring the reliable and trustworthy operation of these systems.

The research also highlights the importance of interdisciplinary collaboration, as the fusion of control theory and NN verification techniques has been crucial in overcoming the limitations of each individual approach. This cross-pollination of ideas can serve as a model for future advancements in the field of safe and verified AI systems.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Related Papers

🏅

Verified Safe Reinforcement Learning for Neural Network Dynamic Models

Junlin Wu, Huan Zhang, Yevgeniy Vorobeychik

YC

0

Reddit

0

Learning reliably safe autonomous control is one of the core problems in trustworthy autonomy. However, training a controller that can be formally verified to be safe remains a major challenge. We introduce a novel approach for learning verified safe control policies in nonlinear neural dynamical systems while maximizing overall performance. Our approach aims to achieve safety in the sense of finite-horizon reachability proofs, and is comprised of three key parts. The first is a novel curriculum learning scheme that iteratively increases the verified safe horizon. The second leverages the iterative nature of gradient-based learning to leverage incremental verification, reusing information from prior verification runs. Finally, we learn multiple verified initial-state-dependent controllers, an idea that is especially valuable for more complex domains where learning a single universal verified safe controller is extremely challenging. Our experiments on five safe control problems demonstrate that our trained controllers can achieve verified safety over horizons that are as much as an order of magnitude longer than state-of-the-art baselines, while maintaining high reward, as well as a perfect safety record over entire episodes.

Read more

5/28/2024

System-level Safety Guard: Safe Tracking Control through Uncertain Neural Network Dynamics Models

System-level Safety Guard: Safe Tracking Control through Uncertain Neural Network Dynamics Models

Xiao Li, Yutong Li, Anouck Girard, Ilya Kolmanovsky

YC

0

Reddit

0

The Neural Network (NN), as a black-box function approximator, has been considered in many control and robotics applications. However, difficulties in verifying the overall system safety in the presence of uncertainties hinder the deployment of NN modules in safety-critical systems. In this paper, we leverage the NNs as predictive models for trajectory tracking of unknown dynamical systems. We consider controller design in the presence of both intrinsic uncertainty and uncertainties from other system modules. In this setting, we formulate the constrained trajectory tracking problem and show that it can be solved using Mixed-integer Linear Programming (MILP). The proposed MILP-based approach is empirically demonstrated in robot navigation and obstacle avoidance through simulations. The demonstration videos are available at https://xiaolisean.github.io/publication/2023-11-01-L4DC2024.

Read more

5/21/2024

Unifying Qualitative and Quantitative Safety Verification of DNN-Controlled Systems

Dapeng Zhi, Peixin Wang, Si Liu, Luke Ong, Min Zhang

YC

0

Reddit

0

The rapid advance of deep reinforcement learning techniques enables the oversight of safety-critical systems through the utilization of Deep Neural Networks (DNNs). This underscores the pressing need to promptly establish certified safety guarantees for such DNN-controlled systems. Most of the existing verification approaches rely on qualitative approaches, predominantly employing reachability analysis. However, qualitative verification proves inadequate for DNN-controlled systems as their behaviors exhibit stochastic tendencies when operating in open and adversarial environments. In this paper, we propose a novel framework for unifying both qualitative and quantitative safety verification problems of DNN-controlled systems. This is achieved by formulating the verification tasks as the synthesis of valid neural barrier certificates (NBCs). Initially, the framework seeks to establish almost-sure safety guarantees through qualitative verification. In cases where qualitative verification fails, our quantitative verification method is invoked, yielding precise lower and upper bounds on probabilistic safety across both infinite and finite time horizons. To facilitate the synthesis of NBCs, we introduce their $k$-inductive variants. We also devise a simulation-guided approach for training NBCs, aiming to achieve tightness in computing precise certified lower and upper bounds. We prototype our approach into a tool called $textsf{UniQQ}$ and showcase its efficacy on four classic DNN-controlled systems.

Read more

4/3/2024

Formally Verifying Deep Reinforcement Learning Controllers with Lyapunov Barrier Certificates

Formally Verifying Deep Reinforcement Learning Controllers with Lyapunov Barrier Certificates

Udayan Mandal, Guy Amir, Haoze Wu, Ieva Daukantas, Fletcher Lee Newell, Umberto J. Ravaioli, Baoluo Meng, Michael Durling, Milan Ganai, Tobey Shim, Guy Katz, Clark Barrett

YC

0

Reddit

0

Deep reinforcement learning (DRL) is a powerful machine learning paradigm for generating agents that control autonomous systems. However, the black box nature of DRL agents limits their deployment in real-world safety-critical applications. A promising approach for providing strong guarantees on an agent's behavior is to use Neural Lyapunov Barrier (NLB) certificates, which are learned functions over the system whose properties indirectly imply that an agent behaves as desired. However, NLB-based certificates are typically difficult to learn and even more difficult to verify, especially for complex systems. In this work, we present a novel method for training and verifying NLB-based certificates for discrete-time systems. Specifically, we introduce a technique for certificate composition, which simplifies the verification of highly-complex systems by strategically designing a sequence of certificates. When jointly verified with neural network verification engines, these certificates provide a formal guarantee that a DRL agent both achieves its goals and avoids unsafe behavior. Furthermore, we introduce a technique for certificate filtering, which significantly simplifies the process of producing formally verified certificates. We demonstrate the merits of our approach with a case study on providing safety and liveness guarantees for a DRL-controlled spacecraft.

Read more

5/24/2024