The Importance of Non-Markovianity in Maximum State Entropy Exploration

Mirco Mutti, Riccardo De Santi, Marcello Restelli

Introduction

In unsupervised Reinforcement Learning (RL), a primary objective is Maximum State Entropy (MSE) exploration. The goal is to interact with an environment to learn a policy that visits all states as uniformly as possible. This "pre-training" phase is crucial for enabling agents to solve downstream sparse-reward tasks efficiently.

Standard RL theory often posits that Markovian policies—where actions depend solely on the current state—are sufficient. While this holds true when averaging over an infinite number of trials, it fails to account for efficiency within a single episode or a finite batch of samples.

Conceptual illustration of exploration in a two-room environment.

As illustrated above, a memoryless (Markovian) agent might explore by flipping a coin at a junction. In a single run, it could visit the same room multiple times while ignoring others. Conversely, a non-Markovian agent can utilize its history ("I have already visited the left room") to ensure it explores the right room next, maximizing coverage in a single "shot."

Theoretical Framework: Finite-Sample MSE

The authors formalize this by shifting the objective from maximizing the entropy of the expected state distribution to maximizing the expected entropy of the state visitation frequency within a single trajectory.

This distinction is rooted in Jensen’s Inequality. Because entropy is a concave function, the entropy of an average distribution is always greater than or equal to the average entropy of individual runs. Standard MSE methods optimize the former, which can lead to high variance and poor exploration in practice. To analyze this gap, the paper introduces "regret-to-go," a metric measuring the potential entropy lost by following a specific policy from a given point in time.

Complexity and Hardness

The paper provides a rigorous proof that while deterministic non-Markovian policies can achieve zero regret in the finite-sample regime, finding the mathematically optimal strategy is NP-hard. This is demonstrated by reducing the problem from 3-SAT via Partially Observable Markov Decision Processes (POMDPs). Essentially, even in a fully observable environment, the agent's own history acts as a hidden variable that must be tracked, making the state space of "histories" grow exponentially with time.

Empirical Validation

The performance gap was tested using synthetic environments: 3State (a two-room abstraction) and River Swim (a benchmark requiring precise action sequences against a current).

Comparison of entropy frequency and state visitation between Markovian (πM) and non-Markovian (πNM) policies.

The results confirm that non-Markovian policies ($π_{NM}$) consistently achieve higher state entropy. In the 3State environment, $π_{NM}$ frequently reaches the maximum possible entropy, whereas the Markovian policy ($π_M$) often results in sub-optimal trajectories due to its inherent stochasticity.

Conclusion and Future Directions

This research highlights that non-Markovianity is not just a luxury but a necessity for efficient, single-trial exploration. While the computational complexity of tracking full histories is a barrier, it opens doors for practical approximations. Future work may involve using Recurrent Neural Networks (RNNs) or Transformers to represent "pseudo-non-Markovian" policies, or employing sliding-window histories to balance performance and tractability. This shift toward "Single-Trial RL" is particularly vital for real-world applications like robotics, where every interaction is costly.

Summary updated

BibTeX
@inproceedings{mutti2022importance,
  author = {Mirco Mutti and Riccardo De Santi and Marcello Restelli},
  title = {{The Importance of Non-Markovianity in Maximum State Entropy Exploration}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=9m_DMd9eMz8},
}
Figure