Uncertainty-Aware Predictive Safety Filters for Probabilistic Neural Network Dynamics

Bernd Frauenknecht, Lukas Kesper, Daniel Mayfrank, Henrik Hose, Sebastian TrimpearXiv 2026 · arXiv

TL;DR

This paper introduces the Uncertainty-Aware Predictive Safety Filter (UPSi), a novel framework that brings rigorous safety guarantees to model-based reinforcement learning (RL) using probabilistic ensemble neural networks. By formulating future trajectories as robustly reachable sets and enforcing an explicit model certainty constraint, UPSi drastically reduces constraint violations during exploration without sacrificing task performance.

What Problem Does This Paper Address?

Deep reinforcement learning excels at finding policies for complex tasks, but its trial-and-error nature makes exploration inherently dangerous for real-world systems. To prevent catastrophic failures, researchers use Predictive Safety Filters (PSFs). Operating like a guardian angel, a PSF sits between the RL agent and the environment, using a dynamics model to project the agent's proposed action into the future. If the action leads to a constraint violation, the PSF overrides it with a safe alternative.

Traditionally, PSFs rely on first-principles physics models or Gaussian Processes (GPs). However, physics models require deep domain expertise, and GPs scale terribly with large datasets. Modern model-based RL (MBRL) bypasses this by using Probabilistic Ensembles (PEs) of neural networks to learn complex dynamics directly from data. Unfortunately, prior attempts to plug PEs into safety filters have lacked rigorous uncertainty quantification. Without it, the safety filter can fall victim to model exploitation—mistakenly steering the system into unvisited, highly uncertain regions of the state space because the neural network confidently (but incorrectly) predicts they are safe.

Methods

UPSi bridges the gap between the scalability of neural networks and the mathematical rigor of Model Predictive Control (MPC).

UPSi Framework and Mechanism

The core components of the method include:

  1. Uncertainty Separation via Kalman Gain: UPSi leverages the PE architecture to separate aleatoric uncertainty (inherent environmental noise) from epistemic uncertainty (lack of model data). It computes a dimension-wise Kalman gain to measure total predictive confidence.
  2. The Certainty Constraint: The authors introduce an explicit constraint based on this Kalman gain. If the epistemic uncertainty is too high, the state-action pair is deemed "uncertain," and the filter blocks the agent from entering that zone. This directly prevents model exploitation.
  3. Rigorous Reachable Set Propagation: To predict future outcomes, UPSi propagates ellipsoidal tubes forward in time. Crucially, the authors mathematically derive an upper bound for the linearization error introduced by taking first-order Taylor approximations of the neural network's nominal dynamics. By accounting for both process noise and linearization errors, they guarantee that the true system state remains within the predicted tube.
  4. Data-Driven Terminal Set Expansion: To prevent the filter from being overly conservative, a sampling-based scheme expands the "safe terminal set" over successive episodes as the model collects more data.

Datasets

The authors evaluated UPSi on three standard safe reinforcement learning benchmarks representing varying dimensional complexities:

  • Pendulum (Low-dimensional control)
  • Cartpole (Classic underactuated system with state constraints)
  • Drone (High-dimensional, 12-state quadrotor tracking task)

Key Insights and Ideas

  • Kalman Gain as a Safety Metric: Using the trace of the Kalman gain matrix provides a bounded, easy-to-tune metric ($0$ to $1$) for model certainty, making it highly practical for constraining optimization problems.
  • Taming Neural Network Non-Linearities: Neural networks are notoriously difficult to bound mathematically. Bounding the linearization error using the network's average partial derivatives (Jacobians) and Lipschitz constants is a major step forward for robust deep-learning-based control.
  • More Interventions, Fewer Failures: Interestingly, the data shows that UPSi intervenes more frequently than prior neural network safety filters. By proactively filtering risky actions early, it avoids getting trapped in unrecoverable, unsafe states later.

Key Results

UPSi was integrated into a standard Dyna-style MBRL algorithm (MBPO) and compared against standard MBPO, Soft Actor-Critic (SAC), and XMPSC (a state-of-the-art PE-based safety filter that lacks rigorous uncertainty bounds).

Experimental Results
  • Valid Overapproximation: Empirical validation on Cartpole confirmed that the mathematically derived ellipsoidal tubes successfully enveloped $100,000$ simulated ground-truth trajectories.
  • Substantial Safety Improvements: As shown in Figure 2b, UPSi dramatically reduced accumulated constraint violations during training compared to XMPSC and unfiltered MBPO—especially in the higher-dimensional Cartpole and Drone environments where model exploitation is most severe.
  • No Performance Penalty: Despite its strict safety filtering, UPSi achieved asymptotic evaluation rewards on par with standard, unsafe MBRL baselines.

Limitations and Future Work

While the theoretical framework provides rigorous guarantees, the experimental validation relied on practical simplifications (e.g., setting the ancillary feedback controller $K=0$ and using a simplified naive uncertainty propagation scheme) to maintain computational tractability.

The primary bottleneck of UPSi is its computational overhead. Solving the robust non-linear MPC problem with neural network dynamics is slow. While it achieved a refresh rate of 25 Hz in the low-dimensional Pendulum environment, real-time feasibility remains an open challenge for high-dimensional systems like the Drone. The authors note that future work must focus on optimization speedups to enable actual hardware deployment.

Summary updated

Abstract

Predictive safety filters (PSFs) leverage model predictive control to enforce constraint satisfaction during deep reinforcement learning (RL) exploration, yet their reliance on first-principles models or Gaussian processes limits scalability and broader applicability. Meanwhile, model-based RL (MBRL) methods routinely employ probabilistic ensemble (PE) neural networks to capture complex, high-dimensional dynamics from data with minimal prior knowledge. However, existing attempts to integrate PEs into PSFs lack rigorous uncertainty quantification. We introduce the Uncertainty-Aware Predictive Safety Filter (UPSi), a PSF that provides rigorous safety verification using PE dynamics models by formulating future outcomes as reachable sets. UPSi introduces an explicit certainty constraint that prevents model exploitation and integrates seamlessly into common MBRL frameworks. We evaluate UPSi under practical simplifications within Dyna-style MBRL on standard safe RL benchmarks and report substantial improvements in exploration safety over prior neural network PSFs while maintaining performance on par with standard MBRL. UPSi bridges the gap between the scalability and generality of modern MBRL and the safety guarantees of predictive safety filters.
BibTeX
@misc{frauenknecht2026uncertainty,
  author = {Bernd Frauenknecht and Lukas Kesper and Daniel Mayfrank and Henrik Hose and Sebastian Trimpe},
  title = {{Uncertainty-Aware Predictive Safety Filters for Probabilistic Neural Network Dynamics}},
  year = {2026},
  eprint = {2604.26836},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.26836},
}

Loading related content...

Figure