Learning Symbolic Representations for Reinforcement Learning of Non-Markovian Behavior

Phillip J. K. Christoffersen, Andrew C. Li, Rodrigo Toro Icarte, Sheila A. McIlraitharXiv 2023 · DOI

Introduction

In Reinforcement Learning (RL), the standard Markov assumption posits that the current state of an environment provides sufficient information for optimal decision-making. However, many real-world tasks are inherently non-Markovian, where the optimal action depends on the history of past events. For instance, an agent must remember it has already acquired a key before it can successfully unlock a door. While Recurrent Neural Networks (RNNs) like LSTMs are commonly used to handle such temporal dependencies, they often suffer from poor sample efficiency, training instability, and a lack of interpretability.

A recent study by researchers at the University of Toronto and the Vector Institute proposes a novel approach: AutRL (Automated RL). This algorithm automatically discovers symbolic state abstractions, represented as finite automata, to solve non-Markovian tasks by effectively "summarizing" history into discrete logical states.

The Problem of Non-Markovian Rewards

Standard deep RL agents struggle with tasks where rewards are sparse and dependent on long-term sequences. While Knowledge Representation (KR) techniques can mitigate this by manually defining relevant symbols (e.g., has_key), this requires significant domain expertise. AutRL aims to bridge this gap by enabling agents to autonomously discover these symbolic abstractions from their interactions with the environment.

The AutRL Algorithm

AutRL operates through an iterative process that alternates between two distinct phases:

  1. The Learning Phase: The agent interacts with the environment using tabular Q-learning. Its state space is augmented with the current state $q$ of a Deterministic Finite Automaton (DFA), resulting in an augmented state $(S, q)$. This transformation effectively makes the non-Markovian problem Markovian relative to the DFA states.
  2. The Discovery Phase: When the agent's performance plateaus below a desired threshold, it analyzes its interaction traces. An offline DFA-learning algorithm is then employed to construct a DFA that discriminates between traces that led to a reward and those that did not.
A learned Deterministic Finite Automaton (DFA) for the Hallway task, illustrating how history is summarized into discrete logical states.

By finding a DFA that captures the underlying logic of the task—such as "visit A, then B"—the agent creates a compact, discrete memory that is far easier to exploit than the continuous hidden states of an RNN.

Experimental Evaluation

The researchers evaluated AutRL across four domains designed to test logical sequencing:

  • Multi-Armed Bandit: Requires pulling six arms in a specific, precise order.
  • Hallway: A 1x10 grid where the agent must reach the rightmost square before returning to the leftmost square.
  • Gridworld & Stochastic Gridworld: 5x5 grids requiring sequential visits to specific coordinates, with the stochastic version introducing noisy rewards and action failures.

Results and Discussion

The performance of AutRL was compared against Recurrent-PPO, a state-of-the-art deep RL algorithm utilizing LSTMs.

Comparison of AutRL (blue) and Recurrent-PPO (red) on the Hallway task, showing superior sample efficiency and stability.

Key Findings:

  • Sample Efficiency: AutRL consistently reached optimal performance significantly faster than Recurrent-PPO, often by an order of magnitude.
  • Stability: Unlike the high variance observed in LSTM-based agents, AutRL demonstrated remarkable stability across different training runs.
  • Interpretability: The learned DFAs provide a transparent view of the agent's internal logic, identifying the specific "milestones" necessary for reward attainment.
  • Robustness to Noise: Despite the discrete nature of DFAs, the algorithm remained effective in stochastic environments by employing regularization techniques during the DFA-learning phase to prevent overfitting to noise.

Conclusion and Future Work

AutRL represents a significant step toward integrating symbolic logic with reinforcement learning. By automating the discovery of state abstractions, it overcomes many limitations of purely connectionist memory models. However, several challenges remain. The current implementation is limited to tasks representable by regular languages and has primarily been tested in discrete, tabular environments. Future research will focus on scaling these symbolic methods to high-dimensional continuous state spaces and extending the framework to handle Partially Observable Markov Decision Processes (POMDPs).

Reference: Christoffersen, P. J. K., Li, A. C., Toro Icarte, R., & McIlraith, S. A. (2020). Learning Symbolic Representations for Reinforcement Learning of Non-Markovian Behavior. Presented at the KR2ML Workshop at NeurIPS 2020.

Summary updated

BibTeX
@misc{christoffersen2023learning,
  author = {Phillip J. K. Christoffersen and Andrew C. Li and Rodrigo Toro Icarte and Sheila A. McIlraith},
  title = {{Learning Symbolic Representations for Reinforcement Learning of Non-Markovian Behavior}},
  year = {2023},
  eprint = {2301.02952},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.02952},
}
Figure