Abstract
Reachability analysis is a promising technique to automatically prove or disprove the reliability and safety of AI-empowered software systems that are developed by using Deep Reinforcement Learning (DRL). Existing approaches suffer however from limited scalability and large overestimation as they must over-approximate the complex and almost inexplicable system components, namely deep neural networks (DNNs). In this paper we propose a novel, tight and scalable reachability analysis approach for DRL systems. By training on abstract states, our approach treats the embedded DNNs as black boxes to avoid the over-approximation for neural networks in computing reachable sets. To tackle the state explosion problem inherent to abstraction-based approaches, we devise a novel adjacent interval aggregation algorithm which balances the growth of abstract states and the overestimation caused by the abstraction. We implement a tool, called BBReach, and assess it on an extensive benchmark of control systems to demonstrate its tightness, scalability, and efficiency.
Introduction
Ensuring the safety of physical systems controlled by deep neural networks (DNNs)—such as autonomous vehicles or robotic controllers—is a critical challenge. Reachability analysis aims to verify safety by calculating the set of all possible future states the system can reach from a given set of initial conditions. If this reachable set never intersects with defined "unsafe regions," the system is proven safe.
Traditional "white-box" verification tools attempt to approximate DNN behavior using mathematical models like Taylor models. However, these methods often suffer from "overestimation blowup," where small approximation errors accumulate over time, leading to overly conservative and practically useless safety bounds. Furthermore, many existing tools are restricted to specific network architectures or activation functions.
Methodology: Abstraction-Based Training and BBReach
To address these limitations, we introduce Abstraction-Based Training. Instead of verifying a pre-trained network, we design the network to be verifiable by construction.
1. The Abstraction Layer
We insert a specialized abstraction layer between the input and the first hidden layer. This layer discretizes the continuous input space into interval boxes. Consequently, the network produces a constant output action for any state within a specific box, effectively transforming the DNN into a predictable "black-box oracle" over these regions.
2. Reachability Computation
The BBReach tool performs reachability analysis through a multi-step process:
- Interval Segmentation: The current state set is partitioned into boxes matching the network's abstraction.
- Black-Box Querying: The tool queries the network for the specific action associated with each interval box.
- Propagation: Standard Taylor models are used to calculate the physical system's evolution based on the retrieved actions.
- Adjacent Interval Aggregation: To prevent the exponential growth of abstract states (the "state explosion" problem), we implement a novel aggregation algorithm that merges nearby boxes, balancing computational efficiency with approximation tightness.
Experimental Evaluation
We evaluated BBReach on seven standard reinforcement learning benchmarks (B1-B5, Tora, and ACC) and compared it against leading tools: Verisig 2.0, Polar, and ReachNN*.
Key Results
- Tightness and Reliability: BBReach successfully verified all 28 test instances. In contrast, competing tools like Verisig 2.0 and Polar failed on several cases due to overestimation or timeouts.
- Efficiency: BBReach demonstrated massive performance gains, achieving up to 176x speedup over Verisig 2.0 and 182x speedup over Polar. When utilizing parallelization, it outperformed ReachNN by up to 22,000x*.
- Scalability: Unlike white-box tools, BBReach's computation time remains relatively stable as the size of the neural network increases, as it treats the network as a black box.
- Performance Parity: Training with the abstraction layer did not significantly impact the agent's performance; cumulative rewards remained comparable to standard DNN controllers.
Conclusion
BBReach offers a scalable and tight solution for the safety verification of DRL systems by shifting the complexity from post-hoc approximation to "verification by design." By treating the DNN as a black-box oracle and employing efficient interval aggregation, BBReach bypasses the primary bottlenecks of traditional reachability analysis. Future work will explore dynamic abstraction to further mitigate the curse of dimensionality and extend the framework to verify complex liveness properties.
Summary updated