Manuscript Offprint

arXiv:2610.05689

Toward AI Trustworthiness: Finding Analytically Proven Forward-Invariant Sets for AI-Controlled Systems

Haoyang Song, Xikun Yang, Qixin Wang

Haoyang Song 1^{1}, Qixin Wang 2^{2}, XikunYang 2^{2},

Department of Computing, The Hong Kong Polytechnic University, Hong Kong SAR, China.

Email: haoyang.song@connect.polyu.hk

csqwang@polyu.edu.hk

frank-xikun.yang@connect.polyu.hk

Abstract—The rise of Neural Network (NN) based AI fosters increasing demands to apply AI in control applications, particularly, to generate AI-controllers for nonlinear control applications, where traditional control theories often fail to work well. However, such AI-controlled systems are well-known to be highly nonlinear, and hard to explain/verify, leading to trustworthiness concerns. On the other hand, many AI-controlled systems are safety/mission critical, it often needs to be certifiably trustworthy. But due to the aforementioned trustworthiness concerns, certification legal/regulatory authorities are deterred from approving the AI-controlled systems. A key solution to address the trustworthiness concerns is to find a Forward-Invariant Set (FIS) for the AI-controlled systems. A FIS is a subset of the state space of the controlled target, so that starting from any state inside of the FIS, the future state trajectory remains inside the FIS. If the FIS does not intersect with any concerned unsafe state set, the legal/regulatory authorities can be assured of the trustworthiness of the AI-controlled system. However, finding the FIS for a given (e.g. by the control system vendor to the authority for certification) AI-controlled system is a well-known hard problem. In this paper, we propose a solution to find analytically proven FISs for given AI-controlled systems. We propose to use an Invertible NN (INN) to transform the original state space into a latent state space, to reduce the high nonlinearity of the original AI-controlled system, so as to increase the likelihood of a regular-shaped FIS. We further propose a procedure to stimulate the INN to converge to a preferred hyper-rectangular FIS candidate and conduct verification. We proved that, when this procedure returns success, the hyper-rectangular FIS candidate (and its INN inversely transformed counterpart in the original state space) is an analytically proven FIS. We conducted extensive trials on representative AI-controlled system testbeds. Our solution succeeded in finding FISs for all the testbeds. Meanwhile, to our best knowledge, there is no other work in the literature that addresses exactly the same problem as ours. The best we can compare with is a baseline solution adapted from a state-of-the-art solution for a related (but not the same) problem. The baseline solution failed to find any FIS for our testbeds. Furthermore, for 40 of the 45 testbeds, our solution's time costs are significantly smaller than those of the baseline solution's. The centers of our found FISs also roughly meet the preferences set by domain experts.

I. INTRODUCTION

The rise of Neural Network (NN) based AI (simplified as “AI” in the following) [1] [2] [3] fosters increasing demands to apply AI in control applications. Such demands are particularly valid for nonlinear control applications, where traditional control theories often fail to work well [4] [5] [6] [7]. (par1)

For such control applications, AI does make significant progresses: various novel AI generated controllers (simplified as “AI-controllers” in the following) are reported [7] [8] [9] [10]. However, adoption of AI-controllers is still hampered by their trustworthiness.

On one hand, AI generated models, including AI-controllers, are well-known to be highly nonlinear, and hard to explain/verify. Particularly, the difficulty often worsens for those nonlinear control applications, where traditional control theories cannot work well (hence need AI-controllers). On the other hand, many nonlinear control applications are safety or mission critical, such as aviation, smart driving, surgical robots etc. Such applications often demand certifiably trustworthy controllers due to legal or regulatory requirements [11] [12] [13]. If an AI-controller cannot be explained/verified, authorities would not dare to issue the necessary legal/regulatory certificates to approve the adoption of the AI-controller. In other words, the authorities cannot trust such AI-controllers.

(par2)

To address the above trustworthiness problem, an AI-controlled system should better guarantee proven safety.

To guarantee proven safety, one approach is to find a so-called Forward-Invariant Set (FIS) for the AI-controlled system, where the FIS does not intersect with the set of concerned unsafe states. These concepts are explained as follows.

First, any control application has its control target, aka plant. For example, a robotic control system's plant is the physical robot. The state of the plant (simplified as “state” in the following) at time instance t can be denoted as a vector x⃗(t)∈Rn\vec{x}(t) \in \mathbb{R}^n, where Rn\mathbb{R}^n is called the n-dimensional state space, and each dimension of x⃗(t)\vec{x}(t) is also called a component of the state. (par3)

Second, a FIS I\mathcal{I} is a subset of Rn\mathbb{R}^n, where given any initial time instance t0t_0, then for any initial state x⃗(t0)∈I\vec{x}(t_0) \in \mathcal{I}, the future state trajectory {x⃗(t)}t∈[t0,+∞)\{\vec{x}(t)\}_{t \in [t_0, +\infty)} always remains in I\mathcal{I}. (par4)

