Learning-Based Shielding for Safe Autonomy under Unknown Dynamics

Robert Reed, Morteza Lahijanian

Deep Reinforcement Learning (DRL) has shown incredible potential for controlling complex systems, from robots to spacecraft. However, DRL controllers are essentially "black boxes"—they are powerful but offer no inherent safety guarantees. In safety-critical applications, a single "hallucination" or bad action can lead to catastrophic failure.

TL;DR

This paper introduces a data-driven "shielding" framework that provides formal safety guarantees for autonomous systems with unknown, continuous dynamics. By combining Deep Kernel Learning with Interval Markov Decision Processes (IMDPs), the authors create a protective layer that intercepts unsafe AI actions without needing a pre-existing mathematical model of the system.

What Problem Does This Paper Address?

The standard approach to safety in control theory is shielding (or the Simplex architecture). A high-performance but unverified "primary" controller (like a DRL agent) is monitored by a "shield." If the shield detects that the agent's next action might lead to an unsafe state, it intervenes and replaces that action with a safe backup.

However, existing shielding methods have two major flaws:

  1. Model Dependency: They usually require a known mathematical model of the system's physics.
  2. State Space Limitations: They often assume the system has a finite number of states, whereas real-world systems are continuous.

In many DRL scenarios, we don't know the exact dynamics (that's why we're using learning!), and the state space is continuous. This paper bridges that gap, allowing us to build shields directly from data for unknown, continuous systems.

Methods

The authors propose a multi-step pipeline to generate a "Maximally Permissive Shield":

  1. Deep Kernel Learning (DKL): To model how the system evolves, they use DKL—a hybrid approach that combines the representational power of Neural Networks with the rigorous uncertainty quantification of Gaussian Processes. This allows the system to predict its next state and, crucially, how much it trusts that prediction.
  2. Interval MDP (IMDP) Abstraction: They discretize the continuous state space into a finite set of regions. Because the model is learned and the space is discretized, there is inherent error. They capture this using an IMDP, where transition probabilities are ranges (intervals) rather than single numbers. This accounts for both learning uncertainty and discretization error.
  3. Safe LTL Specifications: Safety requirements are defined using "safe Linear Temporal Logic" (safe LTL). These are formal rules (e.g., "never hit an obstacle" or "don't go to the charging station while wet").
  4. The Shielding Algorithm: They developed an algorithm that composes the IMDP with a "violation" automaton. It systematically removes actions that could lead to a safety violation with a probability higher than a chosen threshold. The result is a set of "allowed" actions for every state.

Datasets

The researchers evaluated their method on two primary setups:

  • 2D Nonlinear Switched System: A synthetic benchmark where they gathered 1,000 data points per control mode to train the DKL model.
  • 6D Spacecraft Simulator (Basilisk): A high-fidelity, flight-approved astrodynamics simulator. They generated 125,000 data points per mode to model a complex Earth-observing satellite. This represents a significant jump in complexity compared to standard shielding literature.

Key Insights and Ideas

  • Uncertainty is a First-Class Citizen: By using IMDPs, the authors don't just ignore the errors in their learned model; they bake them into the safety guarantee. If the model is "unsure" about a region of space, the shield becomes more conservative.
  • Safe LTL vs. General LTL: The focus on safe LTL is a clever choice. Safe LTL formulas are those where any violation can be detected in finite time. This makes the math of "reachability" (can we reach an unsafe state?) much more tractable for real-time shielding.
  • Maximally Permissive: The shield isn't just a "kill switch." It calculates the largest possible set of safe actions. This ensures the DRL agent still has the freedom to optimize for performance as long as it stays within the safety boundaries.

Key Results

  • 100% Safety Rate: In 1 million random simulations of the 2D system, the shielded policy never violated safety constraints, even in complex environments with obstacles and temporal rules (like "dry off before charging").
  • Spacecraft Survival: In the Basilisk simulator, unshielded satellites frequently failed due to power loss or reaction wheel saturation. Satellites equipped with the data-driven shield survived the full 10-orbit mission duration every time.
  • Efficiency: Despite the complex math, the shield itself is fast. Once the abstraction is generated, the algorithm identifies safe actions in under a second for 2D cases and under 5 minutes for the high-dimensional spacecraft case.

Limitations and Future Work

  • The Curse of Dimensionality: While the 6D spacecraft result is impressive, generating the IMDP abstraction is computationally expensive. The spacecraft model took 17 hours to generate the initial abstraction. Scaling this to 12D or 24D systems remains a massive challenge.
  • Strictness vs. Uncertainty: For very strict safety specs (e.g., "remain safe for all eternity"), the current method sometimes finds no safe actions because the accumulated uncertainty over an infinite horizon becomes too large.
  • Model Fidelity: The authors noted that low-dimensional models might struggle to capture the nuances of high-dimensional systems, leading to overly conservative shields. Future work will look into how to learn high-dimensional systems more accurately without blowing up the computational cost.

Summary updated

BibTeX
@inproceedings{reed2025learning,
  author = {Robert Reed and Morteza Lahijanian},
  title = {{Learning-Based Shielding for Safe Autonomy under Unknown Dynamics}},
  booktitle = {ACC},
  year = {2025},
  doi = {10.23919/acc63710.2025.11108000},
}
Figure