Abstract
We present VEL (Verification-based Learning), a novel framework for synthesizing programmatic controllers that are both high-performing and provably safe. Unlike traditional reinforcement learning which produces black-box neural networks, VEL generates readable, structured code. By integrating formal reachability analysis directly into the training loop, VEL optimizes controllers within a "proof space," ensuring that the resulting systems satisfy rigorous safety requirements for complex, non-linear dynamics. Our evaluation across 14 benchmarks demonstrates that VEL consistently produces provably correct controllers with significantly lower verification overhead than neural network alternatives.
Introduction
Autonomous systems, such as self-driving cars and drones, increasingly rely on Reinforcement Learning (RL) for control. While effective, RL typically produces deep neural network (DNN) controllers that lack formal safety guarantees. Verifying DNNs is computationally expensive and often yields "unknown" results due to over-approximation errors. Furthermore, when a failure is detected, there is no straightforward mechanism to incorporate that feedback into the training process to guarantee future safety.
To address these challenges, the VEL framework moves away from neural networks toward programmatic controllers—interpretable programs that are naturally more amenable to formal verification. By using verification results as a direct optimization signal, VEL synthesizes controllers that are safe by construction.
Methodology: The VEL Framework
VEL combines differentiable programming with formal verification to bridge the gap between learning and safety.
Differentiable Programmatic Controllers
Instead of a black-box model, the controller is represented as a structured program (e.g., nested if-then-else statements). To enable training via gradient descent, VEL employs "smooth approximations" of discrete branching logic using sigmoid functions, allowing the program's parameters to be optimized continuously.
Abstract Interpretation and the Proof Space
VEL utilizes reachability analysis tools (specifically Flow*) to compute "flowpipes"—mathematical envelopes that encapsulate all possible future states of the system given a range of initial conditions. This representation constitutes the "proof space," providing a rigorous bound on system behavior that accounts for worst-case scenarios.
Proof Space Optimization
The core innovation of VEL is the use of verification feedback for optimization. When the computed flowpipes intersect an unsafe region or fail to reach a goal, VEL calculates a Correctness Loss.
Since the verification process is non-differentiable, VEL employs black-box gradient estimation. By sampling small perturbations in the program's parameters, the framework determines how to adjust the controller to shift the flowpipes away from danger and toward the desired state, effectively "learning" to satisfy the mathematical proof of its own safety.
Experimental Evaluation
The framework was evaluated on 14 benchmarks involving non-linear continuous and hybrid systems, including standard control tasks (Mountain Car, Pendulum) and safety-critical scenarios (Adaptive Cruise Control, Quadrotor control). VEL was also compared against state-of-the-art neural network verification tools like ReachNN* and Verisig.
Key Results
- Provable Correctness: VEL successfully synthesized provably correct controllers for all 14 benchmarks.
- Verification Efficiency: Programmatic controllers proved significantly easier to verify than DNNs. VEL verified controllers in under 2 seconds for tasks where DNN verifiers often timed out or returned "Unknown."
- Optimization Convergence: In half of the benchmarks, the initial RL training produced a safe controller. For the remainder, the verification-guided loop successfully eliminated safety violations within a few dozen iterations.
Conclusion and Future Work
VEL demonstrates that programmatic controllers, combined with proof-space optimization, offer a viable path toward safe autonomous systems. While highly effective for the tested benchmarks, future work will focus on optimizing VEL for hybrid systems with complex discrete-continuous interactions and extending the framework to support more sophisticated temporal logic specifications. Additionally, we aim to enhance VEL's robustness in noisy environments where system models may be partially unknown.
Summary updated