Skip to main content
QUICK REVIEW

[Paper Review] Learning Safe Neural Network Controllers with Barrier Certificates

Hengjun Zhao, Xia Zeng|arXiv (Cornell University)|Sep 18, 2020
Adversarial Robustness in Machine Learning44 references4 citations
TL;DR

This paper proposes a data-driven framework for synthesizing neural network (NN) controllers for nonlinear continuous dynamical systems with formal safety guarantees. It co-trains a controller-NN and a barrier-NN using custom loss functions, enabling verification-in-the-loop synthesis that ensures safety through barrier certificate certification, with experiments confirming feasibility and efficacy on benchmark control systems.

ABSTRACT

We provide a novel approach to synthesize controllers for nonlinear continuous dynamical systems with control against safety properties. The controllers are based on neural networks (NNs). To certify the safety property we utilize barrier functions, which are represented by NNs as well. We train the controller-NN and barrier-NN simultaneously, achieving a verification-in-the-loop synthesis. We provide a prototype tool nncontroller with a number of case studies. The experiment results confirm the feasibility and efficacy of our approach.

Motivation & Objective

  • To address the challenge of designing safe, correct-by-construction controllers for nonlinear continuous dynamical systems without requiring deep control theory expertise.
  • To enable data-driven synthesis of neural network controllers that inherently satisfy safety properties through integrated verification.
  • To co-optimize controller and barrier function representations using neural networks, ensuring formal safety certification.
  • To reduce reliance on manual barrier function construction by learning them end-to-end from data.
  • To develop a prototype tool, nncontroller, for scalable synthesis and verification of NN-based controllers.

Proposed method

  • Simultaneously train a controller-NN and a barrier-NN using a joint optimization framework with domain-specific loss functions.
  • Represent barrier functions as neural networks to leverage universal approximation and enable formal verification via interval SMT solvers.
  • Design custom loss functions that encode safety constraints, stability objectives, and bounded control inputs (e.g., via Hardtanh activation).
  • Generate training datasets through sampling of system trajectories and state-space regions, including safe and unsafe regions.
  • Integrate formal verification of the learned barrier-NN using interval arithmetic and SMT-based reasoning to validate its role as a certificate.
  • Apply self-adaptive learning rate scheduling and restart mechanisms to improve training convergence and robustness.

Experimental results

Research questions

  • RQ1Can neural network controllers be synthesized in a data-driven manner while guaranteeing safety through formal verification?
  • RQ2How can barrier functions be learned as neural networks to serve as certificates for controller safety?
  • RQ3What loss function design enables effective joint training of controller and barrier networks with safety and stability objectives?
  • RQ4Can the co-synthesis of controller and barrier NNs outperform traditional verification-after-synthesis approaches in terms of safety and efficiency?
  • RQ5How scalable is the approach on nonlinear dynamical systems with complex safety constraints?

Key findings

  • The proposed framework successfully synthesizes neural network controllers that satisfy safety properties across multiple case studies, including a bicycle model and a double integrator system.
  • The method achieves verification-in-the-loop synthesis, where the barrier-NN is formally verified as a valid certificate using interval SMT solvers.
  • Training time averaged across five runs ranged from 26.35 to 891.24 seconds per case, with verification costs between 4.71 and 1344.50 seconds, indicating moderate computational overhead.
  • The use of stability-aware loss functions and bounded activation (Hardtanh) improved controller performance and convergence, reducing instability in learned policies.
  • The approach demonstrated robustness to random initialization, with restart mechanisms successfully recovering from failed training runs in several cases.
  • The prototype tool nncontroller successfully handled systems with up to 6 state variables and achieved formal verification of barrier certificates in all tested instances.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.