Abstract
We tackle the problem of acting in an unknown finite and discrete Markov Decision Process (MDP) for which the expected shortest path from any state to any other state is bounded by a finite number $D$. An MDP consists of $S$ states and $A$ possible actions per state. Upon choosing an action $a_t$ at state $s_t$, one receives a real value reward $r_t$, then one transits to a next state $s_{t+1}$. The reward $r_t$ is generated from a fixed reward distribution depending only on $(s_t, a_t)$ and similarly, the next state $s_{t+1}$ is generated from a fixed transition distribution depending only on $(s_t, a_t)$. The objective is to maximize the accumulated rewards after $T$ interactions. In this paper, we consider the case where the reward distributions, the transitions, $T$ and $D$ are all unknown. We derive the first polynomial time Bayesian algorithm, BUCRL that achieves up to logarithm factors, a regret of the optimal order $\tilde{\mathcal{O}}(\sqrt{DSAT})$. Importantly, our result holds with high probability for the worst-case (frequentist) regret and not the weaker notion of Bayesian regret. We perform experiments in a variety of environments that demonstrate the superiority of our algorithm over previous techniques. Our work also illustrates several results that will be of independent interest. In particular, we derive a sharper upper bound for the KL-divergence of Bernoulli random variables. We also derive sharper upper and lower bounds for Beta and Binomial quantiles. All the bound are very simple and only use elementary functions.
Introduction
Reinforcement Learning (RL) agents must navigate unknown environments to maximize cumulative rewards, a task that inherently involves the exploration-exploitation dilemma. Historically, solutions have been divided into two paradigms: frequentist algorithms (like UCRL2) and Bayesian algorithms (like PSRL). Frequentist methods rely on concentration inequalities to build optimistic confidence intervals, providing robust worst-case regret guarantees but often suffering from practical inefficiency due to over-conservatism. Bayesian methods typically offer superior empirical performance by sampling from posterior distributions, but they often lack strong "frequentist" regret guarantees, meaning they may fail in specific, difficult environments.
The BUCRL Algorithm
This paper introduces BUCRL (Bayesian Upper Confidence Reinforcement Learning), the first polynomial-time Bayesian algorithm to achieve near-optimal frequentist regret. BUCRL bridges the gap between practical Bayesian efficiency and rigorous theoretical guarantees by using marginal quantiles of the posterior distribution to define a set of "statistically plausible" MDPs.
The algorithm follows a structured approach:
- Posterior Maintenance: It updates a Bayesian prior (specifically Beta distributions for rewards and transitions) as new data is collected.
- Quantile Construction: It calculates upper and lower quantiles from the posterior to define the range of likely rewards and transition probabilities.
- Optimistic Planning: It solves for the best possible policy across all MDPs within those quantile ranges.
- Extended Doubling Trick: The policy is executed in episodes that end when the data for any state-action pair has doubled, balancing computational load with learning frequency.
Theoretical and Mathematical Contributions
A significant portion of the research is dedicated to deriving new, tighter mathematical bounds for Bernoulli KL-divergence and Beta/Binomial quantiles. These bounds are critical for proving that BUCRL achieves a regret of $\tilde{O}(\sqrt{DSAT})$, matching the theoretical lower bound for this problem class. This result confirms that Bayesian quantiles can serve as tighter confidence intervals than standard frequentist tools like Bernstein's inequality.
Empirical Evaluation
BUCRL was evaluated against state-of-the-art baselines, including UCRL-V, KL-UCRL, UCRL2, and TSDE, across several standard discrete RL benchmarks:
- Bandits: A single-state MDP for basic exploration testing.
- RiverSwim: A classic environment requiring deep exploration to reach high-reward states.
- GameOfSkill (v1 and v2): Complex environments designed to test an agent's ability to handle various transition dynamics.
As illustrated in the experimental results, BUCRL consistently outperformed frequentist methods, demonstrating lower average regret and faster convergence. By utilizing the full shape of the posterior distribution, BUCRL avoids the over-conservatism of traditional frequentist bounds, allowing for more efficient exploration.
Conclusion and Future Work
BUCRL represents a significant advancement in RL by providing a Bayesian framework with ironclad frequentist guarantees. While currently limited to finite, discrete MDPs, future work aims to extend these Bayesian quantile concepts to continuous control tasks using linear function approximation or deep learning. Additionally, investigating the algorithm's sensitivity to different priors beyond the Beta distribution remains an important area for further study.
Summary updated