Formal Verification of Neural Agents in Non-deterministic Environments

Michael E. Akintunde, Elena Botoeva, Panagiotis Kouvaros, Alessio Lomuscio

TL;DR

This paper tackles the challenge of formally verifying autonomous systems that use neural networks as agents interacting with uncertain environments. They introduce a new framework for analyzing these systems, proving that while full verification is impossible, a bounded version of temporal logic can be used to efficiently find bugs, especially with their novel parallel verification algorithm.

What Problem Does This Paper Address?

As autonomous systems, like self-driving cars or drones, increasingly rely on machine learning (ML) components, particularly neural networks, for tasks like perception and control, ensuring their safety and reliability becomes paramount. Unlike traditional software, neural networks are often "black boxes" synthesized from data, making them difficult to understand and prone to unexpected failures. This paper addresses the critical need to formally verify these neural agent-environment systems, especially when the environment itself is unpredictable and non-deterministic. The authors highlight that existing verification methods often struggle with the complexity of these systems, particularly the combination of neural network agents and dynamic, uncertain environments.

Methods

The core of the paper introduces a formal model for Neural Agent-Environment Systems (NANES). These systems consist of a neural agent, implemented as a feed-forward ReLU neural network (ReLU-FFNN), interacting with a non-deterministic environment. The environment's state transitions are modeled as a set of possible next states, reflecting uncertainty.

To tackle the verification problem, the authors:

  • Introduce a bounded fragment of CTL (bCTLR<): This temporal logic allows reasoning about properties that must hold within a limited number of steps. This is crucial because bugs in complex systems often manifest early.
  • Prove undecidability for unbounded CTL: They demonstrate that verifying these NANESS against full CTL properties (like "eventually reach a safe state") is undecidable, even for deterministic environments.
  • Develop MILP-based verification: For the bounded CTL fragment, they devise a method to translate the verification problem into a Mixed Integer Linear Programming (MILP) problem. This allows leveraging powerful MILP solvers to check for the existence of bugs.
  • Propose a novel parallel algorithm: Recognizing that monolithic MILP encodings can become computationally expensive, they introduce a compositional approach. This method breaks down the problem into a set of smaller MILPs that can be solved in parallel, significantly speeding up the search for counter-examples (bugs), especially for bounded safety properties.

Datasets

The paper does not use traditional datasets for training. Instead, it uses a simulated scenario called VerticalCAS for evaluation. This scenario models an aircraft collision avoidance system where an "ownship" (controlled by the neural agent) interacts with an "intruder" aircraft in a non-deterministic environment (representing the pilot's response). The environment's dynamics are defined by piecewise linear (PWL) functions, and the neural agent is implemented using ReLU-FFNNs.

Key Insights and Ideas

  • The inherent undecidability of full verification: The finding that verifying neural agents in non-deterministic environments against general CTL properties is undecidable is a significant theoretical result, setting the stage for more practical approaches.
  • The power of bounded temporal logic for bug finding: The paper convincingly argues that focusing on bounded temporal properties (e.g., "is the system safe for the next 5 steps?") is a practical and effective way to identify shallow bugs, which are often the most critical in real-world systems.
  • Parallelism as a key to efficiency: The novel compositional and parallel verification algorithm is a major contribution. It demonstrates that by distributing the verification workload, significant speedups can be achieved, making the verification of complex systems more tractable.
  • Bridging the gap between ML and formal methods: This work represents a crucial step in applying rigorous formal verification techniques to systems that heavily rely on machine learning, a growing trend in safety-critical applications.

Key Results

  • Undecidability: Verifying NANESS against full CTL reachability properties is undecidable.
  • Complexity bounds: Verification against bounded CTL properties is in coNEXPTIME and PSPACE-hard. For bounded safety properties, it's coNP-complete.
  • Performance improvement with parallel algorithm: The experimental results on the VerticalCAS scenario show that the compositional parallel verification (COMP-PAR) approach significantly outperforms the monolithic approach and sequential compositional approach, especially when checking for infeasibility (i.e., finding bugs). For instance, for a specific safety property and initial conditions, COMP-PAR was able to resolve the specification much faster than the other methods.
  • Tool implementation: The authors have implemented their verification procedures in an open-source toolkit called NANESVERIFY.

Limitations and Future Work

  • Limitations of bCTLR<: While useful for finding shallow bugs, bCTLR< is less expressive than full CTL and cannot capture all desired temporal properties.
  • Scalability: While the parallel approach improves scalability, the complexity can still grow exponentially with the temporal depth of the specification and the branching factor of the environment.
  • Future Work: The authors explicitly state their plan to extend the framework to multiple agents operating in an environment, which is a natural next step for more complex autonomous systems.

Summary updated

BibTeX
@article{akintunde2022formal,
  author = {Michael E. Akintunde and Elena Botoeva and Panagiotis Kouvaros and Alessio Lomuscio},
  title = {{Formal Verification of Neural Agents in Non-deterministic Environments}},
  journal = {Auton. Agents Multi Agent Syst.},
  year = {2022},
  doi = {10.1007/s10458-021-09529-3},
}
Figure