Q-Learning for robust satisfaction of signal temporal logic specifications

Derya Aksaray, Austin Jones, Zhaodan Kong, Mac Schwager, Calin Belta

Abstract

Autonomous systems often require the satisfaction of complex, time-sensitive requirements defined by Signal Temporal Logic (STL). However, applying standard Reinforcement Learning (RL) to STL-constrained tasks is challenging due to the history-dependence of temporal logic and the non-additive nature of STL robustness metrics. This paper introduces a framework that reformulates the problem into a history-dependent $\tau$-MDP and utilizes a log-sum-exp approximation to convert STL objectives into a standard additive reward format. We demonstrate that maximizing expected robustness provides a denser reward signal than binary satisfaction probability, leading to faster convergence and more resilient policies in stochastic environments.

Introduction

In autonomous robotics, tasks are frequently specified using Signal Temporal Logic (STL), which allows for precise definitions of time-bounded goals and safety constraints (e.g., "reach region A within 5 minutes while avoiding obstacles"). A key feature of STL is the "robustness degree," a continuous metric quantifying how well a specification is satisfied. Despite its utility, integrating STL with Q-learning faces two primary obstacles:

  1. Non-Markovian Dynamics: STL formulas are time-bounded, meaning an agent's optimal action often depends on its past trajectory, violating the Markov property essential for standard RL.
  2. Non-Additive Objectives: STL satisfaction and robustness are defined using min/max operators over a trajectory, whereas Q-learning is designed to maximize a cumulative sum of rewards.

Methodology

The $\tau$-MDP Framework

To address history dependence, the authors redefine the system state as a sequence of the last $\tau$ states, where $\tau$ is the temporal horizon of the STL formula. This construction, termed a $\tau$-MDP, effectively "unrolls" the necessary history into the state space, restoring the Markov property and allowing the agent to make decisions based on its recent path.

Log-Sum-Exp Approximation

To bridge the gap between STL's min/max semantics and Q-learning's additive reward structure, the authors employ a log-sum-exp approximation: $$\max(x_1, ..., x_n) \approx \frac{1}{\beta} \log \sum_{i=1}^n e^{\beta x_i}$$ As the parameter $\beta$ increases, the approximation becomes more precise. This transformation allows the robustness objective to be decomposed into a sum of rewards, making it compatible with standard Q-learning update rules. The authors provide theoretical guarantees showing that the resulting policy is provably close to the true optimal policy.

Experimental Evaluation

The proposed approach was evaluated in discretized grid-world environments with motion uncertainty (stochastic transitions). Two primary case studies were conducted:

  • Reachability: An agent must visit a specific region within a fixed time limit in a $6 \times 6$ grid.
  • Repeated Satisfiability: An agent must oscillate between two regions (A and B) over a mission horizon in a $4 \times 4$ grid.

Results and Discussion

The experiments highlighted a critical advantage of using robustness as a reward signal. While satisfaction probability is binary (providing sparse rewards), robustness acts as a "dense" reward, providing a gradient that guides the agent even before the task is fully completed.

In the reachability task, the agent achieved near 100% satisfaction probability within 1700 training episodes. In the more complex oscillation task, maximizing robustness led to a 93.6% satisfaction probability, significantly outperforming the 73.2% achieved by directly maximizing satisfaction probability. Qualitatively, agents trained on robustness tended to move toward the center of target regions, creating a safety buffer against stochastic noise.

Conclusion

This work provides a robust framework for applying Q-learning to STL specifications by addressing history dependence and non-additive rewards. While the $\tau$-MDP approach faces scaling challenges due to state-space explosion, the use of robustness as a dense reward signal significantly improves learning efficiency and policy resilience. Future work will explore extending this framework to continuous state spaces using Deep RL and coordinating multi-agent systems under collective STL constraints.

Summary updated

BibTeX
@inproceedings{aksaray2016q,
  author = {Derya Aksaray and Austin Jones and Zhaodan Kong and Mac Schwager and Calin Belta},
  title = {{Q-Learning for robust satisfaction of signal temporal logic specifications}},
  booktitle = {CDC},
  year = {2016},
  doi = {10.1109/cdc.2016.7799279},
}
Figure