Posterior sampling for reinforcement learning: worst-case regret bounds

Shipra Agrawal, Randy JiaarXiv 2017

Introduction

In the field of Reinforcement Learning (RL), an agent must navigate the fundamental trade-off between exploration (gathering new information about the environment) and exploitation (leveraging existing knowledge to maximize rewards). Historically, two distinct philosophies have dominated this space. The first, "Optimism in the Face of Uncertainty" (UCB), provides rigorous theoretical guarantees but can be computationally rigid. The second, Posterior Sampling (also known as Thompson Sampling), is celebrated for its empirical performance and simplicity but has lacked the same level of worst-case theoretical backing in complex environments.

This research bridges that gap, presenting a posterior sampling-based algorithm that achieves near-optimal worst-case regret bounds for communicating Markov Decision Processes (MDPs). By proving that randomized sampling can be as robust as deterministic exploration bonuses, the authors provide a unified theoretical foundation for Thompson Sampling in RL.

The Problem: Bridging Bayesian and Minimax Regret

Performance in RL is typically measured by regret: the cumulative difference between the rewards earned by an optimal policy and those earned by the learning agent. Most algorithms with strong "minimax" (worst-case) guarantees rely on UCB principles, which add a deterministic "bonus" to uncertain state-action pairs.

While Posterior Sampling is often preferred in practice, its theoretical guarantees were previously limited to Bayesian regret—the average performance over a known prior distribution. This paper addresses the more stringent requirement of worst-case regret in "communicating" MDPs. These are environments where any state can be reached from any other state within a finite number of steps, defined by the diameter ($D$). The challenge was to determine if a sampling-based approach could match the performance of the gold-standard UCRL2 algorithm in these non-episodic settings.

Methodology: Optimistic Posterior Sampling

The authors introduce a modified version of Posterior Sampling for Reinforcement Learning (PSRL), characterized by several key innovations designed to ensure robust exploration:

  1. Doubling Epochs: To manage computational overhead, the agent does not update its policy at every step. Instead, updates occur only when the number of visits to a specific state-action pair doubles, ensuring that policy changes are driven by significant new information.
  2. Optimistic Posterior Sampling: Rather than taking a single sample from the Dirichlet posterior (the standard distribution for transition probabilities), the algorithm generates $\psi = \tilde{O}(S)$ independent samples for every state and action.
  3. Extended MDP Construction: The algorithm constructs an "Extended MDP" with an expanded action space. For every original action, there are $\psi$ versions, each corresponding to one of the sampled transition vectors. The agent then solves for the optimal policy within this larger, artificial environment.
  4. Dirichlet Anti-concentration: A central mathematical contribution of the paper is the proof of new anti-concentration bounds for the Dirichlet distribution. This ensures the distribution maintains enough "spread" so that at least one of the multiple samples is likely to be sufficiently optimistic to drive necessary exploration.

Key Insights: Sampling as an Exploration Bonus

The core insight of this work is that explicit mathematical bonuses (like $\sqrt{\log(t)/n}$) are not strictly necessary for optimism. By taking multiple samples from a posterior, the agent is statistically likely to "hit" an optimistic model. This effectively transforms randomization into a tool for achieving the same goals as deterministic UCB algorithms.

Furthermore, by proving that the Dirichlet distribution does not shrink too rapidly, the authors demonstrate that the agent will not prematurely converge on a sub-optimal transition model due to early, unlucky observations. This allows the algorithm to move beyond Bayesian averages and satisfy the requirements for minimax regret.

Results and Theoretical Impact

The proposed algorithm achieves a high-probability regret bound of $\tilde{O}(DS\sqrt{AT})$, where $S$ is the number of states, $A$ is the number of actions, and $T$ is the time horizon.

This result is significant for several reasons:

  • Near-Optimality: The bound closely matches the known theoretical lower bound for this class of problems, $\Omega(\sqrt{DSAT})$.
  • Theoretical Parity: It is the first posterior sampling-based algorithm to achieve these specific worst-case bounds for non-episodic, communicating MDPs, placing it on equal theoretical footing with UCRL2.
  • Robustness: It proves that randomized exploration is not just an empirical heuristic but a theoretically sound strategy for the most difficult environment instances.

Limitations and Future Work

While the paper marks a theoretical milestone, it introduces certain computational trade-offs. The requirement to solve an extended MDP with $\tilde{O}(SA \cdot S)$ actions is more complex than standard PSRL. It remains an open question whether these extra samples are a fundamental requirement for worst-case bounds or a byproduct of the current proof techniques.

Additionally, the regret bound maintains a linear dependence on the state space ($S$). Future research may look toward value function analysis to reduce this to $\sqrt{S}$, as seen in recent episodic RL literature. Finally, extending these minimax guarantees to continuous or contextual MDPs remains a vital frontier for reinforcement learning theory.

Summary updated

BibTeX
@misc{agrawal2017posterior,
  author = {Shipra Agrawal and Randy Jia},
  title = {{Posterior sampling for reinforcement learning: worst-case regret bounds}},
  year = {2017},
  eprint = {1705.07041},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.07041},
}
Figure