Estimation of Constraint Admissible Invariant Set with Neural Lyapunov Function

Dabin Kim, H. Jin Kim

Introduction

In the deployment of autonomous systems, ensuring safety is a primary concern. Formally, safety is often defined as the ability of a system to remain within a specific, predefined region of the state space—avoiding collisions, preventing mechanical overextension, or maintaining stability. This requirement is mathematically captured by the concept of a Constraint Admissible Positively Invariant (CAPI) set. If a system's state begins within a CAPI set, it is guaranteed to remain within that set indefinitely under a given control law.

While the concept is straightforward, calculating the largest possible CAPI set for nonlinear systems is a significant computational challenge. Traditional approaches, such as Sum-of-Squares (SOS) optimization, are often limited by the complexity of the system dynamics or are restricted to fixed equilibrium points. This paper introduces a novel framework that leverages the piecewise-affine (PWA) structure of Neural Lyapunov Functions (NLFs) to efficiently estimate these safe zones, enabling real-time safety guarantees for complex nonlinear tasks.

Methodology

Neural Lyapunov Functions and PWA Structure

The authors utilize Neural Lyapunov Functions—neural networks trained to serve as "energy functions" that prove a system's stability. By specifically employing networks with Rectified Linear Unit (ReLU) activation functions, the authors exploit the fact that these networks are piecewise-affine. This means the entire state space is partitioned into a collection of polyhedral regions (patches), within which the neural network behaves as a simple linear function.

From MILP to Linear Programming

Previous attempts to find invariant sets using neural networks often relied on Mixed-Integer Linear Programming (MILP). While robust, MILP is NP-hard and computationally prohibitive for real-time applications. The core technical breakthrough of this work is the transformation of the global optimization problem into a series of simple Linear Programs (LPs).

By constructing a Partition Tree, the authors can systematically map out the affine patches of the ReLU network. Instead of solving one massive, complex problem, they solve a sequence of LPs across these patches to find the maximal admissible level set (denoted as $\Gamma^*$). This level set represents the highest "energy" the system can possess without violating state constraints.

Optimization and Pruning

To maintain efficiency, the authors introduced two pruning strategies (PS1 and PS2). These strategies allow the algorithm to skip patches that are either mathematically unreachable or irrelevant to the boundary of the safety set. This significantly reduces the number of subproblems that must be solved without sacrificing the accuracy of the CAPI set estimation.

Real-Time Inference via CEGIS

Even with optimized LPs, calculating a CAPI set from scratch during every control cycle is too slow for high-frequency robotics. To bridge this gap, the authors trained a secondary Estimator network using a Counterexample-Guided Inductive Synthesis (CEGIS) framework. This estimator learns the relationship between the system's reference goal and the corresponding safety boundary, allowing it to provide safety parameters in microseconds during live operation.

Experimental Results

The proposed method was evaluated on two standard nonlinear control benchmarks: the Inverted Pendulum and the Cart-Pole system.

Computational Efficiency

In the 4D Cart-Pole environment, the implementation of pruning strategies reduced the average computation time for finding the maximal safe level from 26.0ms to 21.4ms. More importantly, the trained Estimator network achieved inference speeds of 14.2 microseconds. This level of performance is critical for integration into high-frequency control loops (e.g., 1kHz or higher).

Safety Performance

The CAPI sets were integrated with an Explicit Reference Governor (ERG). In comparative tests, systems using the NLF-based CAPI sets successfully balanced the cart-pole while strictly adhering to position and velocity constraints. In contrast, standard controllers without these safety sets frequently entered unsafe regions of the state space when subjected to aggressive reference changes.

Discussion and Future Work

While this approach offers a significant leap in computational efficiency for nonlinear safety, it is not without limitations. The quality of the CAPI set is inherently dependent on the quality of the pre-trained Neural Lyapunov Function. If the NLF is overly conservative, the resulting safe set will be smaller than necessary. Furthermore, while LPs are efficient, the number of patches in a neural network grows with its depth and width, posing potential scalability challenges for very high-dimensional systems.

Future research directions include the development of joint optimization techniques, where the Lyapunov function and the CAPI set are learned simultaneously to maximize the safe volume. Additionally, exploring contraction theory could provide a path toward safety guarantees that do not rely on the explicit discovery of Lyapunov functions.

Summary updated

BibTeX
@inproceedings{kim2024estimation,
  author = {Dabin Kim and H. Jin Kim},
  title = {{Estimation of Constraint Admissible Invariant Set with Neural Lyapunov Function}},
  booktitle = {CDC},
  year = {2024},
  doi = {10.1109/cdc56724.2024.10886505},
}
Figure