A Provably Efficient Model-Free Posterior Sampling Method for Episodic Reinforcement Learning

Christoph Dann, Mehryar Mohri, Tong Zhang, Julian Zimmert

Overview

In Reinforcement Learning (RL), agents constantly face the dilemma of exploration (trying new actions to discover their value) versus exploitation (leveraging known actions to maximize reward). Historically, algorithms based on "Optimism in the Face of Uncertainty" (OFU) have provided strong theoretical, worst-case guarantees but can be notoriously difficult to implement in complex, high-dimensional settings. Conversely, Posterior Sampling (often known as Thompson Sampling) is more natural to implement and frequently performs better in practice. However, it has historically lacked rigorous "worst-case" frequentist guarantees, particularly for model-free approaches that don't rely on modeling the entire environment.

This paper bridges that gap. It introduces a novel, model-free posterior sampling algorithm that achieves near-optimal regret bounds across a wide range of complex environments, including both linear and non-linear Markov Decision Processes (MDPs).

The Conditional Posterior Sampling Algorithm

To achieve theoretical robustness without sacrificing the flexibility of posterior sampling, the authors propose the Conditional Posterior Sampling Algorithm.

Algorithm 1: Conditional Posterior Sampling Algorithm

This method relies on three key innovations to ensure efficient exploration and stable learning:

  1. Optimistic Prior: Unlike standard Bayesian priors, this algorithm uses a prior that is intentionally "nudged" to favor value functions predicting high initial rewards. This built-in optimism ensures the agent remains curious and explores sufficiently during the early stages of learning.
  2. Temporal Difference (TD) Error Likelihood: Because the method is model-free, it does not attempt to learn the full transition dynamics of the environment. Instead, the likelihood function is based on the squared TD error—measuring how much the predicted value of a state differs from the observed reward plus the estimated value of the subsequent state.
  3. Novel Normalization: Standard TD error is notoriously difficult to analyze theoretically due to the "double-sample" problem. The authors introduce a unique normalization term into their likelihood function. This mathematical "secret sauce" allows them to directly relate small TD losses to small Bellman errors, making the theoretical analysis viable for general function classes.

Key Theoretical Insights and Results

The core contribution of this paper is proving that there is no inherent "statistical efficiency gap" between OFU-based methods and posterior sampling. If the prior and likelihood are structured correctly, posterior sampling is just as efficient.

  • General Regret Bounds: The authors establish a general frequentist regret bound applicable to any MDP and value function class, provided they meet standard structural assumptions like realizability and completeness. They utilize a metric called the online decoupling coefficient to quantify exploration difficulty, showing it remains small for tabular MDPs, linear MDPs, and certain non-linear models.
  • Linear Scaling with Dimension: In the "Linear MDP" setting (where transitions and rewards are linear functions of features), previous posterior sampling methods suffered from regret that scaled quadratically with the feature dimension ($d^2$). This new formulation improves that scaling to linear ($d$), matching the best-known optimization-based results.
  • Near-Optimal Performance: For linear MDPs, the expected regret scales as $\tilde{O}(H^2 d \sqrt{T})$, where $H$ is the episode length, $d$ is the feature dimension, and $T$ is the number of episodes. This represents a significant improvement over prior state-of-the-art methods (like OPT-RLSVI) by a factor of $\sqrt{Hd}$.

Limitations and Future Directions

While the algorithm is highly statistically efficient—meaning it learns effectively from a small number of samples—it presents computational challenges.

  • Computational Efficiency: Sampling from the specific posterior defined by the authors is computationally intensive. Developing approximate, faster samplers remains an open challenge for practical deployment.
  • Expectation vs. High Probability: The current theoretical guarantees are bounds "in expectation." The authors note that deriving "high probability" bounds (guarantees that hold the vast majority of the time, rather than just on average) would require more complex analysis.
  • Iterative Sampling: The current algorithm samples the entire value function for all time steps simultaneously. A potential future improvement is developing a rule that allows for iterative sampling across time steps, which could simplify implementation.

Summary updated

BibTeX
@inproceedings{dann2021provably,
  author = {Christoph Dann and Mehryar Mohri and Tong Zhang and Julian Zimmert},
  title = {{A Provably Efficient Model-Free Posterior Sampling Method for Episodic Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=ezWVsOvgrU},
}
Figure