Unifying Qualitative and Quantitative Safety Verification of DNN-Controlled Systems
TL;DR Summary
This paper presents a novel framework for unifying qualitative and quantitative safety verification of DNN-controlled systems, addressing challenges posed by stochastic behavior. By synthesizing neural barrier certificates, it establishes almost-sure safety guarantees and precise
Abstract
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 -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 and showcase its efficacy on four classic DNN-controlled systems.
Mind Map
In-depth Reading
English Analysis
1. Bibliographic Information
1.1. Title
The title of the paper is Unifying Qualitative and Quantitative Safety Verification of DNN-Controlled Systems. This title indicates that the paper proposes a single framework to verify the safety of systems controlled by Deep Neural Networks (DNNs) from two perspectives: qualitative (is it safe or not?) and quantitative (how safe is it, probabilistically?).
1.2. Authors
The authors of the paper are:
- Dapeng Zhi (East China Normal University)
- Pei Wang (Nanyang Technological University)
- Long Li (Nanyang Technological University)
- Min Zhang (East China Normal University)
- Si Liu (ETH Zurich)
1.3. Journal/Conference
The paper is a preprint published on arXiv, indicated by the Original Source Link and PDF Link. The acknowledgment section mentions "We thank the anonymous reviewers of CAV 2024 for their valuable comments," suggesting it has been submitted to or accepted by the Computer Aided Verification (CAV) conference. CAV is a highly reputable and influential conference in the field of formal methods and verification, known for publishing cutting-edge research on verifying hardware and software systems.
1.4. Publication Year
The paper was published on 2024-04-02.
1.5. Abstract
The paper addresses the critical need for certified safety guarantees in safety-critical systems controlled by Deep Neural Networks (DNNs), especially given the advancements in deep reinforcement learning. Existing verification methods are primarily qualitative, relying on reachability analysis, which is deemed insufficient for DNN-controlled systems due to their stochastic tendencies in open and adversarial environments.
The authors propose a novel framework that unifies both qualitative and quantitative safety verification problems for DNN-controlled systems. This unification is achieved by formulating verification tasks as the synthesis of Neural Barrier Certificates (NBCs). The framework first attempts to establish almost-sure safety guarantees through qualitative verification. If this fails, a quantitative verification method is invoked to provide precise lower and upper bounds on probabilistic safety across both infinite and finite time horizons.
To facilitate the synthesis of NBCs, the paper introduces their k-inductive variants. Furthermore, it devises a simulation-guided approach for training NBCs, aiming to compute tighter certified lower and upper bounds. The proposed approach is prototyped in a tool named UniQQ and its effectiveness is demonstrated on four classic DNN-controlled systems.
1.6. Original Source Link
- Original Source Link: https://arxiv.org/abs/2404.01769v1
- PDF Link: https://arxiv.org/pdf/2404.01769v1.pdf
- Publication Status: This is a preprint, version 1, uploaded to
arXiv. As noted in the acknowledgments, it has been submitted toCAV 2024.
2. Executive Summary
2.1. Background & Motivation
The core problem the paper aims to solve is the lack of certified safety guarantees for Deep Neural Network (DNN)-controlled systems, especially in safety-critical applications. The rapid advancement of deep reinforcement learning (DRL) has led to DNNs being used to oversee complex systems, but ensuring their safety is paramount.
This problem is important because DNNs operate in open and adversarial environments, leading to stochastic tendencies in their behavior due to factors like environment noises, unreliable sensors, and malicious attacks. Traditional qualitative verification methods, such as reachability analysis, which mainly answer "is it safe?" (yes/no), are often insufficient. When qualitative verification fails, it's crucial to obtain quantitative guarantees, such as probabilistic safety bounds (e.g., "it is safe with X% probability").
Prior research in quantitative verification often relies on automata-based quantitative formalisms (e.g., Markov chains, timed automata). However, applying these to DNN-controlled systems is challenging due to:
-
The difficulty in building a faithful
automata-based probabilistic modelforDNNsbecause their actions are state-dependent and continuous state spaces are hard to enumerate. -
State exploration issues(a known problem in model checking) even if a model is constructed with abstractions, leading to high verification times.The paper's innovative idea is to use
Neural Barrier Certificates (NBCs)as a unifying approach.Barrier Certificates (BCs)are powerful tools for establishing safety in non-linear and stochastic systems by partitioning the state space.NBCsimplementBCsusingneural networks, leveraging their expressiveness. The paper's entry point is to unify bothqualitativeandquantitativesafety verification into a single framework centered around the synthesis ofNBCs.
2.2. Main Contributions / Findings
The paper makes several primary contributions:
- Unified Framework: It presents a novel framework that unifies both
qualitative(almost-sure safety) andquantitative(probabilistic safety bounds) verification ofDNN-controlled systems. This is achieved by reducing these distinct verification problems into the cohesive task of synthesizing appropriateNeural Barrier Certificates (NBCs). - Theoretical Results for NBCs: The paper establishes new theoretical foundations for
NBCs, including:- Specific conditions that
NBCsmust satisfy for bothqualitativeandquantitative safety verification. - Formulas for computing
certified lower and upper boundsfor safety probabilities over bothinfiniteandfinite time horizons. These bounds are presented in bothlinearandexponential forms.
- Specific conditions that
- Enhanced NBC Synthesis:
k-inductive Variants: To accelerate and ease the training process, the paper introducesk-inductive variantsofNBCs. These variants relax the strict conditions of traditionalBCsby leveragingk-inductionprinciples, making synthesis more manageable.Simulation-Guided Training Approach: A novelsimulation-guided methodis proposed to trainpotential NBCs. This approach incorporates differences between simulation-estimated safety probabilities andNBC-derived bounds into the loss function, aiming to produce tightercertified bounds.
- Prototype Tool and Efficacy Demonstration: The authors developed a prototype tool called
UniQQand demonstrated its efficacy on four classicDNN-controlled systems.-
Experimental Findings: The experiments showcase the effectiveness of the unified approach in providing
qualitativeandquantitative safety guaranteesunder variousnoise scenarios.k-inductive variantsreduced verification overhead by an average of25%. Thesimulation-guided trainingmethod yielded significantly tighter safety bounds, with up to47.5%improvement for lower bounds and31.7%for upper bounds compared to ordinary training.These findings solve the problem of providing comprehensive, certified safety guarantees for
DNN-controlled systemsoperating under uncertainty, offering both a binary safety answer and precise probabilistic bounds when absolute safety cannot be guaranteed.
-
3. Prerequisite Knowledge & Related Work
3.1. Foundational Concepts
To understand this paper, a reader needs to be familiar with the following core concepts:
- Deep Neural Networks (DNNs): These are artificial neural networks with multiple layers between the input and output layers. They are capable of learning complex patterns and relationships from data. In
DNN-controlled systems, aDNNacts as the controller, taking system states as input and outputting actions. - Deep Reinforcement Learning (DRL): A subfield of machine learning that combines
reinforcement learning (RL)withdeep neural networks.RLalgorithms learn to make sequences of decisions by interacting with an environment, receiving rewards or penalties, andDRLusesDNNsto represent policies or value functions in this process. - Safety-Critical Systems: Systems whose failure could result in loss of life, significant property damage, or severe environmental harm (e.g., autonomous vehicles, medical devices, industrial control systems). Ensuring their safety is paramount.
- Formal Methods: A set of mathematically rigorous techniques for the specification, development, and verification of software and hardware systems. They use formal logic and mathematical proofs to ensure system correctness and safety.
- Verification: The process of ensuring that a system meets its specifications. In the context of safety, it means proving that the system will not enter an
unsafe state. - Qualitative Verification: Focuses on whether a property holds true (yes/no, safe/unsafe). For example,
reachability analysisdetermines if anunsafe statecan ever be reached. - Quantitative Verification: Focuses on the probability or likelihood of a property holding true. For example,
probabilistic safetyquantifies the probability of remaining in asafe state. - Reachability Analysis: A
qualitative verificationtechnique that determines if a system can transition from an initial set of states to a target set of states (e.g., anunsafe set). - Stochastic Systems: Systems whose behavior is influenced by random processes or uncertainties. In
DNN-controlled systems,state perturbations(noise, sensor errors) make them stochastic. - Barrier Certificates (BCs): Mathematical functions used to prove the safety of dynamical systems. A
BCpartitions the state space into safe and unsafe regions, and its properties ensure that trajectories starting in the safe region cannot cross into theunsafe region.- A
discrete-time barrier certificatefor a system with an initial set and an unsafe set typically satisfies conditions like:- for all (initial states are "safe" with respect to the barrier).
- for all (
unsafe statesare "unsafe" with respect to the barrier). - for all (the barrier function does not increase across transitions, or increases at a bounded rate, ensuring trajectories stay in the safe region). Here, is the system dynamics, is the control policy, and is a constant.
- A
- Neural Barrier Certificates (NBCs):
Barrier Certificatesimplemented and trained asDeep Neural Networks. This leverages theDNNs'expressivenessto find complexBCsthat might be difficult to represent with simpler function classes (e.g., polynomials). k-Induction: A proof technique used in formal verification. Instead of proving a property holds for all and then that it holds for assuming it holds for (simple induction),k-inductionproves that if a property holds for consecutive steps, then it also holds for the -th step. This can simplify proofs for systems with state dependencies extending over multiple steps.- CounterExample-Guided Inductive Synthesis (CEGIS): An iterative framework for synthesizing programs or functions. It involves a
learnerthat proposes a candidate solution and averifierthat checks its correctness. If theverifierfinds acounterexample(a case where the candidate fails), it feeds thiscounterexampleback to thelearnerto refine the candidate. This cycle continues until a correct solution is found or a timeout is reached. - Martingales and Supermartingales: Concepts from probability theory.
- A sequence of random variables is a
martingaleif . Intuitively, the expected value of the next observation, given all prior observations, is equal to the current observation. - A
supermartingaleis a sequence where . The expected value of the next observation is less than or equal to the current observation. This property is often used in safety proofs, as a non-increasing function can indicate that a system is moving away from anunsafe region. Submartingaleis the opposite: .
- A sequence of random variables is a
- Lipschitz Continuity: A property of a function that limits how fast it can change. A function is
Lipschitz continuousif there exists a constant (theLipschitz constant) such that for allx, yin its domain. This property is important for guaranteeing the robustness and predictability ofDNNsand system dynamics. - Interval Bound Propagation (IBP): A technique used in
DNN verificationto compute rigorous bounds on the output of aneural networkgiven an input interval. It propagates interval bounds through each layer of the network, providing lower and upper bounds for the output.
3.2. Previous Works
The paper extensively cites previous works, categorizing them into:
-
Barrier Certificates for Stochastic Systems:- Prajna et al. [40, 41, 42] introduced
BCsforstochastic systems. This work builds directly on their foundational ideas. - Data-driven approaches [44] and
k-inductive variants[4] have expandedBCapplications. The current paper incorporatesk-inductive variantsforNBCs. - Related work on computing
reachability probabilitiesin stochastic systems for infinite [20, 61, 62] and finite time horizons [60, 59] informs the quantitative aspects. Probabilistic programshave usedproof rules[19] andMartingale-based approaches[14, 15, 5] forreachabilityandtermination probabilities, which were later unified byorder-theoretic fixed-point approaches[52, 49, 50]. The current paper also leveragesMartingaleproperties for itsBCconditions.
- Prajna et al. [40, 41, 42] introduced
-
Formal Verification of DNN-controlled Systems:- Modeling as
Markov Decision Processes (MDPs): Some approaches modelDNN-controlled systemsasMDPsand use probabilistic model checkers likePRISM[30] andStorm[25] for verification. - Bacci and Parker [7, 8] used
abstract interpretationto constructinterval MDPsforsafety probabilitieswithin bounded time andverified probabilistic policiesforDRL. - Carr et al. [13] proposed
probabilistic verificationby constraining analysis topartially observable finite-state models. - Amir et al. [3] focused on
scalable verificationforDRL, includinglivenessproperties. Reachability Analysis: This is apivotal qualitative approach.- Bacci et al. [6] introduced a
linear over-approximation-based methodforreachable set invariantsover aninfinite time horizon. - Other tools like
Verisig[28] andPolar[27] focus onbounded time reachability analysis. These often assumedeterministic actionsand do not explicitly considerperturbations. The current paper explicitly addressesstochasticityandperturbations.
- Bacci et al. [6] introduced a
- Modeling as
-
Barrier Certificates for Training and Verifying DNN Controllers:- Recent work [1, 39, 63, 17] has investigated
BC-based methods fortrainingandverifying DNN controllers. The core idea is to learn a safe controller through interactive computation ofBCsto ensurequalitative safety. - Existing
BC-based approaches forDNN-controlled systemspredominantly focus onqualitative aspectsand oftenneglect perturbations[47, 64]. This paper's approachcomplementsthese by explicitlyaccommodating inherent uncertaintythroughstochasticity.
- Recent work [1, 39, 63, 17] has investigated
3.2.1. Example of a Core Formula from Previous Work: Discrete-time Barrier Certificates (Definition 1)
The paper itself provides a foundational definition from previous work on Discrete-time Barrier Certificates (BCs) in Section 2.2. This definition is crucial for understanding the extensions proposed in the current paper.
Definition 1 (Discrete-time Barrier Certificates).
Given a DNN-controlled system with an unsafe set such that . A discrete-time barrier certificate is a real-valued function such that for some constant , it holds that:
- for all
- for all
- for all .
Explanation:
- : The set of all possible system states.
- : The set of initial states of the system.
- : The set of unsafe states. The condition means that the system starts in a safe configuration.
B(s): Thebarrier certificatefunction, which maps a state to a real number.- : A positive constant, usually between 0 and 1, that determines the rate at which the barrier function can decrease.
- : The next state of the system, given the current state and the action taken by the controller. is the policy (controller) that maps a state to an action.
- Condition 1 ( for ): This means that all initial states must have a
barrier functionvalue less than or equal to zero. This implicitly defines the "safe" region as . - Condition 2 ( for ): This means that all
unsafe statesmust have abarrier functionvalue strictly greater than zero. This defines the "unsafe" region as . - Condition 3 (): This is the crucial
inductive condition. It states that for any state , if the system transitions to the next state , thebarrier functionvalue for the next state, adjusted by the currentbarrier valuemultiplied by , must not increase (or must decrease sufficiently). More specifically, . If , then . This ensures that if the system starts in a state where , it will remain in states where , and thus never enter theunsafe setwhere .
3.3. Technological Evolution
The evolution of safety verification for dynamical systems, particularly those controlled by DNNs, has moved from purely theoretical approaches to practical, automated tools.
- Early formal methods focused on traditional software and hardware, often using
model checkingandtheorem provingfor finite-state systems. - Continuous-time systems brought the challenge of infinite state spaces, leading to techniques like
Lyapunov functionsandBarrier Certificates(e.g., Prajna et al.). These provided mathematical proofs for stability and safety. - The rise of
machine learningandDRLintroducedDNNsinto control loops, creatingDNN-controlled systems. This posed new verification challenges becauseDNNsare opaque ("black-box"), non-linear, and operate instochastic environments. - Initial approaches adapted existing verification techniques, such as abstracting
DNNsinto simpler models or modeling the entire system as anMDP. However, these often struggled withscalabilityoraccuracywhen dealing withDNNcomplexity and continuous state spaces. - The concept of
Neural Barrier Certificates (NBCs)emerged as a way to combine the rigor ofBCswith theexpressivenessofDNNs.NBCsuseDNNsto learn thebarrier functionitself, making the search forBCsmore tractable for complex systems. - The current paper fits within this evolution by pushing
NBCsfurther. It addresses thestochasticityoften neglected inDNN verificationby incorporatingstate perturbations. Crucially, it unifiesqualitativeandquantitativeverification, offering a more complete safety picture than priorBC-based methods that primarily focused onqualitative safety. It also introducesk-inductive variantsandsimulation-guided trainingto improve the efficiency and tightness ofNBCsynthesis, representing an advancement in practical application.
3.4. Differentiation Analysis
Compared to the main methods in related work, the core differences and innovations of this paper's approach are:
- Unification of Qualitative and Quantitative Verification: Most existing
BC-based verification approaches forDNN-controlled systemsfocus predominantly onqualitative safety(almost-sure safety, yes/no). This paper provides a single framework that can handle bothqualitativeandquantitative(probabilistic bounds) aspects. This is a significant step towards providing a more comprehensive safety assessment, especially when absolute safety cannot be guaranteed. - Explicit Handling of Stochasticity and Perturbations: Many existing
reachability analysisorBC-basedDNN verificationmethods do not explicitly account forstate perturbationsor inherentstochasticityinDNN-controlled systemsoperating innoisy/adversarial environments. This paper rigorously incorporatesnoise distributions(e.g., ) into itsBCconditions, making the verification more realistic for real-worldDNNapplications. - Comprehensive Quantitative Bounds (Infinite and Finite Time, Linear and Exponential): The framework not only provides
lower and upper boundsforprobabilistic safetybut also offers them for bothinfiniteandfinite time horizons. Furthermore, it presents thesefinite-time boundsin bothlinearandexponential forms, allowing for potentially tighter and more informative estimates depending on the system's dynamics. This level of detail in quantitative guarantees is novel. k-Inductive VariantsforNBCs: The introduction ofk-inductive NBCsfor bothqualitativeandquantitative verificationis an innovation. This relaxation of strictBCconditions by leveragingk-inductionmakes the synthesis of validNBCsmore tractable and computationally efficient, as evidenced by the25%faster synthesis time observed in experiments.Simulation-Guided Trainingfor Tighter Bounds: Thesimulation-guided loss terminNBCtraining is a practical innovation aimed at improving thetightnessof thecertified bounds. By incorporating statistical results from simulations into theloss function, the trainedNBCscan yieldmore precise bounds(up to47.5%improvement), which is crucial for practical application where loose bounds might be meaningless.- Leveraging
DNN ExpressivenessforBCs: WhileNBCsare not new, this paper effectively adapts and extends their use to address the specific complexities ofstochastic DNN-controlled systemsin a unified manner, demonstrating their power beyond simplequalitative safetyfor deterministic systems.
4. Methodology
4.1. Principles
The core idea of the method is to unify qualitative and quantitative safety verification for DNN-controlled systems by formulating both problems as the synthesis of Neural Barrier Certificates (NBCs). The theoretical basis relies on adapting traditional Barrier Certificate (BC) principles, extending them to handle stochasticity and DNN controllers, and then implementing these BCs as neural networks. The intuition is that by finding a suitable NBC function that satisfies specific mathematical conditions, one can formally prove almost-sure safety (qualitative) or calculate probabilistic lower and upper bounds for safety (quantitative). The use of k-induction principles and simulation-guided training further refines the synthesis process, making it more efficient and yielding tighter bounds.
4.2. Core Methodology In-depth (Layer by Layer)
The framework operates in a sequential manner, first attempting qualitative verification, and then proceeding to quantitative verification if qualitative fails or is insufficient. The central mechanism is the synthesis of NBCs for each verification task.
4.2.1. System Model: DNN-controlled Systems with State Perturbations
The paper considers DNN-controlled systems where:
-
: The state space (possibly continuous and infinite).
-
: The set of initial states.
-
: The set of actions.
-
: The
trained policyimplemented by aneural network. This is theDNNcontroller. -
: The
system dynamics, describing how the state evolves. -
: The
reward function.Crucially, the paper accounts for
state perturbationsdue to sensor errors, noise, or attacks. Anobserved stateat time is , where is arandom noisefrom aprobability distributionover . The support of is denoted by . The action is taken based on the perturbed state: . The actual successor state is . The system model explicitly incorporating thisnoise distributionis denoted as . The state space is assumed to becompactin Euclidean topology, and and areLipschitz continuous. The noise distribution either hasbounded supportor is a product ofindependent univariate distributions.
4.2.2. Problem Statement
The paper defines three safety verification problems for a given DNN-controlled system and an unsafe set (with ):
- Qualitative Verification (QV): Is
almost-surely (a.s.) safe?Almost-sure safety: . (No trajectories starting from enter with probability 1).
- Quantitative Verification over Infinite Time Horizons (QVITH): Compute
certified lower and upper boundson theprobabilistic safetyoverinfinite time horizons.Probabilistic safety (infinite): .
- Quantitative Verification over Finite Time Horizons (QVFTH): Compute
certified lower and upper boundson theprobabilistic safetyover afinite time horizon.Probabilistic safety (finite): .
4.2.3. Unified Verification Framework Overview
The verification process follows a three-step flow, as depicted in Figure 1.
The following figure (Figure 1 from the original paper) shows the system architecture:

