Robust Probabilistic Shielding for Safe Offline Reinforcement Learning

Maris F. L. Galesloot, Thomas Rhemrev, Nils JansenarXiv 2026

TL;DR

This paper introduces a novel framework that brings probabilistic safety shields to offline reinforcement learning. By constructing a robust Interval Markov Decision Process (IMDP) directly from a limited dataset, the method provides high-probability safety guarantees and significantly boosts both average and worst-case performance in data-scarce environments.

What Problem Does This Paper Address?

Offline Reinforcement Learning (RL) is crucial for real-world applications where direct environment interaction is too costly or dangerous (e.g., healthcare, autonomous driving). Instead of exploring online, the agent learns purely from a fixed, pre-collected dataset.

To deploy these agents safely, researchers typically rely on Safe Policy Improvement (SPI) algorithms, which guarantee with high probability that a newly learned policy will outperform a given baseline policy. However, standard SPI has a major blind spot: it assumes the baseline policy is already safe and doesn't actually provide hard mathematical guarantees against reaching catastrophic states. Conversely, traditional probabilistic shielding blocks unsafe actions in real-time but requires a perfect, fully-known model of the environment—an unrealistic assumption in offline settings.

This paper bridges the gap by answering: How can we compute a reliable safety shield using only a limited, imperfect offline dataset?

Methods

The authors introduce a three-step methodology to compute and integrate a shield entirely offline:

  1. Constructing an Interval MDP (IMDP): Since the true environment dynamics are unknown, the authors use the offline dataset to build an IMDP. Instead of exact transition probabilities, the IMDP uses intervals (uncertainty boxes) calculated via Hoeffding's inequality to ensure the true environment is captured within these bounds with high probability ($1 - \delta_{\mathbb{I}}$).
  2. Robust Safety Verification: The safety requirement is defined as a "reach-avoid" specification (e.g., maximize the probability of reaching the goal while avoiding traps). The authors compute the worst-case satisfaction probabilities across all possible variations within the IMDP's intervals using robust dynamic programming.
  3. Shielding the SPI Process: Actions that fall below a safety threshold ($\theta$) in the worst-case scenario are deemed unsafe and blocked. This shield is then integrated directly into SPI algorithms like SPIBB (Safe Policy Improvement with Baseline Bootstrapping) and DUIPI. Crucially, the shield is also applied to the baseline policy itself, ensuring that if the algorithm ever falls back on the baseline due to data scarcity, it remains safe.
Figure 1: The shielded SPI methodology for safe offline RL.

Datasets

The framework was evaluated on four distinct benchmarks:

  • Random MDPs: A standard synthetic benchmark modified to include 5 randomly selected "trap" (sink) states.
  • Wet Chicken: A classic problem modeling an agent paddling a boat on a turbulent river; the agent must stay close to a waterfall to maximize reward without falling over the edge.
  • Frozen Lake: An $8 \times 8$ grid-world navigation task where the agent must reach a goal while avoiding hazardous holes.
  • Simplified Pacman: A large-scale episodic environment ($117,649$ states) where a $7 \times 7$ maze forces the agent to navigate to a goal while avoiding two randomly moving ghosts.

Key Insights and Ideas

  • Embracing Pessimism for Safety: Instead of trying to find a single "best estimate" of the environment, treating data uncertainty as an interval allows the shield to be robustly pessimistic. If an action is safe in the worst-case transition model, it is highly likely safe in reality.
  • The Shield as a Low-Data Regularizer: In low-data regimes, RL algorithms frequently make catastrophic errors due to poor value estimation. The shield acts as an effective regularizer, narrowing the policy search space to strictly safe actions and accelerating convergence.
  • Shielding the Fallback is Essential: Algorithms like SPIBB fall back to the baseline policy when data coverage is low. If the baseline policy isn't perfectly safe, standard SPIBB fails. Shielding the baseline policy before running the optimization fixes this vulnerability.

Key Results

The authors compared shielded versions of SPIBB and DUIPI ($\text{SPIBB}_\square$ and $\text{DUIPI}_\square$) against their unshielded counterparts across 1,000 experimental runs.

  • Dominance in Low-Data Regimes: Shielded methods consistently achieved higher average rewards when data was scarce.
  • Substantial Worst-Case Improvements: Worst-case performance was evaluated using 1%-CVaR (the average of the worst 1% of runs). In the large-scale Pacman benchmark, the worst-case performance of the shielded methods actually outperformed the average performance of the unshielded methods.
  • Absolute Safety: In the Frozen Lake benchmark, unshielded methods frequently learned policies that fell into holes (yielding negative rewards). Shielded methods consistently maintained rewards above zero, completely avoiding unsafe behaviors regardless of dataset size.
Figure 2: Performance 𝜌(𝜋, 𝑀∗) on the true MDP 𝑀∗of the policies 𝜋∈Π produced by the shielded (★) and non-shielded (•) SPI methods plotted against the number of trajectories in the dataset D. We report average (solid) and 1%-CVaR (dotted) across runs. The 𝑥-axis is on a log scale, and error bars denote 95% confidence intervals. The 𝑦-axis is clipped for visibility purposes; full ranges are in Section C. The (shielded) baseline and optimal performances on the true MDP 𝑀∗are included for reference.

Limitations and Future Work

  • The Safety-Optimality Trade-off: Because the shield relies on worst-case estimates from the IMDP, wide intervals (caused by very small datasets) can make the shield overly conservative. It may block high-reward actions that carry only a negligible, acceptable risk.
  • Fixed Threshold Sensitivity: The safety threshold $\theta$ was kept fixed across all dataset sizes. As the dataset grows and intervals shrink, a fixed threshold can sometimes cause the shielded baseline's performance to slightly decline, suggesting that adaptive thresholds might be needed.
  • Future Direction: The authors plan to extend this framework to bridge the gap between offline shield computation and online deployment, allowing agents to safely explore new environments.

Summary updated

BibTeX
@misc{galesloot2026robust,
  author = {Maris F. L. Galesloot and Thomas Rhemrev and Nils Jansen},
  title = {{Robust Probabilistic Shielding for Safe Offline Reinforcement Learning}},
  year = {2026},
  eprint = {2605.10293},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.10293},
}
Figure