On the (In)Tractability of Reinforcement Learning for LTL Objectives

Cambridge Yang, Michael L. Littman, Michael Carbin

Introduction

In reinforcement learning (RL), defining an agent's goals through scalar reward functions is a common but error-prone practice. "Reward engineering" often leads to unintended behaviors where agents exploit reward structures rather than achieving the desired outcome. Linear Temporal Logic (LTL) has emerged as a powerful alternative, allowing developers to specify complex, logical behaviors such as "eventually reach the goal, but never touch the lava" or "always maintain system stability."

Despite the proliferation of algorithms designed to optimize LTL objectives, researchers have long observed that infinite-horizon properties (e.g., "always do X") are significantly harder to learn than finite ones. This paper provides a formal theoretical analysis of this challenge, answering a fundamental question: Is it possible for an RL agent to guarantee it has learned an optimal policy for any given LTL objective in an unknown environment?

Theoretical Framework

The authors evaluate LTL learnability using the Probably Approximately Correct in Markov Decision Processes (PAC-MDP) framework. An algorithm is considered PAC-MDP if it can guarantee, with high probability, that it will find a near-optimal policy using a number of environmental interactions that is polynomial in the problem's parameters.

To derive their results, the authors constructed a family of synthetic "counterexample" MDPs. These environments are parameterized by an unknown transition probability $p$. By mathematically reducing the problem of satisfying general infinite-horizon LTL formulas to the task of reaching a specific state in these MDPs, the authors were able to calculate strict lower bounds on sample complexity.

The Hierarchy of LTL Objectives

A central contribution of this work is the classification of LTL objectives based on their inherent learnability. The authors demonstrate that the standard hierarchy of temporal properties—ranging from simple safety and guarantee properties to complex reactivity—determines the feasibility of reinforcement learning.

Hierarchy of LTL property classes, ranging from restricted (Finitary) to general (Reactivity).

As illustrated in the figure above, "Finitary" LTL represents the most restricted class, containing properties that can be definitively evaluated within a known, finite number of steps (e.g., "do X for exactly 100 steps"). The authors prove that this is the only class for which PAC-MDP guarantees can be provided in completely unknown environments.

Key Results and Empirical Validation

The paper's core theorem states that an LTL formula is LTL-PAC-learnable if and only if the formula is finitary. For any infinite-horizon objective, the authors derived a sample complexity lower bound of $\Omega(\frac{\log(2\delta)}{\log(1-p)})$. Because the transition probability $p$ is unknown and can be arbitrarily small, this bound cannot be constrained by a polynomial, breaking the requirements for PAC-MDP learnability.

Empirical validation showing the exponential growth in required samples as the transition probability p decreases.

To validate these theoretical findings, the authors tested existing LTL-RL algorithms on their counterexample MDPs. As shown in the plot above, as the transition probability $p$ decreases, the number of samples required to reach a high PAC probability grows exponentially. This perfectly mirrors the theoretical proof: in the presence of "unknown unknowns" (rare but critical transitions), an agent may confidently learn a sub-optimal policy simply because it never encountered the rare event necessary to satisfy the infinite-horizon objective.

Discussion and Future Directions

While these results highlight a fundamental limitation, they also provide a roadmap for more robust RL design. To recover learnability, the authors suggest several practical workarounds:

  1. Restrict Specifications: Focus on finitary properties that have a clear time horizon.
  2. Incorporate Prior Knowledge: If the minimum transition probability of an environment is known beforehand, sample complexity can be bounded.
  3. Relaxed Semantics: Shifting from exact LTL to "LTL-like" objectives, such as discounted or geometric LTL, may allow for PAC-learnability while retaining the expressive benefits of logical specification.

Ultimately, this research underscores that for complex, infinite-horizon tasks, pure exploration in unknown environments is insufficient for guaranteed success.

Summary updated

BibTeX
@inproceedings{yang2022tractability,
  author = {Cambridge Yang and Michael L. Littman and Michael Carbin},
  title = {{On the (In)Tractability of Reinforcement Learning for LTL Objectives}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/507},
}
Figure