Third, the set F\mathcal{F} of concerned unsafe states is another subset of Rn\mathbb{R}^n, whose elements (aka unsafe states) are states considered unsafe by the legal/regulatory authority. Often, we also call F\mathcal{F} the forbidden set; and call Fˉ=def(Rn−F)\bar{\mathcal{F}} \stackrel{\text{def}}{=} (\mathbb{R}^n - \mathcal{F}) the safe set. (par5)

If a FIS I\mathcal{I} is found, and I∩F=∅\mathcal{I} \cap \mathcal{F} = \varnothing is proven, then the AI-controlled system guarantees proven safety. Specifically, any state trajectory {x⃗(t)}t∈[t0,+∞)\{\vec{x}(t)\}_{t \in [t_0, +\infty)} starting from an initial state x⃗(t0)∈I\vec{x}(t_0) \in \mathcal{I} is guaranteed to be safe: as {x⃗(t)}t∈[t0,+∞)⊆I\{\vec{x}(t)\}_{t \in [t_0, +\infty)} \subseteq \mathcal{I} (due to the definition of FIS, see (par4)) implies {x⃗(t)}t∈[t0,+∞)∩F=∅\{\vec{x}(t)\}_{t \in [t_0, +\infty)} \cap \mathcal{F} = \varnothing (due to I∩F=∅\mathcal{I} \cap \mathcal{F} = \varnothing). The legal/regulatory authority can thus trust the AI-controlled system, given the initial state x⃗(t0)∈I\vec{x}(t_0) \in \mathcal{I}. (par6)

However, how to find the FIS I is a well-known difficult problem [14] [15], especially when the dynamics of the system involve high nonlinearity, which is a feature of AI-controlled systems (see (par2)). To our best knowledge, the state-of-the-art solution is by Yang et al. [14]. Specifically, Yang et al. [14] propose to jointly train the AI-controller and a Lyapunov function 1^{1}, so that if the training succeeds, the outputted Lyapunov function also implies a FIS. However, in this method, the AI-controller is supposed to be jointly adjusted with the Lyapunov function (and the implied FIS) throughout the training. The method is not intended for problems where the AI-controller is given a priori (e.g., provided by a control system vendor to the legal/regulatory authority for certification). Such problems, however, are the focus of this paper.

In summary, the focus of this paper is to find a FIS for an AI-controlled system S, where the AI-controller is given a priori. We propose the following solution heuristics. (par7)

First, we notice a state-of-the-art verification tool, α\alpha, β\beta-CROWN [16] [17] [18] [19], which can analytically prove if a given polytope (see (3)) B\mathcal{B} actually bounds an NN's outputs on a given hyper-rectangular (see (2)) input domain of concern. Consider SS holistically as an NN, whose input is the original state x⃗(t)\vec{x}(t), and the output is the next state x⃗(t+δ)\vec{x}(t + \delta) (where δ\delta is the sensing/actuation period, see Section IV for more discussions on discretization), i.e. both the input domain and output range are subsets of the nn-dimensional state space. Then SS can be analyzed by α\alpha, β\beta-CROWN. Specifically, given a hyper-rectangular input domain of concern X⊆Rn\mathcal{X} \subseteq \mathbb{R}^n, denote the corresponding output range of SS as S(X)⊆RnS(\mathcal{X}) \subseteq \mathbb{R}^n. Let B=X\mathcal{B} = \mathcal{X} (note hyper-rectangle is polytope). Then if α\alpha, β\beta-CROWN can analytically prove that S(X)⊆B=XS(\mathcal{X}) \subseteq \mathcal{B} = \mathcal{X}, then X\mathcal{X} is intuitively a FIS. That is, α\alpha, β\beta-CROWN can help us analytically prove whether a hyper-rectangular FIS candidate X\mathcal{X} is actually a FIS for SS.

However, α\alpha, β\beta-CROWN requires X\mathcal{X} to be hyper-rectangular. The chance that a highly nonlinear system SS's FIS has a hyper-rectangular shape is low. To cope with this, we propose to

Figure

Fig. 1: Solution heuristics: a hyper-rectangular FIS constructed and proven in the latent state space maps to a nonlinear FIS in the original state space.

construct a transformation function T\mathcal{T} and its inverse T−1\mathcal{T}^{-1}, to transform the original nn-dimensional state space X0\mathbb{X}_0 to another (aka the latent) nn-dimensional state space X1\mathbb{X}_1, so that SS's nonlinear behaviors in X0\mathbb{X}_0 become more regular (to be formally defined in (par20)) in X1\mathbb{X}_1. We propose to use the tool of Invertible NN (INN) [20] to find such T\mathcal{T} and T−1\mathcal{T}^{-1}. (par8)

