Rule-based Shield Synthesis for Partially Observable Monte Carlo Planning

Giulio Mazzi, Alberto Castellini, Alessandro Farinelli

Autonomous planning in uncertain environments often relies on "black-box" online planners. While powerful, these planners can be difficult to trust due to their lack of interpretability and potential for failure under poor calibration. This research, presented at OVERLAY 2021, introduces a shielding framework that uses formal logic to ensure Partially Observable Monte-Carlo Planning (POMCP) agents remain safe and effective.

The Challenge of Trusting POMCP

Planning under uncertainty is typically modeled as a Partially Observable Markov Decision Process (POMDP). Algorithms like POMCP use Monte Carlo Tree Search (MCTS) to navigate these complex spaces. However, POMCP faces two significant hurdles:

  1. Interpretability: It calculates actions on-the-fly without a global policy, making it hard for humans to understand its reasoning.
  2. Fragility: If parameters like the exploration constant ($c$) are suboptimal, the agent may overlook high-risk outcomes, leading to catastrophic failures.

A Two-Stage Shielding Framework

To address these issues, the authors propose a methodology that combines expert insight with automated rule synthesis.

The shielding framework: (Left) Rule synthesis using MAX-SMT from execution traces and expert templates. (Right) Example logical rules for the Tiger Problem.

1. Rule Synthesis via MAX-SMT

Rather than requiring experts to write exhaustive code, the system utilizes rule templates. These are logical formulas with free variables (e.g., "Listen if the probability of a threat is less than $x$"). By analyzing execution traces of a running agent, a Maximum Satisfiability Modulo Theory (MAX-SMT) solver identifies the optimal values for these variables that align with the expert's qualitative intent.

2. Online Shielding

Once finalized, the rules are integrated as a "shield." During execution, the shield monitors the actions proposed by the POMCP agent. If a suggested action violates a safety rule, the shield intervenes, blocking the risky move and substituting it with a safe alternative that satisfies the logical constraints.

Experimental Evaluation

The framework was tested on two benchmarks:

  • The Tiger Problem: A classic POMDP where an agent must decide whether to open doors (treasure vs. tiger) or listen for clues.
  • Velocity Regulation: A navigation task where a robot must maximize speed while avoiding crashes in segments of hidden difficulty.

Key Results and Performance Gains

The most significant finding is the "safety net" effect. The shield effectively corrects a "broken" or poorly tuned planner. For instance, in the Tiger Problem, when the exploration constant $c$ was lowered—making the agent "blind" to certain risks—the unshielded agent's performance plummeted. The shielded version maintained near-perfect returns because the shield overrode the agent's bad guesses.

Experimental results for the Velocity Regulation task, showing significant relative improvement (RI) in returns when using the shield, especially as the planner becomes less optimal.

In the Velocity Regulation task, the shielded agent achieved up to an 81% relative increase in return compared to the unshielded version when operating under imprecise parameters. Notably, the shield achieved these gains with minimal intervention; in some cases, intervening just 7 times over thousands of steps was sufficient to significantly boost performance.

Conclusion

This research demonstrates that rule-based shielding can bridge the gap between high-performance online planning and the requirements for safety and explainability. By allowing experts to provide qualitative templates that are quantitatively tuned via MAX-SMT, the system creates a robust safety layer. Future work aims to transition from offline training to online rule synthesis, allowing agents to update their safety constraints dynamically during operation.

Summary updated

BibTeX
@inproceedings{mazzi2021rule,
  author = {Giulio Mazzi and Alberto Castellini and Alessandro Farinelli},
  title = {{Rule-based Shield Synthesis for Partially Observable Monte Carlo Planning}},
  booktitle = {OVERLAY@GandALF},
  year = {2021},
}
Figure