(More) Efficient Reinforcement Learning via Posterior Sampling

Ian Osband, Daniel Russo, Benjamin Van Roy

Introduction

In Reinforcement Learning (RL), an agent must constantly navigate the "exploration-exploitation" tradeoff: should it stick to known strategies that yield reliable rewards (exploitation), or try something new to potentially discover a better strategy (exploration)?

For years, the gold standard for "provably efficient" exploration has been the principle of Optimism in the Face of Uncertainty (OFU). Algorithms like UCRL2 assign "optimism bonuses" to poorly understood states and actions, essentially pretending the world is better than it likely is to encourage the agent to visit those states. However, OFU methods have notable downsides:

  1. Computational Complexity: Solving for the "best possible" optimistic model often requires complex optimization over a set of many plausible environments.
  2. Conservatism: These algorithms can be overly cautious, leading to slow learning in practice.
  3. Rigidity: It is difficult to incorporate prior knowledge (like "physics usually works this way") into an optimistic framework.

This paper demonstrates that Posterior Sampling for Reinforcement Learning (PSRL)—a simpler, Bayesian approach where an agent samples a possible model of the world and acts optimally according to it—is both theoretically sound and empirically superior to traditional optimistic algorithms. The authors provide one of the first rigorous regret bounds for a non-optimistic RL algorithm, proving it is nearly as efficient as the state-of-the-art while being much easier to implement and computationally cheaper.

The PSRL Algorithm

The authors analyze the PSRL algorithm, originally proposed by Strens in 2000. The logic is elegantly simple and proceeds in repeated episodes:

  1. Update: At the start of an episode, the agent updates its "posterior distribution"—its current belief about what the Markov Decision Process (MDP) looks like, based on all data seen so far.
  2. Sample: The agent draws exactly one sample MDP from this distribution. This sample represents one "plausible reality."
  3. Solve: The agent calculates the optimal policy for that specific sampled MDP.
  4. Act: The agent follows that policy for the entire episode, collects new data, and repeats.

Unlike optimistic algorithms that try to find the "best of all possible worlds" within a confidence interval, PSRL simply picks one possible world at random (weighted by its likelihood) and acts as if it were true. Exploration happens naturally: when uncertainty is high, the sampled MDPs will vary wildly, forcing the agent to try different things. As data accumulates, the posterior narrows, and the agent naturally transitions into exploitation.

Experimental Setup

The paper evaluates PSRL using two primary simulation environments:

  • RiverSwim: A classic RL benchmark designed specifically to test exploration. The agent starts at one end of a "river" and receives a small reward for staying put. To get a much larger reward, it must swim "upstream" against a current that frequently pushes it back. Without smart exploration, most agents never discover the big reward.
RiverSwim Environment
  • Randomly Generated MDPs: To test general performance, the authors also used 10-state, 5-action environments where the dynamics and rewards were sampled from a prior distribution.

Key Insights and Results

Theoretical Guarantees

The core theoretical breakthrough is a "regret equivalence" lemma. The authors show that, from the agent's perspective, the expected difference between the "true" optimal reward and what the agent actually gets is equivalent to the difference between the "sampled" optimal reward and the actual reward. This allows them to bridge the gap between Bayesian probability and hard regret bounds.

Ultimately, the authors prove an expected regret bound of $\tilde{O}(\tau S \sqrt{AT})$, where $\tau$ is episode length, $S$ is the number of states, $A$ is the number of actions, and $T$ is total time. This matches the scaling of the best optimistic algorithms of the era.

Empirical Dominance

Despite similar theoretical bounds, PSRL dramatically outperforms optimistic algorithms in practice.

PSRL vs UCRL2 Regret

In the RiverSwim environment, PSRL outperformed the optimistic UCRL2 algorithm by orders of magnitude. While UCRL2 was still struggling to learn the optimal path and accumulating massive regret, PSRL converged almost immediately. Furthermore, PSRL performed better across both episodic tasks and "infinite horizon" tasks (where the agent doesn't get reset), showing it is a versatile tool for different RL settings.

Limitations and Future Work

  • Bayesian vs. Frequentist Regret: The primary bound is for "Bayesian regret" (average performance over many possible worlds). While they provide a corollary linking this to frequentist regret (performance in one specific world), some researchers still prefer the stronger "worst-case" frequentist bounds typical of OFU methods.
  • Scaling to Large State Spaces: The paper focuses on "tabular" RL, where states and actions are discrete and manageable. Scaling PSRL to continuous or massive state spaces (like those in Deep RL) requires approximating the posterior, which remains a significant area of ongoing research.
  • Prior Sensitivity: Like all Bayesian methods, PSRL depends on the choice of a "prior." If the prior is wildly wrong, the initial exploration might be inefficient, though the algorithm will eventually correct itself as it sees more data.

Summary updated

BibTeX
@inproceedings{osband2013more,
  author = {Ian Osband and Daniel Russo and Benjamin Van Roy},
  title = {{(More) Efficient Reinforcement Learning via Posterior Sampling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2013},
  url = {https://openreview.net/forum?id=rkV17wWObH},
}
Figure