  This work makes several contributions on stability and performance
verification of nonlinear dynamical systems controlled by neural networks.
First, we show that the stability and performance of a polynomial dynamical
system controlled by a neural network with semialgebraically representable
activation functions (e.g., ReLU) can be certified by convex semidefinite
programming. The result is based on the fact that the semialgebraic
representation of the activation functions and polynomial dynamics allows one
to search for a Lyapunov function using polynomial sum-of-squares methods.
Second, we remark that even in the case of a linear system controlled by a
neural network with ReLU activation functions, the problem of verifying
asymptotic stability is undecidable. Finally, under additional assumptions, we
establish a converse result on the existence of a polynomial Lyapunov function
for this class of systems. Numerical results with code available online on
examples of state-space dimension up to 50 and neural networks with several
hundred neurons and up to 30 layers demonstrate the method.
