TL;DR
This paper introduces a novel method for automatically synthesizing provably correct Lyapunov functions for non-linear dynamical systems. By combining machine learning (for learning candidate functions) with formal verification (using SMT solvers), they achieve a fully automated and sound approach that outperforms existing methods in speed and the size of domains for which stability can be certified.
What Problem Does This Paper Address?
Ensuring the stability of dynamical systems is crucial in many engineering fields, from robotics to control systems. A key tool for this is the Lyapunov function, which acts as a mathematical certificate of stability. However, finding these functions is notoriously difficult. Traditional methods fall into a few categories:
- Analytical methods: These are mathematically sound but require significant manual effort and expertise, often relying on the user to guess the form of the Lyapunov function.
- Numerical optimization methods: These can find candidate functions automatically but lack formal guarantees of correctness, often relying on approximations or being limited by machine precision.
- Symbolic computational methods: These offer formal guarantees but are typically semi-automatic, requiring the user to provide a "template" or structure for the Lyapunov function.
The gap this paper addresses is the need for a method that is fully automatic, formally sound, and capable of handling complex, non-linear systems without requiring manual intervention in specifying the function's structure.
Methods
The core of the proposed method is a Counterexample-Guided Inductive Synthesis (CEGIS) loop. This loop involves two main components:
- Learner (Numerical): This component uses machine learning, specifically a feed-forward neural network (Lyapunov Neural Network or LNN), to learn a candidate Lyapunov function. The network is trained using gradient descent to satisfy the Lyapunov conditions (decreasing energy along system trajectories and being non-negative) over a discrete set of sampled points from the system's state space. The paper highlights that using polynomial activation functions and a quadratic activation in the final layer can improve learning.
- Verifier (Formal): This component uses Satisfiability Modulo Theories (SMT) solvers to formally check if the candidate LNN satisfies the Lyapunov conditions over the entire specified domain. If the verifier finds a state where the conditions are violated (a counterexample), it returns this counterexample to the learner.
The CEGIS loop works as follows:
- The learner trains an LNN on an initial set of samples.
- The verifier checks if the LNN is a valid Lyapunov function over the entire domain.
- If the verifier finds a counterexample, it's added to the learner's sample set, and the learner retrains the LNN.
- This process repeats until the verifier can no longer find any counterexamples, at which point the LNN is formally proven to be a correct Lyapunov function for the given system and domain.
The paper emphasizes that their method uses neural networks with polynomial activations and supports arbitrary depth and width, offering significant learning capabilities. The formal verification leverages SMT solvers capable of handling non-linear real arithmetic for polynomial constraints, ensuring sound and complete verification.
Datasets
The paper does not introduce new datasets for training. Instead, it uses simulated data points sampled from the state space of the dynamical systems being analyzed. The evaluation is performed on several non-trivial benchmarks of polynomial ordinary differential equations (ODEs), including:
- A planar dynamical system (Eq. 5)
- A system with a positive orthant domain (Eq. 13)
- Two other systems described by ODEs (Eq. 14 and 15)
These benchmarks are chosen because they are challenging and do not admit simple polynomial Lyapunov functions over their entire state space. The evaluation focuses on the size of the domain (radius $\gamma$) for which a Lyapunov function can be found.
Key Insights and Ideas
- Bridging ML and Formal Methods: The most significant insight is the successful integration of machine learning's powerful function approximation capabilities with the formal guarantees of SMT solvers. This allows for automated synthesis of provably correct stability certificates.
- LNNs as General Templates: By using neural networks with flexible architectures (depth, width, polynomial activations) instead of fixed symbolic templates, the method can discover a wider range of Lyapunov functions, potentially overcoming limitations of prior template-based approaches.
- CEGIS for Formal Synthesis: The CEGIS loop is a robust framework for iteratively refining candidate solutions. In this context, it effectively guides the learner to produce functions that satisfy formal properties, rather than just fitting data.
- Formal Soundness without Manual Effort: The method achieves formal guarantees without requiring users to specify the structure of the Lyapunov function, a major bottleneck in previous formal methods.
Key Results
- Formal Guarantees: The method provides provably correct Lyapunov functions, guaranteeing asymptotic stability within the certified domain.
- Automation: The synthesis process is fully automatic, requiring no manual specification of Lyapunov function templates.
- Performance: Compared to existing methods (numerical optimization, symbolic template-based, and a prior LNN approach), their method synthesizes Lyapunov functions faster and over wider spatial domains.
- Specific Benchmark Results:
- For the planar system (Eq. 5), they achieved comparable or wider domains than alternatives in shorter or comparable time.
- In comparisons with NLC, CBS, and SOSTOOLS on challenging systems, their LNN approach was faster and certified stability over significantly larger domains (e.g., $\gamma \ge 100$ for all models).
- SOSTOOLS, while fast, often returned ill-conditioned coefficients that led to verification timeouts.
Limitations and Future Work
- Termination: The authors acknowledge that CEGIS procedures are not guaranteed to terminate in general. While their method performs well in practice, theoretical guarantees on termination are not provided.
- System Dimensionality: The performance of the verifier is sensitive to the dimensionality of the system. Scalable verification for high-dimensional systems remains an active area of research.
- Future Work: The authors suggest that future work should focus on improving the scalability of verification for higher-dimensional systems and exploring extensions to more complex system classes, such as switched systems or systems with inputs. They also note the potential for this framework to be applied to automated control synthesis.
Summary updated