Reinforcement Learning for Temporal Logic Control Synthesis with Probabilistic Satisfaction Guarantees

Mohammadhosein Hasanbeig, Yiannis Kantaros, Alessandro Abate, Daniel Kroening, George J. Pappas, Insup Lee

Introduction

Standard reinforcement learning (RL) typically focuses on maximizing scalar rewards for simple goals, such as reaching a target state. However, real-world applications often demand adherence to complex, high-level specifications involving sequences, safety constraints, and conditional logic (e.g., "visit Room A, then Room B, but never enter Room C unless you have a key"). Manually designing reward functions for such tasks is difficult and prone to "reward hacking."

This paper addresses the challenge of model-free control synthesis for tasks defined by Linear Temporal Logic (LTL) in unknown, stochastic environments. Unlike previous model-based approaches that require prior knowledge of transition probabilities, the proposed framework enables an agent to learn optimal policies that maximize the probability of satisfying sophisticated logic requirements through exploration alone.

Methodology

The authors propose a pipeline that integrates formal methods with episodic Q-learning:

  1. Environment Modeling: The environment is modeled as a Probabilistically-Labeled MDP (PL-MDP), where labels (e.g., obstacles or targets) are discovered and mapped during exploration.
  2. Automaton Translation: LTL formulas are translated into Limit Deterministic Büchi Automata (LDBA). LDBAs are significantly more compact than traditional Deterministic Rabin Automata (DRA), mitigating the "state-space explosion" common in formal verification.
  3. On-the-Fly Product MDP: The agent constructs a "product" of the environment and the LDBA dynamically. This avoids the need to pre-calculate a massive state-logic map.
  4. Synchronous Reward Shaping: A novel reward function is derived from the LDBA's acceptance conditions. By tracking an "accepting frontier," the agent is incentivized to satisfy all components of a complex task infinitely often.
  5. Learning: Using episodic Q-learning, the agent finds a policy that maximizes accumulated rewards, which is mathematically proven to be equivalent to maximizing the satisfaction probability of the LTL formula.

Experimental Evaluation

The framework was evaluated across three simulated environments:

  • Case Studies I & II: A $10 \times 10$ grid world where a robot navigates dynamic targets while avoiding obstacles. Case II specifically tests environments lacking "Accepting Maximum End Components" (AMECs), where traditional algorithms often fail.
  • Case Study III (Pacman): An adaptation of the Atari game where the agent must consume specific items in a prescribed order while evading ghosts.
Grid world environment used in Case Studies I and II, showing a learned path for a complex LTL task.

As shown in the grid world visualization, the agent successfully learns to navigate complex paths that satisfy the temporal logic constraints despite the stochastic nature of the environment.

Key Results and Insights

The proposed method demonstrates asymptotic optimality, converging to policies that maximize satisfaction probability. In grid world experiments, optimal policies were learned within 30 minutes to 2 hours.

Convergence of the satisfaction probability over training episodes for Case Studies I, II, and III.

Key findings include:

  • Efficiency: The use of LDBAs drastically reduced state-space complexity (e.g., from 11 states in a DRA to 5 in an LDBA for a specific formula).
  • Robustness: If a task is impossible to satisfy fully, the algorithm converges to a policy that maximizes the "closeness" to satisfaction.
  • AMEC-Free Learning: The algorithm remains effective in environments where failure is eventually certain (e.g., due to noise), finding policies that survive the longest and satisfy the most requirements before failure.

Discussion and Future Work

While the LDBA approach is more efficient than previous methods, scalability remains a challenge for extremely intricate LTL formulas. Furthermore, while this work focuses on discrete state spaces, the authors suggest that the LDBA framework could be integrated with Deep RL (e.g., PPO or SAC) to handle continuous environments and improve sample efficiency in future research.

Summary updated

BibTeX
@inproceedings{hasanbeig2019reinforcement,
  author = {Mohammadhosein Hasanbeig and Yiannis Kantaros and Alessandro Abate and Daniel Kroening and George J. Pappas and Insup Lee},
  title = {{Reinforcement Learning for Temporal Logic Control Synthesis with Probabilistic Satisfaction Guarantees}},
  booktitle = {CDC},
  year = {2019},
  doi = {10.1109/cdc40024.2019.9028919},
}
Figure