Learning Probabilistic Temporal Safety Properties from Examples in Relational Domains

Gavin Rens, Wen-Chi Yang, Jean-François Raskin, Luc De RaedtarXiv 2022 · DOI

Introduction

Ensuring the safety of autonomous systems often relies on pre-defined formal specifications. However, in complex, real-world environments, manually crafting these specifications is error-prone and difficult. It is frequently easier for human experts to identify safe or unsafe states through observation than to write rigorous logical formulas. This paper introduces Learn-pCTL, a framework designed to automatically induce human-interpretable safety rules from labeled examples within relational domains.

The Challenge of Relational Safety

Most safety verification methods operate on "unstructured" states—typically vectors of numerical values. In contrast, many real-world tasks are inherently relational, defined by objects and their interdependencies (e.g., "Container A is near Container B"). Furthermore, these environments are often stochastic, requiring safety properties to be expressed probabilistically. Learn-pCTL addresses these challenges by learning specifications in Probabilistic Computation Tree Logic (pCTL) that account for both relational structure and system uncertainty.

The Learn-pCTL Framework

The core of the approach is an inductive learning algorithm that searches for pCTL formulas that correctly classify states as safe or unsafe based on expert labels.

Optimal Refinement Operators

The algorithm employs a "top-down" search, starting from the most general rule and systematically specializing it using four primary operations:

  1. Lengthening: Adding new conditions to a rule.
  2. Unification: Linking different variables within a formula.
  3. Instantiation: Replacing a general variable with a specific object.
  4. Globalization: Transforming an "eventually" ($F$) property into a "globally" ($G$) property.

Verification and Pruning

To evaluate candidate formulas, Learn-pCTL integrates with pCTL-REBEL, a relational model checker. This tool determines whether a given state in a Relational Markov Decision Process (RMDP) satisfies a candidate formula. Because the search space of logical formulas is vast, the authors implement OI-subsumption—a logical pruning technique. By identifying when one rule is a more specific version of another, the system can discard redundant candidates without invoking the computationally expensive model checker. The framework can operate in both policy-agnostic and policy-specific modes, depending on whether the agent's behavior is known.

Experimental Evaluation

The framework was evaluated on synthetic relational domains, most notably the Chemical Warehouse (CW). In this scenario, different types of chemical containers (e.g., Water and Rubidium) must be managed to prevent explosive reactions. The goal was to learn the underlying safety rules governing container proximity and storage.

Key Results

  • Efficiency through Pruning: The use of subsumption pruning proved highly effective, often reducing the number of required model-checker calls by over 80%. In many experiments, the algorithm only needed to check a few hundred candidates despite a significantly larger search space.
  • Data Scaling: As the number of positive examples (safe states) provided to the system increased, the search process became more efficient. The additional data allowed the algorithm to narrow the search space more quickly, leading to faster and more precise learning.
  • Relational Generalization: Because the learned rules are relational (using variables rather than specific object IDs), properties learned in small-scale environments can theoretically be generalized to larger, more complex systems.

Discussion and Future Work

Learn-pCTL represents a significant step toward interpretable AI safety. By producing logical formulas rather than black-box classifiers, the system allows humans to verify, understand, and edit the learned safety constraints.

However, several avenues for improvement remain. The current logic fragment lacks support for disjunction (the "OR" operator), which limits the complexity of the rules that can be learned. Additionally, the performance is currently bottlenecked by the speed of the pCTL-REBEL model checker. Future research will focus on expanding the logic to include nested probabilistic operators and automating the selection of time bounds ($k$) and probability thresholds ($\alpha$).

Summary updated

BibTeX
@misc{rens2022learning,
  author = {Gavin Rens and Wen-Chi Yang and Jean-François Raskin and Luc De Raedt},
  title = {{Learning Probabilistic Temporal Safety Properties from Examples in Relational Domains}},
  year = {2022},
  eprint = {2211.03461},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.03461},
}
Figure