Multi-Agent Reinforcement Learning with Temporal Logic Specifications

Lewis Hammond, Alessandro Abate, Julian Gutierrez, Michael J. Wooldridge

Abstract

This paper presents Almanac (Automaton/Logic Multi-Agent Natural Actor-Critic), a novel multi-agent reinforcement learning (MARL) algorithm designed to satisfy complex tasks specified in Linear Temporal Logic (LTL). Almanac is the first such algorithm to provide formal convergence and correctness guarantees while utilizing function approximation. By integrating automata-based product games with a "patient" temporal difference update rule and lexicographic natural actor-critic methods, Almanac enables teams of agents to learn sophisticated behaviors in unknown, stochastic environments. Empirical evaluations against formal verification tools demonstrate high accuracy and superior scalability.

Introduction

Standard reinforcement learning typically relies on scalar reward signals, which are often inadequate for specifying complex, multi-stage tasks. Such specifications—for instance, "visit location A, then B, while avoiding C unless D has occurred"—are difficult to encode manually without risking "reward hacking." Linear Temporal Logic (LTL) provides a formal, human-readable alternative for specifying infinite-horizon goals.

While LTL has been applied in single-agent RL, the multi-agent domain presents significant challenges. Existing frameworks often struggle with the full expressivity of LTL, lack convergence guarantees, or fail to scale when using function approximation like neural networks. Almanac addresses these gaps, enabling a team of agents to satisfy multiple LTL specifications in environments with unknown transition dynamics.

Methodology

The Almanac architecture is built upon three foundational pillars:

  1. Automata-Based Product Games: LTL specifications are converted into Limit-Deterministic Büchi Automata (LDBAs). These state machines track the progress of the LTL formula. By forming a "Product Markov Game" (Product MG) between the environment and these automata, the objective is reduced to reaching "accepting" states within the automata.
  2. Patient Temporal Difference (TD) Learning: To prevent agents from becoming trapped in zero-reward loops that appear promising, Almanac introduces a "patient" update rule. This rule utilizes state-dependent discount factors that effectively "pause" discounting until a transition occurs in the automaton state, preventing the artificial inflation of value estimates.
  3. Lexicographic Natural Actor-Critic: The algorithm maintains two value functions: a patient function to ensure LTL satisfaction and a hasty function to optimize for efficiency. A lexicographic approach prioritizes task satisfaction over speed.

Experimental Evaluation

Almanac was evaluated using randomly generated Markov Games with varying numbers of states and agents. Performance was benchmarked against the PRISM model checker, a state-of-the-art formal verification tool, to determine the "ground truth" optimal satisfaction probabilities.

Results and Scalability

Theoretical analysis confirms that Almanac converges to local or global optima under standard RL assumptions. Empirically, the algorithm demonstrates high accuracy. As shown in the performance data, the absolute error between Almanac's learned policies and PRISM's exact solutions remains low across various configurations.

Table 1: Absolute error between Almanac's learned satisfaction probabilities and PRISM's ground truth across varying numbers of agents (rows 1-5) and states (columns 2^1 to 2^10).

A key finding is Almanac's scalability. While PRISM frequently encountered memory or time limits for larger state spaces (indicated by dashes in the table), Almanac continued to produce viable policies, highlighting the advantages of a learning-based approach over pure model checking for complex systems.

Discussion and Conclusion

Almanac represents a significant step forward in MARL with formal specifications. It is the first work in this sub-field to provide convergence proofs while supporting function approximation, which is essential for scaling to real-world problems.

However, several areas for future work remain. The lexicographic balancing of "satisfaction" versus "efficiency" (the "hasty" objective) involves subtle design choices. Additionally, while Almanac can operate with local policies, achieving global optimality currently requires some level of parameter sharing or common seeding. Future research will focus on enhancing decentralization and further improving the verification of these algorithms in even larger, more complex multi-agent environments.

Summary updated

BibTeX
@inproceedings{hammond2021multi,
  author = {Lewis Hammond and Alessandro Abate and Julian Gutierrez and Michael J. Wooldridge},
  title = {{Multi-Agent Reinforcement Learning with Temporal Logic Specifications}},
  booktitle = {AAMAS},
  year = {2021},
  url = {https://openreview.net/forum?id=Kk7qWtEISZ},
}
Figure