Abstract
We propose a learning-based method for Lyapunov stability analysis of piecewise affine dynamical systems in feedback with piecewise affine neural network controllers. The proposed method consists of an iterative interaction between a learner and a verifier, where in each iteration, the learner uses a collection of samples of the closed-loop system to propose a Lyapunov function candidate as the solution to a convex program. The learner then queries the verifier, which solves a mixed-integer program to either validate the proposed Lyapunov function candidate or reject it with a counterexample, i.e., a state where the stability condition fails. This counterexample is then added to the sample set of the learner to refine the set of Lyapunov function candidates. We design the learner and the verifier based on the analytic center cutting-plane method, in which the verifier acts as the cutting-plane oracle to refine the set of Lyapunov function candidates. We show that when the set of Lyapunov functions is full-dimensional in the parameter space, the overall procedure finds a Lyapunov function in a finite number of iterations. We demonstrate the utility of the proposed method in searching for quadratic and piecewise quadratic Lyapunov functions.
Introduction
Deep Neural Networks (DNNs) are increasingly used as controllers in robotics and autonomous systems because they can handle complex, nonlinear tasks. However, DNNs are essentially "black boxes"—they lack the formal safety and stability guarantees required for high-stakes, safety-critical applications like autonomous driving or medical robotics. In control theory, the gold standard for proving stability is the Lyapunov function. If one can find a scalar function that always decreases as the system evolves toward an equilibrium, it serves as a mathematical "certificate" of stability.
The challenge is that finding these functions for neural-network-controlled systems is incredibly difficult. Traditional methods are either too conservative or computationally explosive. This research seeks to automate the search for these certificates for Piecewise Affine (PWA) systems—a broad class of systems that includes many real-world hybrid dynamics.
Methodology: The CEGIS Framework
The authors propose a Counterexample-Guided Inductive Synthesis (CEGIS) framework, which functions as a dialogue between two modules: a learner and a verifier.
The Learner
Based on a set of state samples, the learner proposes a candidate Lyapunov function. It uses the Analytic Center Cutting-Plane Method (ACCPM), solving a convex optimization problem to find the "middle" of the current feasible parameter space. This method ensures that each new counterexample significantly reduces the search space for potential Lyapunov functions.
The Verifier
This module takes the candidate and tries to prove it wrong. It formulates the search for a stability violation as a Mixed-Integer Quadratic Program (MIQP). Because ReLU neural networks and PWA systems are themselves piecewise linear, their behavior can be exactly encoded into this optimization framework. If the verifier finds a state where the Lyapunov condition fails (a counterexample), that state is fed back to the learner to add a new "cut" to its search space. This loop continues until a valid function is found or the search space is proven empty.
Key Insights and Results
- ReLU as PWA: A critical insight is that ReLU neural networks are technically Piecewise Affine functions. This allows the use of powerful Mixed-Integer Programming tools to analyze the "black box" with mathematical exactness.
- Finite-Step Guarantee: Unlike many learning-based methods, the authors prove that if a Lyapunov function exists within their chosen class, the ACCPM algorithm will find it in a finite number of iterations.
- Reducing Conservatism: By moving from simple quadratic functions to Piecewise Quadratic (PWQ) functions, the method can certify much larger "Regions of Attraction."
Experimental Performance
The method was evaluated on fundamental benchmarks:
- Double Integrator: The algorithm found a valid quadratic Lyapunov function in just 10 iterations (under 10 seconds).
- Inverted Pendulum with an Elastic Wall: This hybrid system required more complex PWQ functions. The search terminated successfully in 9 iterations (approximately 124 seconds), certifying stability even near the boundaries of the system's different modes (e.g., the transition between free motion and wall contact).
Conclusion and Future Work
While the framework is highly effective for small-to-medium-sized networks, the reliance on MIQP (which is NP-hard) presents a scalability challenge for massive deep networks. Future work will focus on extending this method to uncertain systems where the model isn't perfectly known and improving the scalability of the verifier to handle larger neural architectures.
Summary updated