Step 1: Qualitative Verification (QV)
- The framework first attempts to synthesize an
NBCsatisfying the conditions ofTheorem 1. - If successful, the system is concluded to be
almost-surely safe, and verification stops. - Alternative: If a
Theorem 1 NBCcannot be synthesized, it tries to synthesize ak-inductive NBCbased onTheorem 8.k-inductive NBCshave weaker conditions and are easier to synthesize. - If
QVfails (noNBCfound within timeout), the framework proceeds toquantitative verification.
Step 2: Quantitative Verification over Infinite Time Horizons (QVITH)
- The framework attempts to synthesize two
NBCs: one forlower bounds(based onTheorem 2) and one forupper bounds(based onTheorem 3). - If synthesis fails (timeout), the process terminates.
- Otherwise, it obtains and .
- Alternative: It can try to synthesize
k-inductive variantsofNBCsusingTheorems 9and10. - If is greater than or equal to a predefined
safety threshold, verification terminates. This prevents returning a trivially low (e.g., zero) lower bound. - If is less than , it proceeds to
quantitative verification over finite time horizons.
Step 3: Quantitative Verification over Finite Time Horizons (QVFTH)
- The framework attempts to synthesize two
NBCsforlinear bounds(based onTheorem 4forlower boundsandTheorem 6forupper bounds). - If synthesis fails (timeout), the process terminates.
- Otherwise, it computes
linear lower and upper boundsforprobabilistic safetyover afinite time horizon. - Alternative: It can also synthesize two
NBCsforexponential bounds(based onTheorem 5forlower boundsandTheorem 7forupper bounds), which might be tighter.
4.2.4. Detailed Conditions for Barrier Certificates
4.2.4.1. Qualitative Safety Verification (Almost-Sure Safety)
Theorem 1 (Almost-Sure Safety).
Given an with an initial set and an unsafe set , if there exists a barrier certificate such that for some constant , the following conditions hold:
- for all ,
- for all ,
- for all .
Explanation:
- This theorem is an extension of
Definition 1tostochastic systems. - : The support of the
noise distribution. - Condition 1: Initial states must be in the "safe" region ().
- Condition 2: Unsafe states must be in the "unsafe" region ().
- Condition 3: This is the
inductive conditionadapted forstochasticity. It states that for any state and any possiblenoise perturbationfrom , thebarrier functionvalue for the next state must not increase (or must decrease sufficiently) relative to the current stateB(s). The key difference fromDefinition 1is , explicitly considering theperturbed statefor action selection and the transition over all possible in . If these conditions hold, it implies that the system's trajectories willalmost-surelynot enter .
4.2.4.2. Quantitative Safety Verification over Infinite Time Horizon
Theorem 2 (Lower Bounds on Infinite-time Safety).
Given an with an initial set and an unsafe set , if there exists a barrier certificate such that for some constant , the following conditions hold:
-
for all ,
-
for all ,
-
for all ,
-
for all ,
then the
safety probabilityoverinfinite time horizonsis bounded from below by: $ \forall s_0 \in S_0 . \mathbb{P}{s_0} \left[ \left{ \omega \in \Omega{s_0} \bigm \vert \omega_t \notin S_u \text{ for all } t \in \mathbb{N} \right} \right] \geq 1 - B(s_0) . $
Explanation:
- : The
expected valueof the expression given that is drawn fromnoise distribution, and the current state is . This accounts for the probabilistic nature of transitions. - : All states that are not in the
unsafe set. - Condition 1: The
barrier functionmust be non-negative everywhere. - Condition 2: The
barrier functionvalue for initial states must be less than or equal to . This helps define the starting "level" for thelower bound. - Condition 3: The
barrier functionvalue forunsafe statesmust be at least 1. This acts as a threshold forunsafety. - Condition 4: This is a
supermartingale property. It states that theexpected valueof thebarrier functionin the next state (consideringnoise) must be less than or equal to its current value, for all states outside theunsafe set. This means thebarrier functionis expected to be non-increasing in the safe region. - Bound: provides a
lower boundon the probability of never entering theunsafe set. If is small (e.g., close to 0), thelower boundis close to 1.
Theorem 3 (Upper Bounds on Infinite-time Safety).
Given an with an initial set and an unsafe set , if there exists a barrier certificate such that for some constants , , the following conditions hold:
-
for all ,
-
for all ,
-
for all ,
-
for all ,
then the
safety probabilityoverinfinite time horizonsis bounded from above by: $ \forall s_0 \in S_0 . \mathbb{P}{s_0} \left[ \left{ \omega \in \Omega{s_0} \mid \omega_t \notin S_u \text{ for all } t \in \mathbb{N} \right} \right] \leq 1 - B(s_0) . $
Explanation:
- : A discount factor.
- : Constants defining thresholds.
- Condition 1: The
barrier functionvalues are bounded between 0 and 1. - Condition 2: Initial states have a
barrier valueof at least . This helps define the starting "level" for theupper bound. - Condition 3:
Unsafe stateshave abarrier valueof at most . - Condition 4: This is a \gamma`-scaled submartingale property`. It implies that $B(s) \leq \gamma \cdot \mathbb{E}_{\delta \sim \mu} [ B(f(s, \pi(s+\delta))) \mid s ]$, which means the `expected value` of the `barrier function` is expected to increase by a factor of $1/\gamma$ in the safe region.
* **Bound:** $1 - B(s_0)$ provides an `upper bound` on the probability of never entering the `unsafe set`. If $B(s_0)$ is large (e.g., close to 1), the `upper bound` is small.
#### 4.2.4.3. Quantitative Safety Verification over Finite Time Horizon
**Theorem 4 (Linear Lower Bounds on Finite-time Safety).**
Given an $M_{\mu}$ with an initial set $S_0$ and an unsafe set $S_u$, if there exists a `barrier certificate` $B: S \to \mathbb{R}$ such that for some constants $\lambda > \epsilon \geq 0$ and $c \geq 0$, the following conditions hold:
1. $B(s) \geq 0$ for all $s \in S$,
2. $B(s) \leq \epsilon$ for all $s \in S_0$,
3. $B(s) \geq \lambda$ for all $s \in S_u$,
4. $\mathbb{E}_{\delta \sim \mu} [ B(f(s, \pi(s+\delta))) \mid s ] - B(s) \leq c$ for all $s \in S \setminus S_u$,
then the `safety probability` over a `finite time horizon` $T$ is bounded from below by:
$
\forall s_0 \in S_0 . \mathbb{P}_{s_0} \left[ \left\{ \omega \in \Omega_{s_0} \middle \vert \omega_t \notin S_u \text{ for all } t \leq T \right\} \right] \geq 1 - ( B(s_0) + c T ) / \lambda .
$
**Explanation:**
* $\lambda > \epsilon \geq 0$: Constants defining thresholds.
* $c \geq 0$: A constant representing the maximum allowed increase in the `barrier function` expectation.
* **Condition 1-3:** Similar to `Theorem 2`, defining non-negativity and thresholds for initial/unsafe states.
* **Condition 4:** This is a `c-martingale property`. It implies that the `expected value` of the `barrier function` is allowed to increase by at most $c$ at each time step. This is less strict than a `supermartingale` (where $c=0$), allowing for some drift in the `barrier function`, but in exchange, it provides `finite-time guarantees`.
* **Bound:** The `lower bound` is $1 - (B(s_0) + cT)/\lambda$. This is a `linear decrease` with time $T$. As $T$ increases, the probability of safety decreases linearly.
**Theorem 5 (Exponential Lower Bounds on Finite-time Safety).**
Given an $M_{\mu}$, if there exists a function $B: S \to \mathbb{R}$ such that for some constants $\alpha > 0$, $\beta \in \mathbb{R}$, and $\gamma \in [0, 1)$, the following conditions hold:
1. $B(s) \geq 0$ for all $s \in S$,
2. $B(s) \leq \gamma$ for all $s \in S_0$,
3. $B(s) \geq 1$ for all $s \in S_u$,
4. $\alpha \mathbb{E}_{\delta \sim \mu} [ B(f(s, \pi(s+\delta))) \mid s ] - B(s) \leq \alpha \beta$ for all $s \in S \setminus S_u$.
then the `safety probability` over a `finite time horizon` $T$ is bounded from below by:
$
\forall s_0 \in S_0 . \mathbb{P}_{s_0} \left[ \left\{ \omega \in \Omega_{s_0} \mid \omega_t \notin S_u \text{ for all } t \right\} \right] \geq 1 - \frac { \alpha \beta } { \alpha - 1 } + \left( \frac { \alpha \beta } { \alpha - 1 } - B(s_0) \right) \cdot \alpha^{-T} .
$
**Explanation:**
* $\alpha > 0, \beta \in \mathbb{R}, \gamma \in [0, 1)$: Constants.
* **Condition 1-3:** Similar to previous `lower bound` theorems.
* **Condition 4:** This condition implies that $B(s) \geq \alpha (\mathbb{E}_{\delta \sim \mu} [ B(f(s, \pi(s+\delta))) \mid s ] - \beta)$. The \alpha
-scaled expectationof can increase by at most at each step. This leads to anexponential bound. - Bound: The
lower boundinvolves , indicating anexponential decreasewith time . This form can be tighter than thelinear boundfor certain systems.
Theorem 6 (Linear Upper Bounds on Finite-time Safety).
Given an with an initial set and an unsafe set , if there exists a barrier function such that for some constants , , , the following conditions hold:
-
for all ,
-
for all ,
-
for all ,
-
for all .
then the
safety probabilityover afinite time horizonis bounded from above by: $ \forall s_0 \in S_0 . \mathbb{P}{s_0} \left[ \left{ \omega \in \Omega{s_0} \mid \omega_t \notin S_u \text{ for all } t \leq T \right} \right] \leq 1 - B(s_0) - \frac{1}{2} c \cdot T + \beta . $
Explanation:
- : Constants.
- Condition 1: Non-negativity of
B(s). - Condition 2: States outside the
unsafe sethave abarrier valueat most . - Condition 3:
Unsafe stateshavebarrier valuesbetween and . - Condition 4: This is an "inverse"
c-martingale property. It states that theexpected valueof must increase by at least at each time step for states outside . This implies a tendency to "escape" the safe region. - Bound: The
upper boundshows alinear decreaseinsafety probabilitywith .
Theorem 7 (Exponential Upper Bounds on Finite-Time Safety).
Given an with an initial set and an unsafe set , if there exists a barrier function such that for some constants , and a non-empty interval [a, b], the following conditions hold:
-
for all ,
-
for all ,
-
for all ,
-
for all and .
then the
safety probabilityover afinite time horizonis bounded from above by: $ \forall s_0 \in S_0 . \mathbb{P}{s_0} \left[ \left{ \omega \in \Omega{s_0} \mid \omega_t \notin S_u \text{ for all } t \leq T \right} \right] \leq \exp \left( - \frac{2 (\epsilon \cdot T - B(s_0))^2}{T \cdot (b - a)^2} \right) . $
Explanation:
- : Constants and interval. Note
B(s)is negative in . - Condition 1: Non-negativity of
B(s)outside . - Condition 2:
Unsafe stateshavebarrier valuesbounded between and , both negative. This is a subtle difference where the barrier function is negative in the unsafe region, which could imply a different scaling or interpretation compared to previous positive-valued barriers. - Condition 3: This is a
supermartingale difference condition. Theexpected valueof must decrease by at least at each time step for states outside . This means thebarrier functionis expected to decrease, pushing away fromunsafe states. - Condition 4: This ensures that the change in
B(s)between steps, , is bounded within an interval[a, b]. Thisboundednessis crucial for applyingHoeffding's Inequality. - Bound: The
upper boundinvolves anexponential decaywith . This is derived usingHoeffding's Inequality on Supermartingales.
4.2.5. Relaxed k-Inductive Barrier Certificates
To make NBC synthesis more manageable, especially for qualitative verification where Theorem 1 might be too strict, the paper introduces k-inductive variants.
4.2.5.1. k-Inductive Update Functions
First, the concept of a k-step update function is defined.
$
g_{\pi, f}^k (s_t, \Delta_t^k) = \begin{cases} g_{\pi, f} (g_{\pi, f}^{k-1} (s_t, \Delta_t^{k-1}), \delta_{t+k-1}) & \text{if } k > 1 \ f(s_t, \pi(s_t + \delta_t)) & \text{if } k = 1 \ s_t & \text{if } k = 0 \end{cases}
$
where is a noise vector of length (each ), and .
- This function effectively computes the state after steps, considering a sequence of noise values. denotes the product measure on .
4.2.5.2. k-Inductive Barrier Certificates for Qualitative Safety
Theorem 8 (k-inductive Variant of Almost-Sure Safety).
Given an with an initial set and an unsafe set , if there exists a k-inductive barrier certificate such that the following conditions hold:
-
for all ,
-
for all ,
-
for all ,
then the system is
almost-surely safe.
Explanation:
- Condition 1: This is the
base casefork-induction. It requires that for any initial state , and for anynoise sequenceof length , thebarrier functionvalue must remain non-positive for the first steps. - Condition 2: Unsafe states still have .
- Condition 3: This is the
inductive step. It states that if the system has remained safe (i.e., ) for consecutive steps (given by the conjunction ), then it will also be safe at the -th step (i.e., ). - Practical Condition: To compute
k-inductive BCs,Condition 3(implication) is often replaced by a sufficient condition: $- B(g_{\pi, f}^k (s, \Delta^k)) - \sum_{0 \leq i < k} \tau_i \cdot (- B(g_{\pi, f}^i (s, \Delta^i))) \geq 0 , \ \forall (s, \Delta^i) \in S \times W^i .
$
If there exist
non-negative coefficientssatisfying thislinear combinationcondition, thenCondition 3is satisfied. This transformation makes the condition amenable tooptimization-based synthesis.
- B(g_{\pi, f}^k (s, \Delta^k)) - \sum_{0 \leq i < k} \tau_i \cdot (- B(g_{\pi, f}^i (s, \Delta^i))) \geq 0 , \ \forall (s, \Delta^i) \in S \times W^i .
$
If there exist
4.2.5.3. k-Inductive Barrier Certificates for Quantitative Safety
Theorem 9 (k-inductive Lower Bounds on Infinite-time Safety).
Given an , if there exists a k-inductive barrier certificate such that for some constants , and , the following conditions hold:
-
for all ,
-
for all ,
-
for all ,
-
for all ,
-
for all ,
then the
safety probabilityoverinfinite time horizonsis bounded from below by: $ \forall s_0 \in S_0 . \mathbb{P}{s_0} \left[ \left{ \omega_0 \in \Omega{s_0} \mid \omega_t \notin S_u \text{ for all } t \in \mathbb{N} \right} \right] \geq 1 - k B(s_0) - \frac{k(k-1)c}{2} . $
Explanation:
- This theorem combines elements from
Theorem 2(forinfinite-time lower bounds) and thek-inductionconcept. - Conditions 1-3: Standard conditions for
lower bounds. - Condition 4: Requires to be a
c-martingaleat every single time step. - Condition 5: Requires to be a
supermartingalewhen sampled after every -th step, i.e., steps are considered together. - Bound: The
lower boundis modified by factors of and , reflecting the relaxation provided byk-inductionand thec-martingaleproperty.
Theorem 10 (k-inductive Upper Bounds on Infinite-time Safety).
Given an , if there exists a barrier certificate such that for some constant , , , the following conditions hold:
-
for all ,
-
for all ,
-
for all ,
-
for all ,
-
for all ,
then the
safety probabilityoverinfinite time horizonsis bounded from above by: $ \forall s_0 \in S_0 . \mathbb{P}{s_0} \left[ \left{ \omega \in \Omega{s_0} \mid \omega_t \notin S_u \text{ for all } t \in \mathbb{N} \right} \right] \leq 1 - k B(s_0) - \frac{k(k-1)c}{2} . $
Explanation:
- This theorem is for
k-inductive upper boundsoninfinite-time safety. - Conditions 1-3: Standard conditions for
upper bounds. - Condition 4: This is an "inverse"
c-martingale property(expected value increases by at least , where is non-positive). - Condition 5: Requires to be a \gamma^k`-scaled submartingale` when sampled after every $k$-th step.
* **Bound:** The `upper bound` is similarly modified by factors of $k$ and $c$.
* **Remark on $k$ for `k-inductive variants`:** For the probabilistic bounds in `Theorem 9` and `Theorem 10` to be non-trivial (i.e., meaningful, not just $P \geq 0$), the value of $k$ must be bounded by:
$
1 \leq k \leq \frac { ( c - 2 B ( s _ { 0 } ) ) + \sqrt { 4 B ( s _ { 0 } ) ^ { 2 } + c ^ { 2 } - 4 c ( B ( s _ { 0 } ) - 2 ) } } { 2 c } .
$
### 4.2.6. Synthesis of Neural Barrier Certificates (NBCs)
The `BCs` defined above are synthesized as `Neural Barrier Certificates (NBCs)` using a `CEGIS (CounterExample-Guided Inductive Synthesis)` approach. This iterative process is shown in Figure 2.
The following figure (Figure 2 from the original paper) shows the system architecture:
![Fig. 2. CEGIS-based NBC synthesis \[2\]](/files/papers/693134495b4290fa4ffbe7b5/images/2.jpg)
**Workflow of CEGIS-based NBC Synthesis:**
1. **Initialize Candidate NBC:** A `neural network` $h_{\theta}$ (with parameters $\theta$) is initialized to act as the candidate `BC`.
2. **Training Phase:**
* **Training Data Discretization:** Since the state space $S$ is continuous, a finite set of states $\tilde{S} \subseteq S$ is used for training. $\tilde{S}$ is generated by discretizing $S$ (e.g., a grid with granularity $\tau$). Finite subsets $\tilde{S}_0 = \tilde{S} \cap S_0$ and $\tilde{S}_u = \tilde{S} \cap S_u$ are derived.
* **Loss Function Construction:** $h_{\theta}$ is trained by minimizing a `loss function` $\mathcal{L}(\theta)$ which is a weighted sum of several terms. Each term corresponds to a condition from the relevant `BC theorem`. For `Theorem 2` (lower bound on infinite-time safety), the loss is:
$
\mathcal{L} ( \boldsymbol { \theta } ) := k _ { 1 } \cdot \mathcal { L } _ { 1 } ( \boldsymbol { \theta } ) + k _ { 2 } \cdot \mathcal { L } _ { 2 } ( \boldsymbol { \theta } ) + k _ { 3 } \cdot \mathcal { L } _ { 3 } ( \boldsymbol { \theta } ) + k _ { 4 } \cdot \mathcal { L } _ { 4 } ( \boldsymbol { \theta } ) + k _ { 5 } \cdot \mathcal { L } _ { 5 } ( \boldsymbol { \theta } )
$
where $k_i \in \mathbb{R}$ are `algorithmic parameters`.
* $\mathcal{L}_1(\theta)$: Corresponds to `Condition 1` ($B(s) \geq 0$) of `Theorem 2`.
$
\mathcal { L } _ { 1 } ( \theta ) = \frac { 1 } { \vert \tilde { S } \vert } \sum _ { s \in \tilde { S } } \left( \operatorname* { m a x } \{ 0 - h _ { \theta } ( s ) , 0 \} \right)
$
A loss is incurred if $h_{\theta}(s) < 0$.
* $\mathcal{L}_2(\theta)$: Corresponds to `Condition 2` ($B(s) \leq \epsilon$) of `Theorem 2`.
$
\mathcal { L } _ { 2 } ( \theta ) = \displaystyle \frac { 1 } { | \tilde { S } _ { 0 } | } \sum _ { s \in \tilde { S } _ { 0 } } \left( \operatorname* { m a x } \{ h _ { \theta } ( s ) - \epsilon , 0 \} \right)
$
A loss is incurred if $h_{\theta}(s) > \epsilon$ for initial states.
* $\mathcal{L}_3(\theta)$: Corresponds to `Condition 3` ($B(s) \geq 1$) of `Theorem 2`.
$
\mathcal { L } _ { 3 } ( \theta ) = \frac { 1 } { | \tilde { S } _ { u } | } \sum _ { s \in \tilde { S } _ { u } } \left( \operatorname* { m a x } \{ 1 - h _ { \theta } ( s ) , 0 \} \right) .
$
A loss is incurred if $h_{\theta}(s) < 1$ for unsafe states.
* $\mathcal{L}_4(\theta)$: Corresponds to `Condition 4` ($\mathbb{E}_{\delta \sim \mu} [ B(f(s, \pi(s+\delta))) \mid s ] - B(s) \leq 0$) of `Theorem 2`.
$
\mathcal { L } _ { 4 } ( \theta ) = \frac { 1 } { \left| \tilde { S } \setminus \tilde { S } _ { u } \right| } \sum _ { s \in \tilde { S } \setminus \tilde { S } _ { u } } \left( \operatorname* { m a x } \left\{ \sum _ { s ^ { \prime } \in \mathcal { D } _ { s } } \frac { h _ { \theta } ( s ^ { \prime } ) } { N } - h _ { \theta } ( s ) + \zeta , 0 \right\} \right)
$
Here, $\mathcal{D}_s := \{s' | s' = f(s, \pi(s+\delta_i)), \delta_i \sim \mu, i \in [1, N]\}$ is a set of $N$ `successor states` sampled with `noise`. The sum approximates the `expected value` $\mathbb{E}_{\delta \sim \mu} [\dots]$. $\zeta > 0$ is a small constant used to tighten the condition (making it $\leq -\zeta$ instead of $\leq 0$).
* **`Simulation-Guided Loss Term`** ($\mathcal{L}_5(\theta)$): This is a novel term to improve the `tightness` of the bounds.
$
\mathcal { L } _ { 5 } ( \theta ) = \frac { 1 } { \vert \tilde { S } _ { 0 } \vert } \sum _ { s \in \tilde { S } _ { 0 } } \left( \operatorname* { m a x } \{ \mathbb { f } _ { s } + h _ { \theta } ( s ) - 1 , 0 \} \right)
$
For each initial state $s_0 \in \tilde{S}_0$, $N'$ episodes are simulated to estimate the `safety frequency` $\mathbb{f}_s$ over `infinite time horizons`. This term penalizes `NBCs` whose calculated lower bound ($1-h_{\theta}(s)$) is too far below the `simulated frequency` $\mathbb{f}_s$. Intuitively, it forces $h_{\theta}(s)$ to be smaller if $\mathbb{f}_s$ is high, thus making $1-h_{\theta}(s)$ higher and tighter to the true safety probability.
3. **Validation Phase:** After training, the candidate `NBC` $h_{\theta}$ is checked for validity.
* **Conditions 1-3 (for Theorem 2):** These are checked using `interval bound propagation (IBP)` [21, 58]. The goal is to verify if:
$
\operatorname* { i n f } _ { s \in S } h _ { \theta } ( s ) \geq 0 \ \wedge \ \operatorname* { s u p } _ { s \in S _ { 0 } } h _ { \theta } ( s ) \leq \epsilon \ \wedge \ \operatorname* { i n f } _ { s \in S _ { u } } h _ { \theta } ( s ) \geq 1
$
If any state violates these, it's a `counterexample`.
* **Condition 4 (for Theorem 2):** $\mathbb{E}_{\delta \sim \mu} [ B(f(s, \pi(s+\delta))) \mid s ] - B(s) \leq 0$ is checked. `Theorem 11` is used to reduce this check from infinite states to finite states:
**Theorem 11.** Given an $M_{\mu}$ and a function $B: S \to \mathbb{R}$, we have $\mathbb{E}_{\delta \sim \mu} [ B(f(s, \pi(s+\delta))) \mid s ] - B(s) \leq 0$ for any state $s \in S \setminus S_u$ if the formula below
$
\mathbb { E } _ { \delta \sim \mu } [ B ( f ( \tilde { s } , \pi ( \tilde { s } + \delta ) ) ) \mid \tilde { s } ] \le B ( \tilde { s } ) - \zeta
$
holds for any state $\tilde{s} \in \tilde{S} \setminus \tilde{S}_u$, where `\zeta = \tau \cdot L_B \cdot (1 + L_f \cdot (1 + L_{\pi}))`. Here $\tau$ is the granularity of $\tilde{S}$, and $L_B, L_f, L_{\pi}$ are `Lipschitz constants` of $B, f, \pi$ respectively.
* To compute the `expected value` for validation, `interval arithmetic` is used to bound it from above:
$
\mathbb { E } _ { \delta \sim \mu } [ h _ { \theta } ( f ( \tilde { s } , \pi ( \tilde { s } + \delta ) ) ) \mid \tilde { s } ] \leq \sum _ { W _ { i } \in \mathrm { c e l l } ( \mathbb { W } ) } \operatorname* { m a x } \mathrm { v o l } \cdot \operatorname* { s u p } _ { \delta } F ( \delta )
$
where $F(\delta) = h_{\theta}(f(\tilde{s}, \pi(\tilde{s}+\delta)))$. The `support` $W$ of $\mu$ is partitioned into cells $W_i$, and $\operatorname{maxvol}$ is the maximal volume of these cells. The supremum over $\delta$ within each cell is computed using `interval arithmetic`.
* **Counterexample Generation:** If validation fails for any condition, `counterexamples` are generated and added to the training set $\tilde{S}$. The granularity $\tau$ might also be reduced.
4. **Iteration:** The process (`training` $\rightarrow$ `validation` $\rightarrow$ `counterexample generation`) repeats until a valid `NBC` is found or a timeout is reached.
5. **Soundness (Theorem 12):** If a trained `NBC` is valid, it `certifies` the safety property (almost-sure safety or specific bounds).
**Theorem 12 (Soundness).** If a trained `NBC` is valid, it can certify the `almost-sure safety` for the `qualitative verification`, or the derived bound by the `NBC` is a `certified lower/upper bound` on the `safety probability` for the `quantitative case`.
This rigorous `CEGIS` loop, combined with the specific `loss functions` and `validation techniques`, ensures that the synthesized `NBCs` are mathematically sound and capable of providing `certified safety guarantees`.
# 5. Experimental Setup
## 5.1. Datasets
The experiments evaluate the approach on four classic `DNN-controlled tasks` from public benchmarks:
1. **Pendulum (PD):** From OpenAI's Gym [11]. This is a classic control problem involving a pendulum that starts in a random position and aims to swing up and balance vertically.
2. **Cartpole (CP):** From OpenAI's Gym [11]. Another classic control problem where a pole is attached by an un-actuated joint to a cart, which moves along a frictionless track. The system's goal is to keep the pole upright by moving the cart left or right.
3. **B1:** A benchmark system commonly used by state-of-the-art safety verification tools [28]. (Specific details on the dynamics are not provided in the paper's main text).
4. **Tora:** Another benchmark system commonly used by state-of-the-art safety verification tools [28]. (Specific details on the dynamics are not provided in the paper's main text).
These datasets/tasks are standard in the field of `reinforcement learning` and `control theory`, making them effective for validating the method's performance and comparability with other approaches. They represent diverse dynamical systems, some with higher dimensionality or more complex control challenges.
The paper considers `state perturbations` using `uniform noises` with zero means and different radii. For each state $s = (s_1, \ldots, s_n)$, noises $X_1, \ldots, X_n$ are added to each dimension, resulting in the perturbed state $(s_1 + X_1, \ldots, s_n + X_n)$, where $X_i \sim \mathbf{U}(-r, r)$ for $1 \leq i \leq n$ and $r \geq 0$ is the `perturbation radius`.
## 5.2. Evaluation Metrics
The paper evaluates its approach based on:
1. **Qualitative Verification Outcome:**
* \checkmark$$: System is verified to be
almost-surely safe(anNBCfromTheorem 1orTheorem 8was successfully trained and validated).Unknown: No validbarrier certificatewas trained within the given timeout.#Fail: Number of episodes where the system enters theunsafe regionduring simulation. This is used as a baseline forqualitative assessment.
-
Quantitative Safety Probabilities (Lower and Upper Bounds):
- For
QVITHandQVFTH, the primary metrics are thecertified lower bounds ()andupper bounds ()on thesafety probability. These are derived from the validatedNBCsusing the formulas provided inTheorems 2-7(and theirk-inductivevariants). - The paper calculates the
mean valuesof these bounds over 10,000 randomly chosen initial states. - Baseline for quantitative evaluation:
Simulation outcomes(statistical results) are used. This involves running 10,000 episodes starting from each of the 10,000 initial states under different perturbations and recording thesafety frequency(the proportion of trajectories that remain safe). Thecertified boundsare then compared against thesesimulation outcomesto assess theirtightnessand correctness.
- For
-
Synthesis Time: The time taken (in seconds) to synthesize different types of
NBCs(normal vs.k-inductive). This measures theefficiencyof the synthesis process. -
Improvement in Tightness: For the
simulation-guided training method, the improvement intightnessis measured by comparing thewidthof the certified bounds (difference between upper and lower bound) and how close they are to thesimulation outcomes, relative toNBCstrained without thesimulation-guided loss term.The mathematical formulas for the bounds are provided within the
Methodologysection, as they are central to the proposed theorems. For instance, thelower boundforinfinite-time safetyis , and theupper boundis also (though has different properties for upper and lower bounds). The complexity of these bounds varies, for example, theexponential upper boundis given by . Each of these bounds is a direct output of the theorems once a validB(s)is found.
5.3. Baselines
The paper's method is primarily compared against:
-
Simulation Results: For
qualitative verification, simulations are run to count the number offailed episodes(trajectories entering theunsafe region). Forquantitative verification,safety probabilitiesare estimated through extensive simulations (10,000 episodes for each of 10,000 initial states). Thesesimulation outcomesserve as theground truthorbaselineagainst which thecertified boundsfromNBCsare validated and theirtightnessis assessed. -
Non-
k-inductive NBCs: When evaluatingk-inductive variants, the performance (synthesis time, tightness of bounds) is compared against the correspondingNBCswithoutk-induction(). -
NBCswithoutSimulation-Guided Loss Terms: To demonstrate the effectiveness of thesimulation-guided training, the bounds obtained fromNBCstrained with this specializedloss termare compared against those trained using only the standardBC conditionsin theirloss function.The paper implicitly references state-of-the-art tools like
Verisig[28] forB1andTorabenchmarks, indicating these are commonly used systems for such comparisons, though no direct numerical comparisons against those tools are presented for the specific problem formulation ofstochasticityandquantitative boundsthat this paper tackles.
6. Results & Analysis
6.1. Core Results Analysis
The paper presents experimental results to validate three aspects of its framework: (i) effectiveness of qualitative and quantitative verification, (ii) benefits of k-inductive BCs, and (iii) impact of simulation-guided training.
6.1.1. Effectiveness of Qualitative Safety Verification
The following are the results from Table 1 of the original paper:
| Task | Perturbation | Verification | k | #Fail. | |
|---|---|---|---|---|---|
| CP | r = 0 | ✓ | 1 | 0 | |
| r = 0.01 | Unknown | 1 | 0 | ||
| r = 0.01 | ✓ | 2 | 0 | ||
| r = 0.03 | Unknown | 1 | 207 | ||
| PD | r = 0 | ✓ | 1 | 0 | |
| r = 0.01 | Unknown | 1 | 675 | ||
| r = 0.03 | Unknown | 1 | 720 | ||
| Tora | r = 0 | ✓ | 1 | 0 | |
| r = 0.02 | Unknown | 1 | 0 | ||
| r = 0.02 | ✓ | 2 | 0 | ||
| r = 0.04 | Unknown | 1 | 0 | ||
| B1 | r = 0 | ✓ | 1 | 0 | |
| r = 0.1 | ✓ | 1 | 0 | ||
| r = 0.2 | Unknown | 1 | 1113 |
Analysis:
- Consistency: For systems where
qualitative verification(Verificationcolumn) is successful (✓), thesimulation(#Fail.column) consistently shows 0 failures. Conversely, forCPwith andPDwith and , where simulations show failures, thequalitative verificationresult isUnknown. Thisconsistencybetween formal verification and simulation reflects the effectiveness of the approach. - Impact of Perturbation: As the
perturbation radiusincreases (e.g.,PDfrom to ),qualitative verificationoften shifts from✓toUnknown, andsimulation failuresappear. This indicates thatalmost-sure safetybecomes harder to guarantee with increasing noise, which is expected. - Efficacy of
k-inductive BCs:- For
CPwith ,Theorem 1(with ) fails to synthesize anNBC(Unknown), even thoughsimulationshows 0 failures. However, using a2-inductive NBC(,Theorem 8) successfully verifies the system (✓). - Similarly, for
Torawith ,Theorem 1fails, but a2-inductive NBCsucceeds. - This demonstrates that
k-inductive variantscan relax the strict conditions ofNBCs, making synthesis possible in cases where standardNBCsfail, thereby easing the verification process.
- For
6.1.2. Effectiveness of Quantitative Safety Verification over Infinite Time Horizon
The following figure (Figure 3 from the original paper) shows the certified upper and lower bounds over infinite and finite time horizons, respectively, and their comparison with the simulation results:
![Fig. 2. CEGIS-based NBC synthesis \[2\]](/files/papers/693134495b4290fa4ffbe7b5/images/3.jpg)
Analysis of Figures 3 (a-d) (Infinite Time Horizons):
-
Enclosure of Simulation: The
certified upper(blue lines with ) andlower bounds(red lines with ) consistentlyenclosethesimulation outcomes(black lines with ). This visually confirms thesoundnessof theNBCsin providing validsafety probability bounds. -
Impact of Perturbation (r): As the
perturbation radiusincreases, thesafety probabilities(bothsimulatedandcertified bounds) generally decrease. This reflects the intuitive understanding that higher noise leads to lower safety guarantees. -
k-inductive Bounds:2-inductive upper(purple lines with\cdot_{\text{}}) andlower bounds` (green lines with ) are also shown. These also enclose the simulation results. -
Tightness: The gap between the
lowerandupper boundsindicates thetightnessof the certification. While the bounds are generally valid, there's a visible gap, suggesting room for improvement intightness.The following are the results from Table 2 of the original paper:
Task Lower 2-Lower Upper 2-Upper CP 2318.5 1876.0 2891.9 2275.3 PD 1941.6 1524.0 2282.7 1491.5 Tora 280.3 218.5 895.1 650.7 B1 587.4 313.6 1127.3 840.1
Analysis of Table 2 (Synthesis Time):
- Efficiency of
k-inductive NBCs: The synthesis time for2-inductive NBCs(2-Lower,2-Uppercolumns) is consistently lower than for regularNBCs(Lower,Uppercolumns). On average,k-inductive NBCsare25%faster to synthesize. This empirically supports the claim that relaxingBCconditions viak-inductioneases the synthesis process, leading to reducedverification overhead. - Trade-off: The paper notes that this speedup comes "at the sacrifice of tightness," though it also states that
tightnessvaries by system and perturbation. This highlights a potential trade-off between synthesis speed and the precision of the resulting bounds.
6.1.3. Effectiveness of Quantitative Safety Verification over Finite Time Horizon
Analysis of Figures 3 (e-h) (Finite Time Horizons):
- Enclosure of Simulation: Similar to
infinite-time horizons, thecertified linear(red lines for lower, green lines for upper) andexponential(purple lines for lower, blue lines for upper)boundsforfinite-time safetyconsistentlyenclosethesimulation outcomes(black lines). This further demonstrates thesoundnessof the proposed methods. - Comparison of Linear vs. Exponential Bounds:
- The
exponential upper bounds(blue lines) are generallytighterthan thelinear upper bounds(green lines). - The
exponential lower bounds(purple lines) becometighterthan thelinear lower bounds(red lines) as thetime horizonincreases. This suggests thatexponential boundscapture the long-term decay of safety probabilities more accurately.
- The
- Declining Safety over Time: All bounds and simulations show a clear
declining trendinsafety probabilitiesas thefinite time horizonincreases, which is expected whenalmost-sure safetycannot be guaranteed.
6.1.4. Effectiveness of Simulation-guided Loss Term
The following figure (Figure 4 from the original paper) shows the certified bounds w/ and w/o simulation-guided loss terms over infinite time horizons:

Analysis of Figure 4:
- Improved Tightness:
- The
upper bounds(blue lines with ) andlower bounds(red lines with ) obtained with thesimulation-guided loss termare noticeablytighter(closer to thesimulation resultsand to each other) than those obtained without it (green lines with for upper, purple lines with\cdot_{\text{}}` for lower). - Specifically, the average improvement in
tightnessis47.5%forlower boundsand31.7%forupper bounds.
- The
- Crucial Role: This result strongly indicates that the
simulation-guided loss termis essential for practical quantitative safety verification, as it significantly enhances the precision of thecertified bounds. Without it, the bounds might be too loose to be practically useful.
6.2. Ablation Studies / Parameter Analysis
The paper implicitly conducts ablation studies and parameter analysis through its comparisons:
-
k-inductive BCsvs. : By comparing synthesis time and (implied) tightness, the paper shows the benefit of relaxing theinductive conditionswith . This is anablationon the inductive step's complexity. -
Simulation-guided Loss Termvs.No Simulation-guided Loss Term: This is a directablation studyon the proposedloss term, demonstrating its isolated impact on thetightnessofcertified bounds. -
Linear vs. Exponential Bounds: While not strictly an
ablation studyon model components, the comparison betweenlinearandexponential boundshighlights the impact of the underlyingmathematical formulation(and thus differentBCconditions) on the resultingtightnessoverfinite time horizons.The effect of the
perturbation radiusis also systematically analyzed across all experiments, showing how this key environmentalhyper-parameterinfluences thealmost-sure safetystatus and theprobabilistic safety bounds. The results consistently show a decrease in safety with increasing .
7. Conclusion & Reflections
7.1. Conclusion Summary
This paper presents a comprehensive and unified framework for qualitative and quantitative safety verification of DNN-controlled systems. It successfully reduces these verification problems into the task of synthesizing Neural Barrier Certificates (NBCs). The framework systematically addresses the challenge of stochasticity and uncertainty inherent in DNN-controlled systems by incorporating state perturbations into its BC conditions.
Key contributions include:
-
Novel theoretical results defining
NBCsfor bothalmost-sure safetyandprobabilistic safety boundsoverinfiniteandfinite time horizons, withlinearandexponential formsfor the latter. -
The introduction of
k-inductive NBCstorelax constraintsandaccelerate training(average25%faster synthesis). -
A
simulation-guided training approachthat significantlyimproves the tightnessofcertified bounds(up to47.5%for lower bounds). -
A prototype tool
UniQQdemonstrating the efficacy of the framework across classicDNN-controlled systems, with experimental results consistently validating thesoundnessof thecertified boundsagainst simulations.The framework provides a holistic approach to delivering various
safety guarantees, accommodatingqualitativeorquantitativeresults, and spanning differenttime horizonsandbound forms, thereby addressing a critical need inDNN-controlled systemdeployment.
7.2. Limitations & Future Work
The authors acknowledge the following:
-
Dependence on NBC Quality: Both
qualitativeandquantitative verification resultsare significantly dependent on thequalityof thetrained NBCs. This implies that the expressiveness, convergence, and robustness of theneural networkchosen for theNBCdirectly influence the verification outcome. -
Factors Influencing Tightness: While the paper explores
k-inductive variantsandsimulation-guided trainingfortightness, it also notes that thetightnessofcertified boundsdepends on specific systems and perturbations. Investigating what factors influence thistightnessto yieldtighter boundsis an interesting future work.Based on these, the authors plan to:
-
Explore more
sophisticated deep learning methodsto trainvalid NBCsfor achieving moreprecise verification results. This could involve advancements inneural network architectures,training algorithms, oroptimization techniques.
7.3. Personal Insights & Critique
This paper offers a substantial contribution to the field of DNN-controlled system verification by providing a unified and comprehensive framework. The emphasis on stochasticity is particularly valuable, as it bridges the gap between theoretical verification and real-world uncertainties. The introduction of k-inductive NBCs and simulation-guided training are practical innovations that make the framework more efficient and the results more meaningful.
Strengths:
- Completeness: The framework covers
qualitativevs.quantitative,infinitevs.finite time horizons, andlinearvs.exponential bounds, offering a very comprehensive set ofsafety guarantees. - Practicality: The
k-inductive variantsaddress the computational challenge ofNBCsynthesis, whilesimulation-guided trainingdirectly tackles the issue ofbound tightness, both crucial for real-world applicability. - Rigorous Theoretical Foundation: The detailed theorems provide clear conditions for
NBCsand explicit formulas forsafety bounds, ensuring thecertifiednature of the results. - Empirical Validation: The experiments on classic
DNN-controlled systemswith varyingperturbation radiiprovide strong evidence of the framework's effectiveness and the benefits of its components.
Potential Issues/Areas for Improvement:
- Generalizability of
Simulation-Guided Training: While effective, thesimulation-guided trainingrelies onsimulationsto estimatesafety frequencies. The accuracy of thesesimulation estimatescould impact thetightnessand potentially thesoundnessif the simulations are not sufficiently representative or long enough. A deeper analysis of the requiredsimulation lengthandsampling strategywould be beneficial. - Computational Cost of Validation:
NBC validationoften involvesinterval arithmeticand potentiallySMT solversfor checking conditions over continuous state spaces. WhileTheorem 11helps, these operations can still be computationally intensive for high-dimensional or very complexDNNs, potentially being a bottleneck forscalability. - Choice of and
hyperparameters: The optimal choice of fork-inductive NBCsand otherhyperparameters( in the loss function, , ) can significantly influence synthesis time and bound tightness. The paper acknowledges this for but a more systematic approach to selecting these parameters could further enhance the framework. - Interpretability of
NBCs: WhileNBCsprovide mathematical proofs, theDNNitself remains a black box. Understanding why a particularNBCworks (or fails) might be challenging, limiting insights into the system's vulnerabilities beyond just the numerical bounds.
Transferability:
The methods, particularly the CEGIS approach for NBC synthesis with k-induction and simulation-guided loss terms, are highly transferable. They could be applied to:
-
Other
DNN-controlled systems: Beyond the classic benchmarks, to more complexautonomous systems(e.g., self-driving cars, drone swarms). -
Different types of
certificates: The general principle could be extended to synthesize otherneural certificates, such asLyapunov functionsfor stability orcontractivity certificatesfor robustness, understochasticsettings. -
Hybrid Systems: The approach for
discrete-time systemscould potentially be adapted forhybrid systems(systems with both continuous and discrete dynamics), which are common in many safety-critical applications.Overall, this paper lays a strong foundation for future research in
certified AI safety, offering a robust and adaptable methodology for formally reasoning aboutDNN-controlled systemsin uncertain environments.
Similar papers
Recommended via semantic vector search.