Specifically, in X1\mathbb{X}_1, we shall specify an intended hyper-rectangle I1\mathcal{I}_1 to be the FIS candidate. We train the INN of T\mathcal{T} and T−1\mathcal{T}^{-1}, so that I1\mathcal{I}_1 looks like a FIS for the transformed SS in X1\mathbb{X}_1. Once the training succeeds, we shall exploit α\alpha, β\beta-CROWN to analytically prove if I1\mathcal{I}_1 is actually a FIS for the transformed SS in X1\mathbb{X}_1. If so, I0=T−1(I1)\mathcal{I}_0 = \mathcal{T}^{-1}(\mathcal{I}_1) (i.e. inverse transform I1\mathcal{I}_1 from X1\mathbb{X}_1 to X0\mathbb{X}_0, see (10)) shall be the FIS for SS in X0\mathbb{X}_0. Note we do not adjust I1\mathcal{I}_1, instead, we adjust the INN, as the latter can automatically adjust itself using backpropagation from a well designed loss function. (par9)

The above heuristics are illustrated by Fig. 1.

In summary, this paper makes the following contributions.

  1. We propose a solution to find a FIS for an AI-controlled system S, where the AI-controller is given a priori. Specifically, our solution exploits INN to transform the complex and highly nonlinear S from the original state space X0X_0 to a latent state space X1X_1, so that the transformed S becomes more regular. We propose a specially designed loss function and training set, to train the INN, so that a hyper-rectangular FIS candidate I1I_1 becomes more likely a real FIS for the transformed S in X1X_1.

  2. We theoretically prove that if I1I_1 in X1X_1 can pass a certain test by α\alpha, β\beta-CROWN, then it is an analytically proven hyper-rectangular FIS for SS in X1X_1, and its INN inverse transformed counterpart I0I_0 in X0X_0 is an analytically proven FIS for SS in X0X_0.

  3. We carried out extensive evaluations on various AI-controlled systems. Our proposed solution finds analytically proven FISs for all of them, while the state-of-the-art baseline solution finds none. Our solution also achieves significantly smaller time costs on 40 of the 45 evaluated AI-controlled systems; and the centers of the found FISs also roughly meet the preferences set by domain experts.

The rest of the paper is organized as follows. Section II discusses related work. Section III introduces background technologies. Section IV formulates the problem. Section V proposes and analyzes our solution. Section VI evaluates our solution. Section VII concludes the paper.

1^{1}Lyapunov function intuitively is a pseudo potential energy defined upon the states, with certain properties, such as always decreasing along any state trajectories. Traditional control theories often turn a controller design problem into a Lyapunov function construction problem [4]. If the controller can be adjusted, so that a Lyapunov function can be constructed for the controlled system for a given initial state set, then the given initial state set is a FIS; in other words, the controller has a FIS, hence is stable. However, when the system is highly nonlinear, there is no generic solution to adjust the controller and construct the Lyapunov function.

References (47)

  • Deep learning
  • Human-level control through deep reinforcement learning
  • An introduction
  • Upper Saddle River, N.J.: Prentice Hall, 2002
  • A tour of reinforcement learning: The view from continuous control
  • Reinforcement learning in robotics: A survey
  • Learning agile and dynamic motor skills for legged robots
  • Continuous control with deep reinforcement learning (opens arXiv in a new tab)
  • Real-world humanoid locomotion with reinforcement learning
  • Safety critical systems: challenges and directions
  • Control barrier function based quadratic programs for safety critical systems
  • A survey of motion planning and control techniques for self-driving urban vehicles
  • Lyapunov-stable neural control for state and output feedback: A novel formulation
  • Overt: an algorithm for safety verification of neural network control policies for nonlinear systems
  • Efficient neural network robustness certification with general activation functions (opens arXiv in a new tab)
  • Beta-crown: Efficient bound propagation with per-neuron split constraints for neural network robustness verification
  • Fast and complete: Enabling complete neural network verification with rapid and massively parallel incomplete verifiers (opens arXiv in a new tab)
  • Automatic perturbation analysis for scalable certified robustness and beyond
  • Density estimation using real NVP
  • Set invariance in control
  • SIAM, 1994
  • A linear matrix inequality approach to $H_{\infty}$ control
  • Pearson, 2014
  • Review on computational methods for lyapunov functions
  • Methods of A.M. Lyapunov and their application
  • A generalization of Zubov’s method to perturbed systems
  • On the construction of lyapunov functions using the sum of squares decomposition
  • Stability region analysis using simulations and sum-of-squares programming
  • Some extensions of Liapunov’s second method
  • applications of Lyapunov's second method to differential systems and equations with delay
  • The variable gradient method for generating liapunov functions
  • An algorithm for constructing lyapunov functions based on the variable gradient method
  • MIT press, 2023
  • Neural Lyapunov control of unknown nonlinear systems with stability guarantees
  • Stability verification of neural network controllers using mixed-integer programming
  • Hamilton-Jacobi reachability in reinforcement learning: A survey
  • Stability analysis using quadratic constraints for systems with neural network controllers
  • Forward invariance in neural network controlled systems
  • Theory and Design, 3rd ed. Prentice Hall, 1997
  • Towards Deep Learning Models Resistant to Adversarial Attacks
  • Gymnasium: A standard interface for reinforcement learning environments
  • Stable-baselines3: Reliable reinforcement learning implementations
  • John Wiley & Sons, 2008
  • Springer London, 2012
  • Neural Lyapunov control for discrete-time systems
  • Stable baselines3
  • stable-baselines3