Abstract
Fully formal verification of perception models is likely to remain challenging in the foreseeable future, and yet these models are being integrated into safety-critical control systems. We present a practical method for reasoning about the safety of such systems. Our method is based on systematically constructing approximations of perception models from system-level safety requirements, data, and program analysis of the modules that are downstream from perception. These approximations have some desirable properties like being low-dimensional, intelligible, and tractable. The closed-loop system, with the approximation substituting the actual perception model, is verified to be safe. Establishing the formal relationship between the actual and the approximate perception models remains well beyond available verification techniques. However, we do provide a useful empirical measure of their closeness called precision. Overall, our method can tradeoff the size of the approximation against precision. We apply the method to two significant case studies: 1) a vision-based lane tracking controller for an autonomous vehicle and 2) a controller for an agricultural robot. We show how the generated approximations for each system can be composed with the downstream modules and be verified using program analysis tools like CBMC. Detailed evaluations of the impacts of size, and the environmental parameters (e.g., lighting, road surface, and plant type) on the precision of the generated approximations suggest that the approach can be useful for realistic control systems.
Introduction
Deep Neural Networks (DNNs) are essential for modern autonomous perception tasks, such as lane detection, but they are notoriously difficult to verify. Traditional formal methods struggle with the high dimensionality of image data, and existing "adversarial" verification techniques typically only examine local robustness within tiny neighborhoods of input pixels.
The core challenge is that verifying a perception model in isolation does not guarantee the safety of the entire vehicle. A minor error in lane detection might be harmless if the car is centered, but catastrophic if it is already near the edge of the lane. This paper addresses the gap between complex, black-box perception and the need for rigorous, system-level safety proofs in closed-loop control systems.
Methodology: Safe Approximate Abstractions
The authors propose a method to construct Approximate Abstractions of Perception (AAP). Instead of attempting to verify the high-dimensional DNN directly, they create a simpler, low-dimensional proxy model ($M$) that can be easily analyzed by standard formal verification tools.
The construction of an AAP involves several key steps:
- State Space Partitioning: The system's state space (e.g., the vehicle's position and heading) is divided into a grid or "sublevel sets" based on error functions.
- Learning the "Center": For each partition, multivariate linear regression is performed on simulation data to find a piece-wise affine function representing the "average" output of the perception system.
- Calculating the "Safe Radius": Using constrained optimization (via the Gurobi solver) and program analysis of the downstream controller code, the authors determine the largest possible error (a "radius" around the center) that the controller can handle without violating safety requirements.
- Formal Verification: The resulting abstraction—a set of linear equations and error bounds—is integrated into the controller's source code. The authors then use CBMC (a C Bounded Model Checker) to formally prove that the system remains safe under this abstraction.
Case Studies and Datasets
The study utilizes two primary high-fidelity simulation environments to validate the framework:
- LaneNet for Autonomous Vehicles: Tested using the Gazebo simulator with a model of the Polaris GEM e2 electric vehicle. The dataset includes various road types (2, 4, and 6 lanes) and lighting conditions (day and dawn).
- CropFollow for Agricultural Robots: A visual navigation system for an "AgBot" traversing corn and tobacco rows. This uses a ResNet-18 based perception model trained on different growth stages of crops.
Key Results and Insights
The method demonstrates that safe abstractions can be computed efficiently, often in just a few seconds per state-space partition. In the lane-tracking case study, the abstractions achieved over 90% precision for the majority of the state space. This suggests that the verifiable proxy is a highly effective match for the actual DNN.
The Equilibrium Paradox
A counter-intuitive finding was that precision is often lowest when the vehicle is perfectly centered in the lane (the equilibrium). At equilibrium, safety requirements are extremely tight; even a tiny perception error could technically "increase" the tracking error, violating the strict mathematical definition of a stable system. While the car remains safe, it becomes harder to formally prove "non-increasing error" when the error is already near zero.
Safety-Centric Design
Unlike typical machine learning models that aim for maximum accuracy everywhere, an AAP is built specifically to satisfy safety invariants. The authors found that finer partitioning of the state space directly leads to higher precision, allowing engineers to trade off computational complexity for a tighter safety proof. Furthermore, because the abstractions are piece-wise linear, they can be translated into simple "if-then" C code, making the perception system's reasoning human-readable and verifiable by standard software engineering tools.
Conclusion
While the closed-loop system is formally verified with the abstraction, the link between the actual DNN and the abstraction remains empirical, measured by "precision." Future work will focus on mitigating the "curse of dimensionality" in state-space partitioning and extending the framework to continuous-time or hybrid systems. Nevertheless, this approach provides a practical path toward verifying complex, perception-driven autonomous systems in realistic environments.
Summary updated