Taming Reachability Analysis of DNN-Controlled Systems via Abstraction-Based Training

Jiaxu Tian, Dapeng Zhi, Si Liu, Peixin Wang, Guy Katz, Min Zhang · DOI

TL;DR

This paper introduces a novel "abstraction-based training" method for Deep Neural Networks (DNNs) used in control systems. This approach allows for sound, efficient, and tight "black-box" reachability analysis of these complex systems, overcoming the limitations of existing "white-box" methods that struggle with scalability and accuracy.

What Problem Does This Paper Address?

Verifying the safety of systems controlled by Deep Neural Networks (DNNs) is a major challenge. Reachability analysis, a formal method for determining all possible states a system can reach, is crucial for safety guarantees. However, the "black-box" nature and complexity of DNNs make traditional reachability analysis difficult. Existing methods often rely on over-approximating DNNs with simpler models (like polynomials) to perform this analysis. While this allows for "white-box" verification, it leads to significant overestimation of reachable states, reducing accuracy and efficiency, and is often limited to specific types of DNNs. This paper aims to bridge this gap by enabling sound and efficient reachability analysis without needing to over-approximate the DNNs themselves.

Methods

The core innovation is an abstraction-based training approach. This involves inserting an "abstraction layer" into the DNN architecture before training. This layer maps concrete input states to abstract representations (intervals). The key idea is that all concrete states mapped to the same abstract representation will elicit the same action from the trained DNN. This abstraction layer is then "frozen" during training, meaning its parameters are fixed. The rest of the DNN is trained as usual, but now it operates on these abstract states.

For reachability analysis, this trained DNN (now an Abstract Neural Network or ANN) is treated as a black-box oracle. Instead of over-approximating the DNN's behavior, the analysis works with abstract states (interval boxes). The process involves:

  1. Interval Segmentation: Dividing an input interval box into smaller boxes such that all concrete states within a smaller box map to the same abstract state.
  2. Post Operation: Using the trained ANN (as a black-box) to determine the action for an abstract state and then applying the system's dynamics to compute the next set of reachable abstract states.
  3. Adjacent Interval Aggregation: Merging adjacent abstract interval boxes to prevent exponential blow-up in the number of states.

This approach bypasses the need for DNN over-approximation, making the analysis sound, tight, and agnostic to DNN architecture or size.

Datasets

The paper uses seven benchmark tasks, commonly adopted in reachability analysis research. These tasks involve "reach-avoid" properties, where an agent must reach a goal region while avoiding unsafe regions. The benchmarks vary in dimensionality (2 to 6 dimensions) and network complexity. No new benchmarks were introduced.

Key Insights and Ideas

  • Abstraction as a Bypass: The most significant insight is that by abstracting states during training, we can force the DNN to behave predictably on these abstract states. This allows us to treat the trained DNN as a black-box oracle for reachability analysis, sidestepping the need for complex and error-prone DNN over-approximation.
  • Soundness without White-Box: The paper demonstrates that it's possible to achieve sound reachability analysis (guaranteeing no false positives) without requiring full knowledge of the DNN's internal workings. This is a departure from most existing methods.
  • Efficiency Gains from Abstraction: The abstraction layer and subsequent interval-based analysis significantly reduce the state space explosion problem, leading to much faster and more scalable verification.
  • Aggregation is Key: The "Adjacent Interval Aggregation" technique is crucial for managing the number of abstract states, preventing the analysis from becoming computationally intractable.

Key Results

  • Comparable Training Performance: DNNs trained with the abstraction layer (ANNs) achieved comparable performance (cumulative reward) to conventionally trained DNNs.
  • Significant Efficiency Improvement: The proposed black-box approach (BBReach) achieved substantial speedups compared to state-of-the-art white-box tools like Verisig 2.0 and Polar, with improvements of up to 182x over Polar and significantly less time overhead than Verisig 2.0.
  • Tighter Over-approximations: BBReach produced tighter (less overestimated) reachable state sets, leading to more accurate verification results. In some cases, white-box tools failed to verify properties due to excessive overestimation, while BBReach succeeded.
  • Scalability: The approach scales well to larger networks and is agnostic to DNN architecture and activation functions, unlike many white-box methods.
  • ReachNN* Outperformed: A comparison with ReachNN* showed BBReach achieving up to 22k times speedup and significantly better verification success rates.

Limitations and Future Work

  • State Explosion in Worst Case: While aggregation helps, the paper acknowledges that the reachability analysis part can still suffer from state explosion in the worst case, especially for high-dimensional systems.
  • Abstraction Granularity: The choice of abstraction granularity is a hyper-parameter that affects performance and needs careful tuning.
  • Future Work: The authors suggest exploring:
  • New abstraction methods and runtime verification techniques.
  • Synthesizing piecewise linear controllers for easier verification.
  • Coarsening abstraction to reduce state space and learning simpler policies for each abstract state.

Summary updated

Abstract

The intrinsic complexity of deep neural networks (DNNs) makes it challenging to verify not only the networks themselves but also the hosting DNN-controlled systems. Reachability analysis of these systems faces the same challenge. Existing approaches rely on over-approximating DNNs using simpler polynomial models. However, they suffer from low efficiency and large overestimation, and are restricted to specific types of DNNs. This paper presents a novel abstraction-based approach to bypass the crux of over-approximating DNNs in reachability analysis. Specifically, we extend conventional DNNs by inserting an additional abstraction layer, which abstracts a real number to an interval for training. The inserted abstraction layer ensures that the values represented by an interval are indistinguishable to the network for both training and decision-making. Leveraging this, we devise the first black-box reachability analysis approach for DNN-controlled systems, where trained DNNs are only queried as black-box oracles for the actions on abstract states. Our approach is sound, tight, efficient, and agnostic to any DNN type and size. The experimental results on a wide range of benchmarks show that the DNNs trained by using our approach exhibit comparable performance, while the reachability analysis of the corresponding systems becomes more amenable with significant tightness and efficiency improvement over the state-of-the-art white-box approaches.
BibTeX
@inproceedings{tian2024taming,
  author = {Jiaxu Tian and Dapeng Zhi and Si Liu and Peixin Wang and Guy Katz and Min Zhang},
  title = {{Taming Reachability Analysis of DNN-Controlled Systems via Abstraction-Based Training}},
  booktitle = {VMCAI},
  year = {2024},
  doi = {10.1007/978-3-031-50521-8\_4},
}
Figure