Optimistic Posterior Sampling for Reinforcement Learning with Few Samples and Tight Guarantees

Daniil Tiapkin, Denis Belomestny, Daniele Calandriello, Eric Moulines, Rémi Munos, Alexey Naumov, Mark Rowland, Michal Valko, Pierre Ménard

Introduction

In reinforcement learning (RL), the agent's ability to navigate the exploration-exploitation trade-off determines its efficiency. While Upper Confidence Bound (UCB) methods provide strong theoretical "frequentist" guarantees, Posterior Sampling for Reinforcement Learning (PSRL) often exhibits superior empirical performance. However, bridging the gap between PSRL's practical success and its theoretical analysis has remained a significant challenge.

Specifically, achieving the optimal regret bound of $\sqrt{H^3SAT}$ without requiring an excessive number of samples—often proportional to the state space size $S$—has been an open problem. This paper introduces Optimistic Posterior Sampling for Reinforcement Learning (OPSRL), an algorithm that achieves the theoretical "gold standard" for regret in episodic Markov Decision Processes (MDPs) using only a logarithmic number of samples.

The OPSRL Framework

OPSRL refines the standard posterior sampling approach through three strategic modifications designed to ensure optimism while maintaining sample efficiency:

  1. Optimistic Pseudo-state: The algorithm introduces an artificial "absorbing" state ($s_0$) that yields maximum rewards. By initializing the prior to assume all actions lead to $s_0$, the agent is naturally incentivized to explore until it gathers enough data to refine its model.
  2. Inflated Posterior: To ensure the agent considers a sufficiently diverse range of models, the authors "inflate" the Dirichlet distribution used to model transition probabilities. This increased variance ensures that the sampled models include optimistic possibilities.
  3. Multiple Samples ($J$): Rather than acting on a single sample from the posterior, OPSRL draws $J$ independent samples and selects the most optimistic one (the one maximizing the value function).

Technical Breakthrough: Dirichlet Anti-concentration

The primary contribution of this work is a novel anti-concentration inequality for Dirichlet distributions. Historically, researchers struggled with Dirichlet distributions because they are difficult to decompose; previous attempts often simplified them into Beta distributions, which introduced loose factors of $S$ into the regret bounds.

By employing a "saddle-point method" from complex analysis, the authors directly analyzed the Dirichlet geometry. They proved that the tail of the distribution is well-behaved enough that only $J \approx \log(S)$ samples are required to guarantee optimism with high probability. This finding—that a logarithmic number of samples is sufficient to "cover" the state space—is a major theoretical surprise that removes the previous dependency on the number of states for sample counts.

Efficiency and Performance

Beyond its theoretical tightness, the paper addresses computational overhead. The authors propose Lazy-OPSRL, a variant that updates the agent's policy only at visited states. This reduces the per-episode computational complexity from $O(HS^2A)$ to $O(HSA)$ without degrading the regret guarantee.

In empirical tests using a $10 \times 10$ Grid-World environment ($H=50$), OPSRL demonstrated that its theoretical "inflation" does not hinder practical utility. It outperformed standard bonus-based algorithms like UCBVI and remained competitive with the original PSRL, all while maintaining the best possible theoretical safety net.

Conclusion and Future Work

OPSRL successfully closes a long-standing gap for episodic MDPs, achieving a regret bound of $\tilde{O}(\sqrt{H^3SAT})$ that matches known lower bounds. While the algorithm currently requires $J > 1$ samples, the logarithmic requirement makes it highly scalable.

Future research directions include:

  • Infinite-Horizon Settings: Extending these proofs to tasks that do not have a fixed end point.
  • The Single-Sample Challenge: Determining if a single sample ($J=1$) can achieve these same tight frequentist bounds without inflation.
  • Model-Free Adaptation: Adapting the "optimism-via-noise" mechanism to model-free algorithms like Q-learning to reduce memory requirements.

Summary updated

BibTeX
@inproceedings{tiapkin2022optimistic,
  author = {Daniil Tiapkin and Denis Belomestny and Daniele Calandriello and Eric Moulines and Rémi Munos and Alexey Naumov and Mark Rowland and Michal Valko and Pierre Ménard},
  title = {{Optimistic Posterior Sampling for Reinforcement Learning with Few Samples and Tight Guarantees}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
}
Figure