TLDR: This research introduces a novel methodology to guarantee the infinite-time horizon safety of neural network-controlled systems, even in the presence of real-world finite-precision errors from sensing, computation, and actuation. It models these errors as a ‘hybrid game’ between a ‘good Demon’ (controller) and a ‘bad Angel’ (perturbations) to formally prove robustness. The approach integrates with existing verification tools and enables the synthesis of efficient, hardware-deployable fixed-point implementations that maintain safety under specified error bounds, demonstrated through case studies in automotive and aeronautics.
As artificial intelligence, particularly neural networks, becomes more deeply integrated into systems where safety is paramount—like self-driving cars or aircraft collision avoidance—ensuring their reliability is critical. Traditionally, the mathematical guarantees for these systems have relied on idealized, perfect calculations. However, real-world implementations always involve ‘finite precision,’ meaning numbers are rounded off, leading to small but potentially significant errors in sensing, computation, and actuation.
This research paper, titled “Of Good Demons and Bad Angels: Guaranteeing Safe Control under Finite Precision,” addresses this crucial gap. Authored by Samuel Teuber, Debasmita Lohar, and Bernhard Beckert from the Karlsruhe Institute of Technology, the work introduces a groundbreaking methodology to ensure that safety guarantees hold true even when these real-world imperfections are present.
The Challenge of Real-World Errors
Current methods for verifying the safety of neural network-controlled cyber-physical systems (NNCSs) often assume perfect, real-valued arithmetic. This is a problem because in practice, every operation, from reading a sensor to performing a calculation or executing a control action, introduces tiny ’roundoff errors.’ These errors can accumulate and, in safety-critical scenarios, lead to incorrect decisions or even unsafe system behavior. Furthermore, efficiency demands often push for lower-precision arithmetic, which can introduce even larger numerical errors.
A Novel Approach: The Demon and Angel Game
The core innovation of this paper is its approach to incorporating these real-world errors into the safety verification process. The authors model the problem as a ‘hybrid game’ between two entities: a ‘good Demon’ and a ‘bad Angel.’ The good Demon represents the control actions chosen by the system, aiming to keep it safe. The bad Angel, on the other hand, introduces perturbations—the finite-precision errors in sensing, computation, and actuation—trying to push the system into an unsafe state.
This game-theoretic formulation allows for formal proofs of ‘robustness.’ Instead of just proving that a control strategy is safe in an ideal world, the paper proves that there exists a control action that can maintain safety even when the bad Angel introduces its bounded perturbations. This concept of robustness is a necessary condition for verifying real-world neural network controllers.
From Theory to Practical Implementation
The methodology extends existing verification techniques, particularly Differential Dynamic Logic (dL), to account for these ‘angelic perturbations.’ It provides decidable criteria that can be checked using existing real-arithmetic solvers and neural network verification tools. This means the complex problem of infinite-time horizon safety under finite precision can be systematically analyzed.
A significant contribution is the integration of ‘mixed-precision fixed-point tuning.’ Once a neural network is proven safe under a given error bound, the research leverages tools like Daisy to synthesize highly efficient, hardware-deployable fixed-point implementations. These implementations are optimized to use the minimum necessary precision while still guaranteeing that their errors remain within the safe bounds determined by the verification process. This provides a complete, end-to-end solution from theoretical safety guarantees to efficient, deployable code.
Also Read:
- Enhancing Robot Planning Through Observation-Based Learning
- Automating Chip Verification with a Multi-Agent AI System
Real-World Applications
The effectiveness of this approach was demonstrated through several realistic case studies from the automotive and aeronautics domains. These included an Adaptive Cruise Control (ACC) system, both with discrete and continuous acceleration control, and the Vertical Airborne Collision Avoidance System (VCAS), a critical system for preventing mid-air collisions. For ACC, initial control strategies were found not to be robust to output perturbations, leading to necessary revisions and subsequent verification of safety under bounded errors. For VCAS, the analysis confirmed the robustness of existing control envelopes.
The results show that the methodology scales to complex, safety-critical systems, providing rigorous infinite-time horizon safety guarantees for neural network controllers while also enabling the generation of efficient, hardware-optimized code. This work is a significant step towards fostering warranted trust in real-world AI control systems. You can read the full paper here: Of Good Demons and Bad Angels: Guaranteeing Safe Control under Finite Precision.


