A Learner-Verifier Framework for Neural Network Controllers and Certificates of Stochastic Systems

Krishnendu Chatterjee, Thomas A. Henzinger, Mathias Lechner, Dorde Zikelic

Abstract

Reinforcement Learning (RL) has demonstrated significant potential in solving complex non-linear control tasks. However, the inherent "black-box" nature of neural networks poses substantial risks for safety-critical applications. This paper introduces a "Learner-Verifier" framework that jointly trains neural network control policies and formal certificates, specifically supermartingales, to provide rigorous safety and reachability guarantees for stochastic systems. By employing interval arithmetic and abstract interpretation, the framework formally proves that a system satisfies complex properties within a specified probability threshold, effectively bridging the gap between empirical performance and formal safety requirements.

Introduction

While formal verification techniques such as Lyapunov or Barrier functions are well-established for deterministic systems, real-world environments are inherently stochastic due to sensor noise and model uncertainties. Existing verification methods for stochastic systems, such as Sum-of-Squares (SOS) programming, often struggle with scalability and are typically restricted to polynomial systems.

This work addresses the challenge of providing non-empirical, formal guarantees for neural network controllers operating in non-linear, discrete-time stochastic environments. The proposed approach moves beyond simple value decreases used in deterministic settings to expected value decreases, utilizing the mathematical framework of supermartingales.

Methodology: The Learner-Verifier Loop

The core of the proposed framework is a Learner-Verifier loop based on the Counterexample-Guided Inductive Synthesis (CEGIS) architecture. This iterative process ensures that the synthesized controller is accompanied by a valid certificate of its performance.

The Learner-Verifier loop based on the CEGIS architecture.

The loop consists of two primary components:

  1. The Learner: This component jointly learns a control policy ($\pi_\theta$) and a certificate function ($V_\nu$), both represented as neural networks. The learning process is guided by a differentiable loss function that penalizes violations of certificate conditions, such as non-negativity and expected decrease requirements.
  2. The Verifier: The verifier formally checks if the candidate certificate satisfies the required conditions across the state space. If the certificate fails, the verifier generates counterexamples that are fed back to the learner to refine the models.

To handle the computational difficulty of evaluating expected values for neural networks, the verifier utilizes Interval Arithmetic Abstract Interpretation (IA-AI). This technique computes sound upper and lower bounds on expected values over discretized regions of the state space, ensuring the verification remains rigorous.

Stochastic Certificates

The framework utilizes three primary types of supermartingale certificates to encode different system properties:

  • Ranking Supermartingales (RSMs): Used to prove reachability (the system will reach a target set) with probability 1.
  • Stochastic Barrier Functions (SBFs): Used to prove safety (the system will avoid unsafe sets) with a specific probability $p$.
  • Reach-Avoid Supermartingales (RASMs): A unified certificate for properties requiring the system to reach a target while simultaneously avoiding unsafe regions.

A key insight of this work is the unification of safety and reachability into the RASM concept. By carefully defining boundary conditions and expected decrease requirements, these often-separate properties can be verified through a single certificate type.

Implementation and Soundness

To ensure the neural networks are "verifiable," the learner incorporates Lipschitz regularization. This prevents the functions from exhibiting high-frequency oscillations between discretization points, making the interval-based verification significantly more efficient. Additionally, the framework handles unbounded stochastic disturbances (e.g., Gaussian noise) by using a probability integral transform to map them into a bounded support.

The paper provides a formal proof (Theorem 6) of the framework's soundness: if the verifier successfully validates the neural network certificate against the refined conditions, the system is mathematically guaranteed to satisfy the reach-avoid property with the desired probability $p$.

Conclusion and Future Work

The Learner-Verifier framework demonstrates that the CEGIS loop can successfully converge to valid controller-certificate pairs for non-linear stochastic systems where traditional methods fail. However, challenges remain, particularly the "curse of dimensionality" associated with state-space discretization in the verification step. Future research directions include extending the framework to more complex properties and exploring multi-dimensional "lexicographic" certificates to improve compositional reasoning and scalability for higher-dimensional systems.

Summary updated

BibTeX
@inproceedings{chatterjee2023learner,
  author = {Krishnendu Chatterjee and Thomas A. Henzinger and Mathias Lechner and Dorde Zikelic},
  title = {{A Learner-Verifier Framework for Neural Network Controllers and Certificates of Stochastic Systems}},
  booktitle = {TACAS},
  year = {2023},
  doi = {10.1007/978-3-031-30823-9\_1},
}
Figure