Learning-enabled Polynomial Lyapunov Function Synthesis via High-Accuracy Counterexample-Guided Framework

Hanrui Zhao, Niuniu Qi, Mengxin Ren, Banglong Liu, Shuming Shi, Zhengfeng YangCVPR 2025

Abstract

Synthesizing Lyapunov functions is a fundamental challenge in control theory for proving the stability of nonlinear dynamical systems. Traditional methods often rely on manual template selection or struggle with scalability. This paper presents SynNLF, an automated framework that integrates polynomial neural networks with formal Sum-of-Squares (SOS) verification. By employing a high-accuracy counterexample-guided inductive synthesis (CEGIS) loop, SynNLF identifies worst-case violations to iteratively refine the learned Lyapunov candidate. Experimental results across 20 benchmark systems demonstrate that SynNLF achieves a 100% success rate, significantly outperforming state-of-the-art SMT-based and classical SOS tools in both efficiency and the size of the identified Region of Attraction (ROA).

Introduction

In the design of autonomous systems, such as drones or chemical reactors, stability is paramount. A system is stable if it settles into a desired equilibrium point after a disturbance. Control theorists prove this using Lyapunov functions ($V(x)$), which must satisfy specific mathematical conditions regarding the system's state and its derivative.

However, finding an appropriate Lyapunov function is notoriously difficult for complex nonlinear systems. Classical numerical methods like SOS optimization require experts to pre-define the "shape" or template of the function. Conversely, deep learning approaches offer flexibility but typically produce "black-box" models that are difficult to verify formally. Existing formal synthesis tools using Satisfiability Modulo Theories (SMT) solvers often fail to scale as system dimensionality increases.

Methodology: The SynNLF Framework

SynNLF addresses these challenges through an iterative "Learner-Verifier" architecture that bridges the gap between the flexibility of AI and the rigor of formal methods.

Overview of the SynNLF framework, showing the iterative loop between the polynomial neural network learner and the SOS-based verifier.

1. The Learner (Polynomial Neural Network)

Unlike standard deep learning architectures, the SynNLF learner uses a specialized neural network designed for polynomial expansion. By employing specific modes—Squ (squaring), Mul (multiplication), and Ski (skip-connections)—the network is constrained to output a pure polynomial. This architectural constraint ensures that the learned candidate function is inherently compatible with formal mathematical verification tools. Furthermore, by removing bias terms, the condition $V(0) = 0$ is satisfied by construction.

2. The Verifier (SOS & LMI)

The verifier evaluates the candidate $V(x)$ against Lyapunov stability conditions. It leverages Putinar’s Positivstellensatz to transform these conditions into a Linear Matrix Inequality (LMI) problem. This allows the framework to use efficient semidefinite programming (SDP) solvers to formally prove whether the candidate function is a valid Lyapunov function over the specified state domain.

3. High-Accuracy Counterexample Guidance

A key innovation of SynNLF is its handling of verification failures. When a candidate is rejected, the verifier identifies the worst-case counterexample—the point where stability conditions are most severely violated. Instead of simple random sampling, SynNLF constructs a minimum-volume ellipsoid around this point to generate a high-quality dataset for the next training iteration. This targeted sampling strategy allows the learner to correct its errors much faster than traditional methods.

Experimental Results

The framework was rigorously tested on a suite of 20 nonlinear dynamical systems (ranging from 2 to 6 dimensions), including the well-known Van der Pol Oscillator.

Success Rate and Efficiency

SynNLF successfully synthesized valid Lyapunov functions for all 20 benchmarks. In contrast, state-of-the-art SMT-based tools like FOSSIL 1.0 and 2.0 solved only 10 and 12 cases, respectively, while traditional SOSTOOLS solved 9. Beyond reliability, SynNLF demonstrated superior efficiency, achieving a 4.73x speedup over FOSSIL 2.0 on shared successful cases.

Region of Attraction (ROA) Analysis

A critical metric for Lyapunov functions is the size of the "safe zone" or Region of Attraction (ROA) they can certify. As shown in the figure below, SynNLF identifies a significantly larger ROA compared to classical SOS methods and previous neural synthesis approaches. This indicates that the learned polynomial functions are more expressive and provide more robust proofs of stability.

Visualization of the learned Neural Lyapunov function and a comparison of the identified Region of Attraction (ROA) against other methods.

Conclusion

SynNLF represents a significant step forward in automated stability analysis. By bridging the gap between the expressive power of neural networks and the rigor of formal SOS verification, it provides a scalable and reliable solution for synthesizing Lyapunov functions. Future research will explore extending this framework to Neural Barrier Functions for safety-critical applications and handling systems with non-polynomial dynamics through automated Taylor approximations.

Summary updated

BibTeX
@inproceedings{zhao2025learning,
  author = {Hanrui Zhao and Niuniu Qi and Mengxin Ren and Banglong Liu and Shuming Shi and Zhengfeng Yang},
  title = {{Learning-enabled Polynomial Lyapunov Function Synthesis via High-Accuracy Counterexample-Guided Framework}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00961},
}
Figure