Skip to main content
QUICK REVIEW

[Paper Review] Safety Guarantees for Neural Network Dynamic Systems via Stochastic Barrier Functions

Rayan Mazouz, Karan Muvvala|arXiv (Cornell University)|Jun 15, 2022
Adversarial Robustness in Machine LearningComputer Science8 citations
TL;DR

This paper proposes a convex optimization-based framework using stochastic barrier functions to provide safety guarantees for neural network dynamic models (NNDMs). By leveraging piecewise linear approximations of neural networks and sum-of-squares optimization, it computes a lower bound on the safety probability and synthesizes minimally-invasive controllers via linear programming to enhance safety when needed, demonstrating scalability to multi-dimensional NNDMs with hundreds of neurons.

ABSTRACT

Neural Networks (NNs) have been successfully employed to represent the state evolution of complex dynamical systems. Such models, referred to as NN dynamic models (NNDMs), use iterative noisy predictions of NN to estimate a distribution of system trajectories over time. Despite their accuracy, safety analysis of NNDMs is known to be a challenging problem and remains largely unexplored. To address this issue, in this paper, we introduce a method of providing safety guarantees for NNDMs. Our approach is based on stochastic barrier functions, whose relation with safety are analogous to that of Lyapunov functions with stability. We first show a method of synthesizing stochastic barrier functions for NNDMs via a convex optimization problem, which in turn provides a lower bound on the system's safety probability. A key step in our method is the employment of the recent convex approximation results for NNs to find piece-wise linear bounds, which allow the formulation of the barrier function synthesis problem as a sum-of-squares optimization program. If the obtained safety probability is above the desired threshold, the system is certified. Otherwise, we introduce a method of generating controls for the system that robustly maximizes the safety probability in a minimally-invasive manner. We exploit the convexity property of the barrier function to formulate the optimal control synthesis problem as a linear program. Experimental results illustrate the efficacy of the method. Namely, they show that the method can scale to multi-dimensional NNDMs with multiple layers and hundreds of neurons per layer, and that the controller can significantly improve the safety probability.

Motivation & Objective

  • To address the lack of formal safety guarantees for neural network dynamic models (NNDMs), which are widely used but lack safety verification.
  • To develop a method that computes a lower bound on the probability of trajectory safety for NNDMs without requiring trajectory unfolding.
  • To design a minimally-invasive control synthesis strategy that robustly increases safety probability when certification fails.
  • To ensure scalability to high-dimensional NNDMs with multiple layers and hundreds of neurons per layer.
  • To provide a correct-by-construction framework that integrates safety certification and control synthesis using convex optimization.

Proposed method

  • Formulates safety guarantees via stochastic barrier functions, whose non-negative supermartingale property ensures forward invariance of safe sets.
  • Relies on recent convex approximation techniques to derive piecewise linear bounds for the neural network dynamics, enabling convex relaxation of the barrier function synthesis problem.
  • Reformulates the barrier function synthesis as a sum-of-squares (SOS) optimization problem, solvable via efficient convex solvers.
  • When safety probability falls below a threshold, formulates optimal control synthesis as a linear program using the convexity of the barrier function.
  • Employs interval and linear bounds on the neural network to compute conservative under- and over-approximations of the dynamics for robust safety analysis.
  • Introduces a minimally-invasive controller that activates only in regions with high risk (high βq), reducing unnecessary control interventions.

Experimental results

Research questions

  • RQ1Can stochastic barrier functions be effectively adapted to provide formal safety guarantees for NNDMs with noisy, iterative predictions?
  • RQ2How can the synthesis of stochastic barrier functions for NNDMs be reduced to a convex optimization problem despite the nonlinearity of neural networks?
  • RQ3To what extent can piecewise linear approximations of neural networks enable scalable safety verification for high-dimensional NNDMs?
  • RQ4Can a minimally-invasive controller be synthesized to robustly increase safety probability while preserving system performance?
  • RQ5How does the choice of discretization (|Q|) affect the trade-off between safety probability accuracy and computational cost?

Key findings

  • For the 1-layer Cartpole model, increasing |Q| from 960 to 3840 raised the safety probability from 0.375 to 0.599, though computation time increased over 12-fold.
  • For the 4D Husky model with 2 hidden layers, increasing |Q| from 1800 to 4800 increased safety probability from 0.010 to 0.384, with computation time increasing more than fivefold.
  • Using linear bounds, the controller achieved safety probability ≥0.95 for all NNDMs except two: the 4D Husky (2-layer, |Q|=1800) and 1-layer 5D Husky (|Q|=432), where it increased P_s from 0.010 to 0.800 and from 0.000 to 0.949, respectively.
  • For the Pendulum NNDM with 2 layers, controller intervention decreased from 100% of regions (|Q|=120) to 23.75% (|Q|=480), demonstrating minimally-invasive behavior.
  • In all cases, the controller reduced the βq parameter to 10^-6, indicating high robustness to safety violations.
  • The framework successfully scales to multi-dimensional NNDMs with multiple layers and hundreds of neurons per layer, as validated on RL-trained benchmarks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.