Backward Reachability Analysis for Neural Feedback Loops

Nicholas Rober, Michael Everett, Jonathan P. HowarXiv 2022

TL;DR

This paper introduces a novel framework for the safety verification of neural feedback loops (NFLs) using backward reachability analysis. By leveraging linear programming and neural network relaxations, the authors developed two algorithms—BReach-LP and ReBReach-LP—that can efficiently certify safety in obstacle avoidance scenarios where traditional forward reachability methods often fail.

What Problem Does This Paper Address?

As neural networks (NNs) are increasingly deployed as controllers in safety-critical systems like self-driving cars and drones, we need mathematical guarantees that these systems won't crash. This is the domain of reachability analysis.

Most existing tools focus on forward reachability: starting from a set of initial states, they estimate all possible future states. However, forward reachability struggles with "divergent" scenarios. Imagine a robot approaching an obstacle; it might go left or right. A convex forward reachability estimate will often span the entire area—including the obstacle itself—leading to a "false alarm" where safety cannot be certified even if the controller is perfectly safe.

Backward reachability flips the script. It starts at the obstacle (the "avoid set") and works backward to find the Backprojection (BP) set: the collection of all initial states that could eventually lead to a collision. If your current state isn't in that BP set, you are guaranteed to be safe. The technical hurdle? Neural networks are non-linear and generally non-invertible, making it extremely difficult to "run them backward" to find these sets.

Fig. 1: Collision-avoidance scenario where backward reach- ability is able to correctly guarantee safety whereas forward reachability fails.

Methods

The authors propose a two-step algorithmic approach to overcome the non-invertibility of NNs:

  1. BReach-LP (Basic Reachability): This algorithm finds an over-approximation of the BP set for a single timestep. It uses CROWN, a state-of-the-art NN verification tool, to find affine (linear) bounds on the NN's control output for a given range of inputs. These bounds are then plugged into a series of Linear Programs (LPs) to calculate a hyper-rectangular box that contains all states that could reach the target set.
  2. ReBReach-LP (Refined Reachability): Iteratively calculating BP sets leads to the "wrapping effect," where errors accumulate over time. ReBReach-LP refines the estimates by adding constraints that require the system to trace back through the entire sequence of previously calculated BP sets, significantly tightening the bounds.

The distinction between these sets and their approximations is visualized in the paper's set-theoretic definitions:

Fig. 2: Backreachable, backprojection, and target sets. Given a target set, XT , the backreachable set R−1(XT ) contains all states for which some control exists to move the system to XT in one timestep. BP set P−1(XT ) contains all states for which the NN controller leads the system to XT . BP under- approximation ¯P−1(XT ) and over-approximation ¯P−1(XT ) contain states for which all and some, respectively, controls that the relaxed NN could apply lead the system to XT .

Datasets

The authors evaluated their methods using two standard dynamical system models rather than static image datasets:

  • Double Integrator Model: A classic benchmark for control theory representing basic 1D or 2D motion.
  • Linearized Ground Robot: A unicycle-style robot model used to demonstrate collision avoidance in a 2D plane. The NN controller for this robot was trained on $10^5$ data points generated from a specific vector field designed to steer the robot away from an obstacle at the origin.

Key Insights and Ideas

  • The "Exists" vs. "For All" Condition: The authors highlight a crucial logical distinction. For goal-seeking (reaching a target), you need an under-approximation ("for all" possible controls, I hit the goal). For obstacle avoidance, you need an over-approximation ("if there exists" any control that hits the obstacle, I need to know). This paper focuses on the latter.
  • Bypassing Invertibility: Instead of trying to invert the NN, they use forward relaxation tools (CROWN) to bound the NN's behavior within a specific region of the state space, then use those bounds as constraints in an optimization problem.
  • Efficiency through Partitioning: By splitting the state space into smaller cells (partitioning), they can find much tighter affine bounds for the NN, though this comes at a higher computational cost.

Key Results

  • Conservativeness Reduction: ReBReach-LP reduced the error (conservativeness) of the BP set estimates by up to 88% compared to the basic BReach-LP algorithm.
  • Certification Success: In the ground robot scenario, forward reachability tools (like Reach-LP) failed to certify safety because the reachable sets intersected the obstacle. BReach-LP successfully certified the system as safe because the initial state remained outside the calculated BP sets.
  • Computational Performance: For a double integrator, BReach-LP ran in ~1.35 seconds, while the more accurate ReBReach-LP took ~3.38 seconds—a modest increase for a massive gain in accuracy.
Fig. 3: Compare BP set estimates for a double integrator extending from the target set (red) calculated with BReach- LP (orange) and ReBReach-LP (blue).

Limitations and Future Work

  • Linear Dynamics: The current formulation assumes the underlying system dynamics (excluding the NN) are linear. The authors aim to extend this to non-linear dynamics in future work.
  • State Dimension Scaling: While the number of LPs solved scales linearly with state dimension, the partitioning strategy (splitting the space into grids) can suffer from the "curse of dimensionality." More efficient partitioning methods are needed for high-dimensional systems.
  • Symbolic Propagation: The authors suggest that incorporating symbolic propagation techniques could further reduce the conservativeness of the estimates.

Summary updated

BibTeX
@misc{rober2022backward,
  author = {Nicholas Rober and Michael Everett and Jonathan P. How},
  title = {{Backward Reachability Analysis for Neural Feedback Loops}},
  year = {2022},
  eprint = {2204.08319},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.08319},
}
Figure