Certifying safety and reach-avoidance for learning-enabled systems with unknown dynamics is challenging, as exact verification is intractable and finite data provide limited evidence. We propose a joint training-and-certification framework that combines multi-step statistical certification of neural barrier functions with reinforcement learning of control policies. Within this framework, PID-barrier feedback jointly trains the policy and barrier to improve safety and performance. After training, we certify probably approximately correct (PAC) multi-step safe invariant and reach-avoid sets using scenario approaches and the trained barrier function. Because the PAC statement bounds the portion of the certified set that may violate the property, rather than certifying individual states, the guarantees are reusable online as long as the system remains within the certified set and the dynamics and controller remain unchanged. The method attains \( O(1/\alpha) \) sample complexity, improving on \( O(1/\alpha^2) \) Monte Carlo bounds. Experiments on an inverted pendulum, Van der Pol oscillator, and 10-D Hopfield system demonstrated improved return-safety trade-offs and valid PAC certificates.
Learned barrier certificates provide a principled mechanism for establishing safety of stochastic systems, but their validity may deteriorate during deployment when the underlying dynamics differ from those used for training. We propose an anytime-valid runtime monitor that audits a learned barrier certificate using observed closed-loop trajectories. The monitor is intended to detect loss of statistical support for the deployed barrier condition; it does not by itself guarantee detection before unsafe entry or safety of a subsequent intervention. Specifically, the conditional barrier-drift condition is formulated as an episode-wise sequential hypothesis test, and observed barrier increments are transformed into a nonnegative test supermartingale, yielding finite-sample false-alarm control under arbitrary stopping times. Inspired by finite-horizon safety verification, we further introduce a deterministic temporal shaping of the monitoring boundary, making the monitor more conservative early in a prescribed deployment horizon while preserving anytime-validity. The monitor is designed to detect statistical evidence that the safety certificate is no longer consistent with the observed dynamics, rather than to predict unsafe entry. To assess the monitor empirically, we evaluate empirical alarm behavior under valid and invalid certificates. Code and data are available at https://github.com/FormalCert-AI/runtime-barrier-monitor.