TL;DR
This paper introduces a data-driven framework to design and formally verify safety certificates for nonlinear systems with unknown dynamics. By combining neural networks with a Counterexample-Guided Inductive Synthesis (CEGIS) loop and SMT solvers, the authors successfully verify relaxed, $k$-inductive safety conditions using data from just a single state trajectory.
What Problem Does This Paper Address?
Ensuring the safety of autonomous and dynamical systems (like robotics or smart grids) is paramount. A common mathematical tool for this is the Barrier Certificate (BC), which defines a "safe" region of the state space and guarantees the system won't leave it.
However, traditional barrier certificates suffer from two major bottlenecks:
- Strictness: Conventional discrete-time barrier certificates require the safety function to be non-increasing at every single step. This is often too restrictive for complex systems.
- Model Dependence: Formally verifying these certificates typically requires a precise, closed-form mathematical model of the system's dynamics. In the real world, exact dynamics are rarely known.
While Neural Barrier Certificates (NBCs) leverage the expressive power of neural networks to handle complex systems, they lack formal safety guarantees when the underlying model is unknown. This paper bridges that gap.
Methods
The authors propose $k$-Inductive Neural Barrier Certificates ($k$-NBCs) embedded within a neuro-symbolic framework.
1. Relaxing Safety with $k$-Induction
Instead of forcing the barrier function to decrease at every step, $k$-induction allows a temporary increase up to $k-1$ times within a threshold $\epsilon$, provided it decreases after $k$ steps. This significantly expands the space of valid safety certificates.
2. Data-Driven Modeling via Willems' Fundamental Lemma
To verify safety without a known model, the authors use a generalization of Willems et al.’s fundamental lemma. By collecting data from a single, persistently excited state trajectory and combining it with a dictionary of possible nonlinear terms, they construct an exact data-driven representation of the system. This representation is precise enough to be used by symbolic verifiers.
3. The Neuro-Symbolic CEGIS Loop
The framework uses a Counterexample-Guided Inductive Synthesis (CEGIS) loop consisting of two main components:
- The Learner (Neural): Trains a neural network to approximate the $k$-NBC function by minimizing a custom loss function over the sampled dataset.
- The Verifier (Symbolic): Uses an SMT (Satisfiability Modulo Theories) solver (like dReal or Z3) to formally search for any state in the entire space that violates the safety conditions. If a violation is found, it passes this "counterexample" back to the learner for retraining.
Datasets
The paper does not use standard, static public datasets. Instead, the method is evaluated on data generated from three simulated nonlinear case studies:
- A Nonlinear Polynomial System: Evaluated using a trajectory of length 6 and verified with the Z3 SMT solver.
- A Controlled Pendulum System: A physical system verified using a trajectory of length 5 and the dReal solver.
- A Highly Nonlinear Academic System: Designed to test the limits of the framework, utilizing a trajectory of length 7 and verified via dReal.
Key Insights and Ideas
- A Single Trajectory Suffers: One of the most surprising elements is that a single, well-chosen state trajectory contains enough information to construct an exact model for formal verification, eliminating the need for massive datasets or a priori closed-form equations.
- Beyond Polynomials: Traditional barrier certificate methods rely heavily on Sum-of-Squares (SoS) optimization, which restricts the certificates to polynomial functions. By using neural networks and SMT solvers, this work allows for general, non-polynomial certificates (e.g., containing trigonometric or exponential terms).
- Induction Eases Synthesis: The authors observed that $k$-NBCs often require fewer CEGIS iterations to find a valid certificate compared to conventional ($k=1$) barrier certificates because the safety conditions are less rigid.
Key Results
The framework successfully synthesized and verified valid safety certificates for all three case studies:
- For the Highly Nonlinear System, a conventional barrier certificate ($k=1$) failed to find a solution, returning counterexamples. However, setting $k=2$ and $\epsilon=0.1$ allowed the framework to successfully verify a complex, non-polynomial barrier function: $$\mathcal{B}(x) = -0.55\sin(0.54x_1 - 1.32x_2 + 1.14) - 1.35\sin(0.58x_1 - 0.47x_2 + 0.29) + \dots$$
- For the Polynomial System, a valid certificate was found on the 7th iteration of the CEGIS loop, yielding a quadratic form that was notably not sum-of-squares (not positive semidefinite), proving the method finds solutions traditional SoS methods miss.
Limitations and Future Work
The primary limitation of this approach is scalability. SMT solvers like dReal and Z3 provide exact formal guarantees but are computationally expensive and struggle as the dimensionality of the state space grows.
To combat this, the authors suggest that future work could explore replacing the SMT solver with alternative verification methods, such as the scenario approach, to trade off absolute certainty for better scalability. Additionally, extending this data-driven $k$-induction framework to continuous-time systems (using $t$-barriers) remains an open and challenging direction.
Summary updated