Table of Contents
Fetching ...

Forward and Backward Reachability Analysis of Closed-loop Recurrent Neural Networks via Hybrid Zonotopes

Yuhao Zhang, Xiangru Xu

Abstract

Recurrent neural networks (RNNs) are widely employed to model complex dynamical systems due to their hidden-state structure, which inherently captures temporal dependencies. This work presents a hybrid zonotope-based approach for computing exact forward and backward reachable sets of closed-loop RNN systems with ReLU activation functions. The method formulates state-pair sets to compute reachable sets as hybrid zonotopes without requiring unrolling. To improve scalability, a tunable relaxation scheme is proposed that ranks unstable ReLU units across all layers using a triangle-area score and selectively applies convex relaxations within a fixed binary limit in the hybrid zonotopes. This scheme enables an explicit tradeoff between computational complexity and approximation accuracy, with exact reachability as a special case. In addition, a sufficient condition is derived to certify the safety of closed-loop RNN systems. Numerical examples demonstrate the effectiveness of the proposed approach.

Forward and Backward Reachability Analysis of Closed-loop Recurrent Neural Networks via Hybrid Zonotopes

Abstract

Recurrent neural networks (RNNs) are widely employed to model complex dynamical systems due to their hidden-state structure, which inherently captures temporal dependencies. This work presents a hybrid zonotope-based approach for computing exact forward and backward reachable sets of closed-loop RNN systems with ReLU activation functions. The method formulates state-pair sets to compute reachable sets as hybrid zonotopes without requiring unrolling. To improve scalability, a tunable relaxation scheme is proposed that ranks unstable ReLU units across all layers using a triangle-area score and selectively applies convex relaxations within a fixed binary limit in the hybrid zonotopes. This scheme enables an explicit tradeoff between computational complexity and approximation accuracy, with exact reachability as a special case. In addition, a sufficient condition is derived to certify the safety of closed-loop RNN systems. Numerical examples demonstrate the effectiveness of the proposed approach.
Paper Structure (12 sections, 18 equations, 5 figures, 2 algorithms)

This paper contains 12 sections, 18 equations, 5 figures, 2 algorithms.

Figures (5)

  • Figure 1: (a) Diagram of an isolated $L$-layered RNN. (b) Diagram of a closed-loop RNN system comprising of an RNN plant and an RNN controller.
  • Figure 2: The graph of a ReLU function over $[\![\alpha,\beta]\!]$ can be represented as an HZ. (a) Graph $\mathcal{H}_{\pm}$ with $\alpha < 0 < \beta$. (b) The triangle over-approximation of the graph $\mathcal{H}_{\triangle} \supset \mathcal{H}_\pm$. The area of $\mathcal{H}_{\triangle}$ is $-\frac{\alpha\cdot\beta}{2}$.
  • Figure 3: Over-approximated FRSs for a closed-loop RNN in Example \ref{['exp1']}, with varying values of binary limit parameter $N_b$. The size of the over-approximated reachable sets decreases monotonically as $N_b$ increases.
  • Figure 4: FRSs of the mass–spring–damper system: exact sets shown with black boundaries, and over-approximated sets shown without boundaries.
  • Figure 5: BRSs and the corresponding unsafe sequence set.

Theorems & Definitions (4)

  • proof
  • proof
  • proof
  • proof