Introduction
Ensuring the stability of non-linear dynamical systems is a cornerstone of control engineering. A system is considered stable if it returns to or remains near an equilibrium state despite perturbations. Mathematically, this is typically established using a Lyapunov function $V(x)$—a scalar function that acts as a generalized energy metric. For a system to be stable, $V(x)$ must be positive definite and its time derivative $\dot{V}(x)$ along the system's trajectories must be negative definite.
Despite their utility, discovering Lyapunov functions for complex non-linear systems remains a significant challenge. Traditional analytical methods require deep mathematical intuition, while numerical optimization techniques often lack formal guarantees. Symbolic methods, while rigorous, typically rely on rigid polynomial templates that may not capture the nuances of complex stability regions. This paper presents a novel framework for the automated synthesis of Lyapunov Neural Networks (LNNs), combining the flexibility of deep learning with the rigor of formal verification.
The CEGIS Framework
The proposed approach utilizes a Counterexample-Guided Inductive Synthesis (CEGIS) loop to iteratively refine a candidate Lyapunov function. This architecture, illustrated in Figure 1, consists of two primary components: a numerical learner and a symbolic verifier.
The Learner employs a feed-forward neural network to represent the Lyapunov function $V$. To ensure the network satisfies the basic requirement $V(0)=0$, the authors design the architecture without additive biases. Furthermore, they utilize polynomial activation functions (e.g., $x^2$) and a quadratic last layer with positive weights to bias the network toward positive definiteness. The learner minimizes a custom loss function based on Leaky ReLU, which penalizes violations of the Lyapunov conditions ($V \leq 0$ or $\dot{V} \geq 0$) across a set of sample points.
The Verifier takes the candidate network and uses a Satisfiability Modulo Theories (SMT) solver—specifically Z3—to search for any point in the continuous state space that violates the Lyapunov criteria. If such a "counterexample" is found, it is added to the learner's training set, and the network is retrained. This process continues until the verifier proves that no counterexamples exist within the specified domain.
Iterative Refinement and Key Insights
The use of neural networks as "universal templates" allows the framework to discover complex stability certificates without requiring the user to guess the correct polynomial degree. As the CEGIS loop progresses, the learner adapts the shape of the Lyapunov surface to accommodate the constraints imposed by the verifier's counterexamples.
A key advantage of this method is its ability to provide formal guarantees for what are typically considered "black box" models. By integrating the SMT solver, the authors transform the neural network into a "white box" formal certificate of asymptotic stability. Unlike previous neural approaches that only ensured "practical" stability (where the system stays within a small neighborhood of the origin), this framework proves that the system actually converges to the equilibrium point.
Experimental Results
The LNN framework was evaluated against four challenging non-linear benchmark systems. These benchmarks were selected because they do not possess simple, global polynomial Lyapunov functions, making them difficult for traditional tools.
The authors compared LNN against several state-of-the-art methods, including SOSTOOLS (numerical optimization), CBS (symbolic template-based synthesis), and NLC (a prior neural Lyapunov approach). The results demonstrated that LNN significantly outperforms existing methods in terms of both scalability and speed.
- Wider Domains: LNN successfully synthesized Lyapunov functions for domains with a radius up to 1000, whereas CBS and NLC often failed or timed out at a radius of 1.
- Speed: In one specific benchmark, LNN found a solution in just 0.32 seconds, compared to 54 seconds for NLC.
- Robustness: While numerical tools like SOSTOOLS are fast, they often produce ill-conditioned results that fail formal verification; LNN consistently produced robust, verifiable certificates.
Conclusion and Future Work
The synthesis of Lyapunov Neural Networks via a CEGIS loop represents a significant step forward in automated formal verification for dynamical systems. By bridging the gap between flexible machine learning and rigorous symbolic logic, the framework enables the discovery of stability proofs for systems that were previously intractable.
While the current approach is highly effective for low-to-medium dimensional systems, the computational cost of SMT solvers remains a bottleneck for high-dimensional applications. Future research will focus on scaling the verifier to handle more complex systems and extending the framework to synthesize both stability proofs and controllers simultaneously through Control Lyapunov Functions (CLFs).
Summary updated