Introduction
Machine learning (ML) models, particularly Multi-Layer Perceptrons (MLPs) and Support Vector Regressors (SVRs), have demonstrated remarkable performance in modeling complex dynamics, such as robot arm kinematics. However, their "black box" nature poses significant risks in safety-critical domains like medical dosing or industrial robotics. Traditional probabilistic testing is often insufficient for these applications; instead, formal guarantees are required to ensure a model never produces an unsafe output. This paper addresses the challenge of verifying non-linear, transcendental ML models by bridging the gap between high-performance learning and rigorous safety integrity levels.
Methodology: Abstraction and Formal Verification
The core of the proposed framework is the translation of ML models into a format amenable to formal verification using Satisfiability Modulo Theory (SMT) solvers. This is achieved through two primary mechanisms:
1. Abstraction to QF_LRA
Standard logic solvers struggle with the non-linear activation functions of neural networks or the kernels used in SVMs. To overcome this, the authors "abstract" these models into a set of constraints expressed in Quantifier-Free Linear Real Arithmetic (QF_LRA). This process creates a conservative over-approximation of the model.
As illustrated in Figure 1, a non-linear function is bounded by a series of intervals. If the abstract model is proven safe within these bounds, the underlying real model is guaranteed to be safe as well. This approach allows the use of efficient linear solvers to reason about complex, non-linear systems.
2. Counter-Example Triggered Abstraction Refinement (CETAR)
When a solver identifies a potential "counterexample" (an input leading to an unsafe output), the framework must determine if it is a genuine violation or a "spurious" artifact of the over-approximation. If the counterexample is spurious, the CETAR loop refines the abstraction, tightening the bounds until a definitive safety proof or a real counterexample is found.
Case Studies and Datasets
The framework was evaluated across three distinct physical and simulated domains:
- James Humanoid Robot: A dataset focused on force compensation, where an MLP estimates internal forces (gravity, Coriolis, inertia) to be subtracted from sensor readings.
- iCub Humanoid Robot: A forward kinematics dataset where the model predicts the end-effector position based on seven-joint angular positions.
- V-REP Simulation: An artificial physical domain used to test active learning with SVRs, where an agent learns to throw a ball into a goal while avoiding obstacles.
Results and Discussion
The authors categorized safety into three distinct logical problems: Global Safety (output range bounding), Local Safety (neighborhood consistency), and Stability (input-output variation sensitivity). Stability proved to be the most challenging to verify, requiring complex convex polyhedra abstractions to bypass non-linear arithmetic.
Key findings include:
- Verification Success: Using state-of-the-art SMT solvers (Z3, MathSAT, and CVC4), the authors successfully processed approximately 75% of the 2,952 verification encodings.
- Computational Complexity: A clear hierarchy of difficulty emerged; while many encodings were solved easily, several remained unsolved, highlighting the scalability challenges of formal verification as model complexity grows.
- Active Learning Efficiency: In the V-REP simulation, active learning strategies like "Query by Committee" (QBC) significantly outperformed random sampling. Environmental obstacles were found to simplify the learning task by ruling out certain trajectories, allowing for faster convergence to safety thresholds.
Conclusion and Future Work
While the integration of SMT solvers and ML models provides a path toward verifiable safety, scalability remains a primary hurdle. SMT solvers currently struggle as the number of neurons or support vectors increases. Future research directions include extending active learning to MLPs, hybridizing formal guarantees with statistical confidence intervals (e.g., from Gaussian Process Regression), and applying these techniques to reinforcement learning agents in continuous state-action spaces.
Summary updated