Minimax Regret Bounds for Reinforcement Learning

Mohammad Gheshlaghi Azar, Ian Osband, Rémi Munos

Introduction

We consider the reinforcement learning (RL) problem of an agent interacting with an environment in order to maximize its cumulative rewards through time (Burnetas & Katehakis, 1997; Sutton & Barto, 1998). We model the environment as a Markov decision process (MDP) whose transition dynamics are unknown from the agent. As the agent interacts with the environment it observes the states, actions and rewards generated by the system dynamics. This leads to a fundamental trade off: should the agent explore poorly-understood states and actions to gain information and improve future performance, or exploit its knowledge to optimize short-run rewards.

The most common approach to this learning problem is to separate the process of estimation and optimization. In this paradigm, point estimates of the unknown quantities are used in place of the unknown parameters and a plan is made with respect to these estimates. Naive optimization with respect to these point estimates can lead to premature exploitation and so may never learn the optimal policy. Dithering approaches to exploration (e.g., ϵ\epsilon-greedy) address this failing through random action selection. However, as this exploration is not directed the resultant algorithms may take exponentially long to learn (Kearns & Singh, 2002). In order to learn efficiently it is necessary that the agent prioritizes potentially informative states and actions. To do this, it is important that the agent maintains some notion of its own uncertainty. In some sense, given any prior belief, the optimal solution to this exploration/exploitation dilemma is given by the dynamic programming in the extended Bayesian belief state (Bertsekas, 2007). However, the computational demands of this method become intractable for even small problems (Guez et al., 2013) while finite approximations can be arbitrarily poor (Munos, 2014).

To combat these failings, the majority of provably efficient learning algorithms employ a heuristic principle known as optimism in the face of uncertainty (OFU). In these algorithms, each state and action is afforded some “optimism” such that its imagined value is as high as statistically plausible. The agent then chooses a policy under this optimistic view of the world. This allows for efficient exploration since poorly-understood states and actions are afforded higher optimistic bonus. As the agent resolves its uncertainty, the effects of optimism will reduce and the agent’s policy will approach optimality. Almost all reinforcement learning algorithms with polynomial bounds on sample complexity employ optimism to guide exploration (Kearns & Singh, 2002; Brafman & Tennenholtz, 2002; Strehl et al., 2006; Dann et al., 2017).

An alternative principle motivated by the Thompson sampling (Thompson, 1933) has emerged as a practical competitor to optimism. The algorithm posterior sampling reinforcement learning (PSRL) maintains a posterior distribution for MDPs and, at each episode of interaction, follows a policy which is optimal for a single random sample (Strens, 2000).

Previous works have argue for the potential benefits of such PSRL methods over existing optimistic approaches (Osband et al., 2013; Osband & Van Roy, 2016b) but they come with guarantees on the Bayesian regret only.

However a very recent work Agrawal & Jia (2017) have shown that an optimistic version of posterior sampling (using a max over several samples) achieves a frequentist regret bound O~(HSAT)\widetilde{O}(H\sqrt{SAT}) (for large TT) in the more general setting of weakly communicating MDPs.

In this paper we present a conceptually simple and computationally efficient approach to optimistic reinforcement learning in finite-horizon MDPs and report results for the frequentist regret. Our algorithm, upper confidence bound value iteration (UCBVI) is similar to model-based interval estimation (MBIE-EB) (Strehl & Littman, 2005) with a delicate alteration to the form of the “exploration bonus”. In particular UCBVI replaces the universal scalar of the bonus in MBIE-EB with the empirical variance of the next-state value function of each state-action pair. This alteration is essential to improve the regret bound from O~(H)\widetilde{O}(H) to O~(H)\widetilde{O}(\sqrt{H}).

Our key contribution is to establish a high probability regret bound O~(HSAT+H2S2A+HT)\widetilde{O}(\sqrt{HSAT}+H^{2}S^{2}A+H\sqrt{T}) where SS is the number of states, AA is the number of actions, HH is the episode length and TT is the total number of time-steps (and where O~\widetilde{O} ignores logarithmic factors). Importantly, for T>H3S3AT>H^{3}S^{3}A and SA≥HSA\geq H this bound is O~(HSAT)\widetilde{O}(\sqrt{HSAT}), which matches the established lower bound for this problem, up to logarithmic factors (Osband & Van Roy, 2016a).In fact the lower bound of (Jaksch et al., 2010) is for the more general setting of the weakly communicating MDPs and it doesn’t directly apply to our setting. But a similar approach can be used to prove a lower bound of same order for the finite-horizon MDPs, as it is already used in (Osband & Van Roy, 2016a). This positive result is the first of its kind and helps to address an ongoing question about where the fundamental lower bounds lie for reinforcement learning in finite horizon MDPs (Bartlett & Tewari, 2009; Dann & Brunskill, 2015; Osband & Van Roy, 2016a). Our refined analysis contains two key ingredients:

We use careful application of Bernstein and Freedman inequalities (Bernstein, 1927; Freedman, 1975) to the concentration of the optimal value function directly, rather than building confidence sets for the transitions probabilities and rewards, like in UCRL2 (Jaksch et al., 2010) and UCFH (Dann & Brunskill, 2015).

We use empirical-variance exploration bonuses based on Bernstein’s inequality, which together with a recursive Bellman-type Law of Total Variance (LTV) provide tight bounds on the expected sum of the variances of the value estimates, in a similar spirit to the analysis from Azar et al. (2013); Lattimore & Hutter (2012).

At a high level, this work addresses the noted shortcomings of existing RL algorithms (Bartlett & Tewari, 2009; Jaksch et al., 2010; Osband & Van Roy, 2016b), in terms of dependency on SS and HH. We demonstrates that it is possible to design a simple and computationally efficient optimistic algorithm that simultaneously address both the loose scaling in SS and HH to obtain the first regret bounds that match the Ω(HSAT)\Omega(\sqrt{HSAT}) lower bounds as TT becomes large.

We should be careful to mention the current limitations of our work, each of which may provide fruitful ground for future research. First, we study the setting of episodic, finite horizon MDPs and not the more general setting of weakly communicating systems (Bartlett & Tewari, 2009; Jaksch et al., 2010). Also we assume that the horizon length HH is known to the learner. Further, our bounds only improve over previous scaling O~(HSAT)\widetilde{O}(HS\sqrt{AT}) for T>H3S3AT>H^{3}S^{3}A.

We hope that this work will serve to elucidate several of the existing shortcomings of exploration in the tabular setting and help further the direction of research towards provably optimal exploration in reinforcement learning.

Problem formulation

In this section, we briefly review some notation, as well as some standard concepts and definitions from the theory of Markov decision processes (MDPs).

We assume S\mathcal{S} and A\mathcal{A} are finite sets with cardinalities SS, AA, respectively. We also assume that the immediate reward R(x,a)R(x,a) is deterministic and belongs to the interval $.Forrewardsin.For rewards in[R_{\min},R_{\max}]$ simply rescale these bounds.

In this paper we focus on the setting where the reward function RR is known, but extending our algorithm to unknown stochastic rewards poses no real difficulty.

where πk\pi_{k} is the control policy followed by the learner at episode kk. Thus the regret measures the expected loss of following the policy produced by the learner instead of the optimal policy. So the goal of learner is to follow a sequence of policies π1,π2,…,πK\pi_{1},\pi_{2},\dots,\pi_{K} such that Regret(K)\text{Regret}(K) is as small as possible.

Upper confidence bound value iteration

In this section we introduce two variants of the algorithm that we investigate in this paper. We call the algorithm upper confidence bound value iteration (UCBVI). UCBVI is an extension of value iteration which guarantees that the resultant value function is a (high-probability) upper confidence bound (UCB) on the optimal value function. This algorithm is related to the model based interval estimation (MBIE-EB) algorithm (Strehl & Littman, 2008). Our key contribution is the precise design of the upper confidence sets, and the analysis which lead to tight regret bounds.

UCBVI, described in Algorithm 1, calls UCB-Q-values (Algorithm 2) which returns UCBs on the Q-values computed by value iteration using an empirical Bellman operator to which is added a confidence bonus bonus. We consider two variants of UCBVI depending on the structure of bonus, which we present in Algorithms 3 and 4.

The first of these UCBVI-CH is based upon Chernoff-Hoeffding’s concentration inequality, considers UCBVI\mathtt{UCBVI} with bonus=bonus_1\mathtt{bonus}=\mathtt{bonus\_1}. bonus_1\mathtt{bonus\_1} is a very simple bound which only assumes that values are bounded in [0,H][0,H]. We will see in Theorem 1 that this very simple algorithm can already achieve a regret bound of O~(HSAT)\widetilde{O}(H\sqrt{SAT}), thus improving the best previously known regret bounds from a SS to a S\sqrt{S} dependence. The intuition for this improved SS-dependence is that our algorithm (as well as our analysis) does not consider confidence sets on the transition dynamics P(y∣x,a)P(y|x,a) like UCRL2 and UCFH do, but instead directly maintains confidence intervals on the optimal value function. This is crucial as, for any given (x,a)(x,a), the transition dynamics are SS-dimensional whereas the Q-value function is one-dimensional.

However, the loose form of UCB given by UCBVI-CH does not look at the value function of the next state, and just consider it as being bounded in [0,H][0,H]. However, much better bounds can be obtained by looking at the variance of the next state values. Our main result relies upon UCBVI\mathtt{UCBVI} with bonus=bonus_2\mathtt{bonus}=\mathtt{bonus\_2}, which we refer to as UCBVI-BF as it relies on Bernstein-Freedman’s concentration inequalities to build the confidence set. UCBVI-BF builds upon the intuition for UCBVI-CH but also incorporates a variance-dependent exploration bonus. This leads to tighter exploration bonuses and an improved regret bound of O~(HSAT)\widetilde{O}(\sqrt{HSAT}).

Compared to UCBVI-BF here we use a bonus built from the empirical variance of the estimated next values. The idea is that if we had knowledge of the optimal value V∗V^{*}, we could build tight confidence bounds using the variance of the optimal value function at the next state in place of the loose bound of HH. Since however V∗V^{*} is unknown, here we use as a surrogate the empirical variance of the estimated values. As more data is gathered, this variance estimate will converge to the variance of V∗V^{*}. Now we need to make sure our estimates Vk,hV_{k,h} are optimistic (i.e., that they upper bound Vh∗V^{*}_{h}) at all times. This is achieved by adding an additional bonus (last term in b(x,a)b(x,a)), which guarantees that we upper bound the variance of V∗V^{*}. Now, using an iterative -Bellman-type- Law of Total Variance, we have (see proof) that the sum of the next-state variances of V∗V^{*} (over HH time steps) (which is related to the sum of the exploration bonuses over HH steps) is bounded by the variance of the HH-steps return. Thus the size of the bonuses built by UCBVI-BF are constrained over the HH steps. And we prove that the sum of those bonuses do not grow linearly in HH but in H\sqrt{H} only. This is the key for our improved dependence from HH to H\sqrt{H}.

Main results

In this section we present the main results of the paper, which are upper bounds on the regret of UCBVI-CH and UCBVI-BF algorithms. We assume Assumption 1 holds.

Consider a parameter δ>0\delta>0. Then the regret of UCBVI-CH is bounded w.p. at least 1−δ1-\delta, by

For T≥HS3AT\geq HS^{3}A and SA≥HSA\geq H this bound translates to a regret bound of O~(HSAT)\widetilde{O}(H\sqrt{SAT}), where T=KHT=KH is the total number of time-steps at the end of episode KK.

Theorem 1 is significant in that, for large TT, it improves the regret dependence from SS to S\sqrt{S}, compared to the best known bound of Jaksch et al. (2010). The main intuition for this improved SS-dependence is that we bound the estimation error of the next-state value function directly, instead of the transition probabilities.

More precisely, instead of bounding the estimation error (P^kπk−Pπk)Vk,h+1(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})V_{k,h+1} by ∥P^kπk−Pπk∥1∥Vk,h+1∥∞\|\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}}\|_{1}\|V_{k,h+1}\|_{\infty} (as is done in Jaksch et al. (2010) for example), we bound (P^kπk−Pπk)Vh+1∗(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})V^{*}_{h+1} instead (for which a bound with no dependence on SS can be achieved since V∗V^{*} is deterministic) and handle carefully the correction term (P^kπk−Pπk)(Vk,h+1−Vh+1∗)(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})(V_{k,h+1}-V^{*}_{h+1}).

Our second result, Theorem 2, demonstrates that we can improve upon the HH-dependence by using a more refined, Bernstein-Friedman-type, exploration bonus.

Consider a parameter δ>0\delta>0. Then the regret of UCBVI-BF is bounded w.p. 1−δ1-\delta, by

We note that for T≥H3S3AT\geq H^{3}S^{3}A and SA≥HSA\geq H this bound translates to a regret bound of O~(HSAT)\widetilde{O}(\sqrt{HSAT}). This result is particularly significant since, for TT large enough (i.e., T≥H3S3AT\geq H^{3}S^{3}A), our bound is O~(HSAT)\widetilde{O}(\sqrt{HSAT}) which matches the established lower bound Ω(HSAT)\Omega(\sqrt{HSAT}) of (Jaksch et al., 2010; Osband & Van Roy, 2016a) up to logarithmic factors.

The key insight is to apply concentration inequalities to bound the estimation errors and the exploration bonuses in terms of the variance of V∗V^{*} at the next state. We then use the fact that the sum of these variances is bounded by the variance of the return (see e.g., Munos & Moore, 1999; Azar et al., 2013; Lattimore & Hutter, 2012), which shows that the estimation errors accumulate as H\sqrt{H} instead of linearly in HH, thus implying the improved HH-dependence.

Weakly communicating MDPs

In this short paper we focus on the setting of finite horizon MDPs. By comparison, previous optimistic approaches to exploration, such as UCRL2, provide bounds for the more general setting of weakly communicating MDPs (Jaksch et al., 2010; Bartlett & Tewari, 2009).

However, we believe that much of the insight from the UCBVI algorithm (and its analysis) will carry over to this more general setting using existing techniques such as ‘the doubling trick‘ (Jaksch et al., 2010).

Proof sketch

Here we provide the sketch proof of our results. The full proof is deferred to the appendix.

Let Ω={Vk,h≥Vh∗,∀k,h}\Omega=\{V_{k,h}\geq V^{*}_{h},\forall k,h\} be the event under which all computed Vk,hV_{k,h} values are upper bounds on the optimal value function. Using backward induction on hh (and standard concentration inequalities) one can prove that Ω\Omega holds with high probability (see Lem. 18 in the appendix). To simplify notations in this sketch of proof we will not make the numerical constants explicit, and instead we will denote by □\square a numerical constant which can vary from line to line. The exact values of these constants are provided in the full proof. We will also make use of simplified notations, such as using LL to represent the logarithmic term L=ln⁡(□HSAT/δ)L=\ln(\square HSAT/\delta).

The cumulative regret at episode KK is Regret(K)=def∑1≤k≤KV1∗(xk,1)−V1πk(xk,1){\text{Regret}}(K)\stackrel{{\scriptstyle\rm def}}{{=}}\sum_{1\leq k\leq K}V^{*}_{1}(x_{k,1})-V^{\pi_{k}}_{1}(x_{k,1}). Define Regret~(K)=def∑1≤k≤KVk,1(xk,1)−V1πk(xk,1)\widetilde{\text{Regret}}(K)\stackrel{{\scriptstyle\rm def}}{{=}}\sum_{1\leq k\leq K}V_{k,1}(x_{k,1})-V^{\pi_{k}}_{1}(x_{k,1}). Under Ω\Omega we have Regret(K)≤Regret~(K){\text{Regret}}(K)\leq\widetilde{\text{Regret}}(K), so we now bound Regret~(K)\widetilde{\text{Regret}}(K). Define Δk,h=defVh∗−Vhπk\Delta_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}V^{*}_{h}-V^{\pi_{k}}_{h} and Δ~k,h=defVk,h−Vhπk\widetilde{\Delta}_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}V_{k,h}-V^{\pi_{k}}_{h}. Thus

The difficulty in bounding (P^kπk−Pπk)Vk,h+1(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})V_{k,h+1} is that both Vk,h+1V_{k,h+1} and P^kπk\widehat{P}^{\pi_{k}}_{k} are random variables and are not independent (the value function Vk,h+1V_{k,h+1} computed at h+1h+1 may depend on the samples collected from state xh,kx_{h,k}), thus a straightforward application of Chernoff-Hoeffding (CH) inequality does not work here. In Jaksch et al. (2010), this issue is addressed by bounding it by ∥P^kπk−Pπk∥1∥Vk,h+1∥∞\|\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}}\|_{1}\|V_{k,h+1}\|_{\infty} at the price of an additional S\sqrt{S}.

The main contribution of our O~(HSAT)\widetilde{O}(H\sqrt{SAT}) bound (which removes a S\sqrt{S} factor compared to the previous bound of Jaksch et al. (2010)) is to handle this term more properly. Instead of directly bounding (P^kπk−Pπk)Vk,h+1(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})V_{k,h+1}, we bound (P^kπk−Pπk)Vh+1∗(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})V^{*}_{h+1}, using straightforward application of CH (which removes the S\sqrt{S} factor since Vh+1∗V^{*}_{h+1} is deterministic), and deal with the correction term (P^kπk−Pπk)(Vk,h+1−Vh+1∗)(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})(V_{k,h+1}-V^{*}_{h+1}). We have

where ek,h=def(P^kπk−Pπk)Vh+1∗(xk,h)e_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})V^{*}_{h+1}(x_{k,h}) is the estimation error of the optimal value function at the next state. Defining δ~k,h=defΔ~k,h(xk,h)\widetilde{\delta}_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}\widetilde{\Delta}_{k,h}(x_{k,h}), we have

where ϵk,h=defPπkΔk,h+1(xk,h)−Δk,h+1(xk,h+1)\epsilon_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}P^{\pi_{k}}\Delta_{k,h+1}(x_{k,h})-\Delta_{k,h+1}(x_{k,h+1}).

where nk,h=defNk(xk,h,πk(xk,h))n_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}N_{k}(x_{k,h},\pi_{k}(x_{k,h})). Now considering only the yy such that Pπk(y∣xk,h)nk,h≥□H2LP^{\pi_{k}}(y|x_{k,h})n_{k,h}\geq\square H^{2}L, and since 0≤Δk,h+1≤Δ~k,h+10\leq\Delta_{k,h+1}\leq\widetilde{\Delta}_{k,h+1}, then (P^kπk−Pπk)Δk,h+1(xk,h)(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})\Delta_{k,h+1}(x_{k,h}) is bounded by

where \bar{\epsilon}_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}\sqrt{\frac{\square L}{n_{k,h}}}\Big{(}\sum_{y}P^{\pi_{k}}(y|x_{k,h})\frac{\widetilde{\Delta}_{k,h+1}(y)}{\sqrt{P^{\pi_{k}}(y|x_{k,h})}}-\frac{\widetilde{\delta}_{k,h+1}}{\sqrt{P^{\pi_{k}}(x_{k,h+1}|x_{k,h})}}\Big{)}.

The sum over the neglected yy such that Pπk(y∣xk,h)nk,h<□H2LP^{\pi_{k}}(y|x_{k,h})n_{k,h}<\square H^{2}L contributes to an additional term

Neglecting this term (and the smaller order term □SHL/nk,h\square SHL/n_{k,h}) for now (by the pigeon-hole principle we can prove that these terms contribute to the final regret by a constant at most □S2AH2L2\square S^{2}AH^{2}L^{2}), we have

We now bound those 4 terms. It is easy to check that ∑k,hϵk,h\sum_{k,h}\epsilon_{k,h} and ∑k,hϵˉk,h\sum_{k,h}\bar{\epsilon}_{k,h} are sums of martingale differences, which are bounded using Azuma’s inequality, and lead to a regret of O~(HT)\widetilde{O}(H\sqrt{T}) without dependence on the size of state and action space. The leading terms in the regret bound comes from the sum of the exploration bonuses ∑k,hbk,h\sum_{k,h}b_{k,h} and the estimation errors ∑k,hek,h\sum_{k,h}e_{k,h}.

Using CH, w.h.p. we have ek,h=(P^kπk−Pπk)Vh+1∗≤(CH)□HLnk,he_{k,h}=(\widehat{P}^{\pi_{k}}_{k}-P^{\pi_{k}})V^{*}_{h+1}\stackrel{{\scriptstyle(CH)}}{{\leq}}\square H\sqrt{\frac{L}{n_{k,h}}}. Thus this bound on the estimation errors are of the same order as the exploration bonuses (which is the reason we choose those bonuses…).

Plugging Eq. 2 and Eq. 3 into Eq. 1 (and adding the smaller order term) we deduce

2 Sketch Proof of Theorem 2

The proof of Theorem 1 relied on proving by a straightforward induction over hh that Ω={Vk,h≥Vh∗,∀k,h}\Omega=\{V_{k,h}\geq V^{*}_{h},\forall k,h\} hold with high probability. In the case of exploration bonuses defined by:

the backward induction over hh is not straightforward. Indeed, if the Vk,h+1V_{k,h+1} are upper bounds on Vh+1∗V^{*}_{h+1}, it is not necessarily the case that the empirical variance of Vk,h+1V_{k,h+1} are upper bound on the empirical variance of Vh+1∗V^{*}_{h+1}. However we can prove by (backward) induction over hh that Vk,h+1V_{k,h+1} is sufficiently close to Vh+1∗V^{*}_{h+1} to guarantee that the variance of those terms are sufficiently close to each other so that the additional bonus (additional bonus in Eq. 4) will make sure that Vk,hV_{k,h} is still an upper-bound on Vh∗V^{*}_{h}. More precisely, define the set of indices:

and the event Ωk,h=def{Vi,j≥Vh∗,(i,j)∈[k,h]hist}\Omega_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}\{V_{i,j}\geq V^{*}_{h},(i,j)\in[k,h]_{hist}\}. Our induction is the following:

Assume that Ωk,h\Omega_{k,h} holds. Then we prove that (Vk,h+1−Vh+1∗)(y)≤□HSALNk,h+1′(y)(V_{k,h+1}-V^{*}_{h+1})(y)\leq\square H\sqrt{\frac{SAL}{N^{\prime}_{k,h+1}(y)}}.

So in order to prove that all values computed by the algorithm are upper bounding V∗V^{*}, we just need to prove that under Ωk,h\Omega_{k,h}, we have (Vk,h+1−Vh+1∗)(y)≤min⁡(□H1.5SLANk,h+1′(y),H)(V_{k,h+1}-V^{*}_{h+1})(y)\leq\min(\square H^{1.5}SL\sqrt{\frac{A}{N^{\prime}_{k,h+1}(y)}},H), which is obtained by deriving the following regret bound on

Indeed, since {Vi,h}i\{V_{i,h}\}_{i} is a decreasing sequence in ii, we have

Once we have proven that w.h.p., all computed values are upper bounds on V∗V^{*} (i.e. event Ω\Omega), then we prove that under Ω\Omega, the following regret bound holds:

The proof of Eq. 5 relies on the same derivations as those used for proving Eq. 6. The only two differences being that (i) HKHK is replaced by Nk,h+1′(y)N^{\prime}_{k,h+1}(y), the number of times a state yy was reached at time h+1h+1, up to episode kk, and (ii) the additional H\sqrt{H} factor which comes from the fact that at any episode, Nk,h+1′(y)N^{\prime}_{k,h+1}(y) can only tick once, whereas the total number of transitions from yy during any episode can be as large as HH. The full proof of Eq. 5 will be given in details in the appendix. We now give a proof sketch of Eq. 6 under Ω\Omega.

Similar steps used for proving Theorem 1 apply. The main difference compared to Theorem 1 is the bound on the sum of the exploration bonuses and the estimation errors (which we consider in Steps 3’ and 4’ below). This is where we can remove the H\sqrt{H} factor. The use of the Bernstein inequality makes it possible to bound both of those terms in terms of the expected sum of variances (under the current policy πk\pi_{k} at any episode kk) of the next-state values (for that policy), and then using recursively the Law of Total Variance to conclude that this quantity is nothing but the variance of the returns. This step is detailed now. For simplicity of the exposition of this sketch we neglect second order terms.

where (i)(i) holds since under Ωk,h\Omega_{k,h}, Vk,h≥Vh∗≥VhπkV_{k,h}\geq V^{*}_{h}\geq V^{\pi_{k}}_{h} and (ii)(ii) holds due to Chernoff Hoeffding.

(where nk,h=defNk(xk,h,πk(xk,h))n_{k,h}\stackrel{{\scriptstyle\rm def}}{{=}}N_{k}(x_{k,h},\pi_{k}(x_{k,h}))). Thus from the pigeon-hole principle, ∑k,hak,h≤□H2SATL\sum_{k,h}a_{k,h}\leq\square H^{2}S\sqrt{ATL}.

where UU is defined as an upper-bound on the pseudo regret: U=def∑k,h(bk,h+ek,h)+□HTU\stackrel{{\scriptstyle\rm def}}{{=}}\sum_{k,h}(b_{k,h}+e_{k,h})+\square H\sqrt{T} (an upper bound on the r.h.s. of Eq. 1).

Thus, using Eq. 8, Eq. 7 and the bounds on ∑ak,h\sum a_{k,h} and ∑ak,h′\sum a^{\prime}_{k,h}, we deduce that

We now use Bernstein inequality to bound the estimation errors

From Eq. 1 we see that U≤□L(TH+H2U)SAU\leq\square L\sqrt{(TH+H^{2}U)SA} thus U≤□(LHSAT+H2SAL2)U\leq\square(L\sqrt{HSAT}+H^{2}SAL^{2}). This implies Eq. 6.

So the reason we are able to remove the H\sqrt{H} factor from the regret bound comes from the fact that the sum, over HH steps, of the variances of the next state values (which define the amplitude of the confidence intervals) is at most bounded by the variance of the return. Intuitively this means that the size of the confidence intervals do not add up linearly over HH steps but grows as H\sqrt{H} only. Although the sequence of estimation errors are not independent over time, we are able to demonstrate a concentration of measure phenomenon that shows that those estimation errors concentrate as if they were independent.

Conclusion

In this paper we refine the familiar concept of optimism in the face of uncertainty. Our key contribution is the design and analysis of the algorithm UCBVI-BF , which addresses two key shortcomings in existing algorithms for optimistic exploration in finite MDPs. First we apply a concentration to the value as a whole, rather than the transition estimates, this leads to a reduction from SS to S\sqrt{S}. Next we apply a recursive law of total variance to couple estimates across an episode, rather than at each time step individually, this leads to a reduction from HH to H\sqrt{H}.

Theorem 2 provides the first regret bounds which, for sufficiently large TT, match the lower bounds for the problem O~(HSAT)\widetilde{O}(\sqrt{HSAT}) up to logarithmic factors. It remains an open problem whether we can match the lower bound using this approach for small TT. We believe that the higher order term can be improved from O~(H2S2A)\widetilde{O}(H^{2}S^{2}A) to O~(HS2A)\widetilde{O}(HS^{2}A) by a more careful analysis, i.e., a more extensive use of Freedman-Bernstein inequalities. The same applies to the term of order HTH\sqrt{T} which can be improved to HT\sqrt{HT}.

These results are particularly significant because they help to estabilish the information-theoretic lower bound of reinforcement learning at Ω(HSAT)\Omega(\sqrt{HSAT}) Osband & Van Roy (2016a), whereas it was suggested in some previous work that lower-bound should be of Ω(HSAT)\Omega(H\sqrt{SAT}). Moving from this big-picture insight to an analytically rigorous bound is non-trivial. Although we push many of the technical details to the appendix, our paper also makes several contributions in terms of analytical tools that may be useful in subsequent work. In particular we believe that the way we construct the exploration bonus and confidence intervals in UCBVI-CH is novel to the literature of RL. Also the constructive approach in the proof of UCBVI-CH , which bootstraps the regret bounds to prove that Vk,hV_{k,h}s are ucbs, is another analytical contribution of this paper.

Acknowledgements

The authors would like to thank Marc Bellemare and all the other wonderful colleagues at DeepMind for many hours of discussion and insight leading to this research. We are also grateful for the anonymous reviewers for their helpful comments and for fixing several mistakes in an earlier version of this paper.

References

Appendix A Table of Notation

Appendix B Notation

In our analysis we split the episodes into 2 sets: the set of “typical” episodes in which the number of visits to the encountered state-actions are large and the rest of the episodes. We then prove a tight regret bound for the typical episodes. As the total count of other episodes is bounded this technique provides us with the desired result. The set of typical state-actions pairs for every episode kk is defined as follows

Based on the definition of [(x,a)]typ{[(x,a)]}_{\text{typ}} we define the set of typical episodes and the set of typical state-dependent episodes as follow

Also for every (x,a)∈S×A(x,a)\in\mathcal{S}\times\mathcal{A} the set of typical next states at every episode kk is defined as follows

Finally let denote [y]k,h=[y]k,xk,h,πk(xxk,h)[y]_{k,h}=[y]_{k,x_{k,h},\pi_{k}(x_{x_{k,h}})} for every k∈[K]k\in[K] and h∈[H]h\in[H].

B.2 Surrogate regrets

We also define the corresponding per state-step regret and upper-bound regret for every state x∈Xx\in\mathcal{X} and step h∈[H]h\in[H], respectively, as follows

B.3 Martingale difference sequences

In our analysis we rely heavily on the theory of martingale sequences to prove bound on the regret incurred due to encountering a random sequence of states. We now provide some definitions and notation in that regard.

We define the following martingale operator for every k∈[K]k\in[K], h∈[H]h\in[H] and F:S→ℜF:\mathcal{S}\to\Re. Also let t=(k−1)H+ht=(k-1)H+h denote the time stamp at step hh of episode kk then

Let define Δtyp,k,h:S→ℜ\Delta_{\text{typ},k,h}:\mathcal{S}\to\Re as follows for every k∈[K]k\in[K] and h∈[H]h\in[H] and y∈Sy\in\mathcal{S}

B.4 High probability events

We now introduce the high probability events E\mathcal{E} and Ωk,h\Omega_{k,h} under which the regret is small.

Let use the shorthand notation L=defln⁡(5SATδ)L\stackrel{{\scriptstyle\rm def}}{{=}}\ln\left(\frac{5SAT}{\delta}\right). Also for every v>0v>0, p∈p\in and n>0n>0 let define the confidence intervals c1c_{1}, c2c_{2} and c3c_{3}, respectively, as follow

Let P\mathcal{P} be the set of all probability distributions on S\mathcal{S}. Define the following confidence set for every k=1,…,Kk=1,\dots,K, n>0n>0 and (x,a)∈S×A(x,a)\in\mathcal{S}\times\mathcal{A}

We now define the random event EP^\mathcal{E}_{\widehat{P}} as follows

Let tt be a positive integer. Let F={fs}s∈[t]\mathcal{F}=\{f_{s}\}_{s\in[t]} be a set of real-value functions on Ht+s\mathcal{H}_{t+s}, for some integer s>0s>0. We now define the following random events for every wˉ>0\bar{w}>0 and uˉ>0\bar{u}>0 and cˉ>0\bar{c}>0:

We also use the short-hand notation Eaz(F,uˉ)\mathcal{E}_{\text{az}}(\mathcal{F},\bar{u}) and Efr(F,wˉ,uˉ)\mathcal{E}_{\text{fr}}(\mathcal{F},\bar{w},\bar{u}) for Eaz(F,uˉ,L)\mathcal{E}_{\text{az}}(\mathcal{F},\bar{u},L) and Efr(F,wˉ,uˉ,L)\mathcal{E}_{\text{fr}}(\mathcal{F},\bar{w},\bar{u},L), respectively.

Now let define the following sets of random variables for every k∈[K]k\in[K] and h∈[H]h\in[H]:

We now define the high probability event E\mathcal{E} as follows

The following lemma shows that the event E\mathcal{E} holds with high probability:

Let δ>0\delta>0 be a real scalar. Then the event E\mathcal{E} holds w.p. at least 1−δ1-\delta.

To prove this result we need to show that a set of concentration inequalities with regard to the empirical model P^k\widehat{P}_{k} holds simultaneously. For every h∈[H]h\in[H] the Bernstein inequality combined with a union bound argument, to take into account that Nk(x,a)∈[T]N_{k}(x,a)\in[T] is a random number, leads to the following inequality w.p. 1−δ1-\delta (see, e.g., Cesa-Bianchi & Lugosi, 2006; Bubeck & Cesa-Bianchi, 2012, for the statement of the Bernstein inequality and the application of the union bound in similar cases, respectively.)

where we rely on the fact that Vh∗V^{*}_{h} is uniformly bounded by HH. Using the same argument but this time with the Empirical Bernstein inequality (see, e.g., Maurer & Pontil, 2009), for Nk(x,a)>1N_{k}(x,a)>1, leads to

The Bernstein inequality combined with a union bound argument on Nk(x,a)N_{k}(x,a) also implies the following bound w.p. 1−δ1-\delta

which implies the following bound w.p. 1−δ1-\delta:

We now focus on bounding the sequence of martingales. Let n>0n>0 be an integer and u,δ>0u,\delta>0 be some real scalars. Let the sequence of random variables {X1,X2,…,Xn}\{X_{1},X_{2},\dots,X_{n}\} be a sequence of martingale differences w.r.t. to some filtration Fn\mathcal{F}_{n}. Let this sequence be uniformly bounded from above and below by uu. Then the Azuma’s inequality (see, e.g., Cesa-Bianchi & Lugosi, 2006) implies that w.p. 1−δ1-\delta

When the sum of the variances ∑i=1nVar(Xi∣Fi)≤w\sum_{i=1}^{n}\text{Var}(X_{i}|\mathcal{F}_{i})\leq w for some w>0w>0 then the following sharper bound due to Freedman (1975) holds w.p. 1−δ1-\delta

Let k∈[K]k\in[K], h∈[H]h\in[H] and x∈Xx\in\mathcal{X}. Then the inequality of Eq. 13 immediately implies that the following events holds w.p. 1−δ1-\delta:

Also Eq. 13 combined with a union bound argument over all Nk,h′(x)∈[T]N^{\prime}_{k,h}(x)\in[T] (see, e.g., Bubeck et al., 2011, for the full description of the application of union bound argument in the case of martigale process with random stopping time) implies that the following events hold w.p. 1−δ1-\delta

Similarly the inequality of Eq. 14 leads to the following events hold w.p. 1−δ1-\delta

where wˉk,h\bar{w}_{k,h} and wˉk,h,x\bar{w}_{k,h,x} are upper bounds on Wk,hW_{k,h} and Wk,h,xW_{k,h,x}, respectively, defined as

So to establish a value for wˉk,h\bar{w}_{k,h} and wˉk,h,x\bar{w}_{k,h,x} we need to prove bound on Wk,hW_{k,h} and Wk,h,xW_{k,h,x}. Here we only prove this bound for Wk,hW_{k,h} as the proof techniques to bound Wk,h,xW_{k,h,x} is identical to the way we bound Wk,hW_{k,h}.

Now let the sequence {x1,x2,…,xH}\{x_{1},x_{2},\dots,x_{H}\} be the sequence of states encountered by following some policy π\pi throughout an episode kk. Then the recursive application of LTV leads to (see e.g., Munos & Moore, 1999; Lattimore & Hutter, 2012, for the proof.)

By combining Eq. 26 into Eq. 25 we deduce

Similarly the following bound holds on Wk,h,xW_{k,h,x}

Plugging the bounds of Eq. 27 and Eq. 28 in to the bounds of Eq. 21 and Eq. 22 and a union bound over all Nk,h(x)∈[T]N_{k,h}(x)\in[T] leads to the following events hold w.p. 1−δ1-\delta:

Combining the results of Eq. 9, Eq. 10, Eq. 11, Eq. 12, Eq. 15, Eq. 16 Eq. 17, Eq. 18, Eq. 19, Eq. 20, Eq. 29 and Eq. 30 and taking a union bound over these random events as well as all possible k∈[K]k\in[K], h∈[H]h\in[H] and (s,a)∈S×A(s,a)\in\mathcal{S}\times\mathcal{A} proves the result.

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Denote the set of steps for which the value functions are obtained before Vk,hV_{k,h} as

Let Ωk,h={Vi,j≥Vh∗,∀(i,j)∈[k,h]hist}\Omega_{k,h}=\{V_{i,j}\geq V^{*}_{h},\forall(i,j)\in[k,h]_{\text{hist}}\} be the event under which Vi,jV_{i,j} prior to Vk,hV_{k,h} computation are upper bounds on the optimal value functions. Using backward induction on hh (and standard concentration inequalities) we will prove that Ωk,h\Omega_{k,h} holds under the event E\mathcal{E} (see Lem. 19).

B.5 Other useful notation

Here we define some other notation that we use throughout the proof. We denote the total count of steps up to episode k∈[K]k\in[K] by Tk=defH(k−1)T_{k}\stackrel{{\scriptstyle\rm def}}{{=}}H(k-1). We first define c4,k,hc_{4,k,h}, for every h∈[H]h\in[H] and k∈[K]k\in[K], as follow

for every k∈[K]k\in[K] , h∈[H]h\in[H] and x∈[x]x\in[x] we also introduce the following notation which we use later when we sum up the regret:

where c1,k,hc_{1,k,h} is the shorthand-notation for c1(vk,h∗,nk,h)c_{1}(v^{*}_{k,h},n_{k,h}). We also define the upper bound Uk,hU_{k,h} and Uk,h,xU_{k,h,x} for every k∈[K]k\in[K] , h∈[H]h\in[H] and x∈Sx\in\mathcal{S} as follows, respectively

Appendix C Proof of the Regret Bounds

Before we start the main analysis we state the following useful lemma that will be used frequently in the analysis:

The following sequence of inequalities hold

The result follows from the definition of variance. ∎

We proceed by proving the following key lemma which shows that proves bound on Δk,h\Delta_{k,h} under the assumption that Vk,hV_{k,h} is UCB w.r.t. Vh∗V^{*}_{h}.

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Let the events E\mathcal{E} and Ωk,h\Omega_{k,h} hold. Then the following bound holds on δk,h\delta_{k,h} and δ~k,h\widetilde{\delta}_{k,h}:

For the ease of exposition we abuse the notation and drop the dependencies on kk, e.g., we write x1x_{1}, π\pi and V1V_{1} for xk,1x_{k,1}, πk\pi_{k} and Vk,1V_{k,1}, respectively. We proceed by bounding δ~h\widetilde{\delta}_{h} under the event E\mathcal{E} at every step 0<h<H0<h<H:

where the last inequality follows from the fact that under the event E\mathcal{E} we have that [(P^hπ−Phπ)Vh+1∗](xh)≤c1,h[(\widehat{P}^{\pi}_{h}-P^{\pi}_{h})V^{*}_{h+1}](x_{h})\leq c_{1,h}. We now bound (a)(a):

where (I)(I) holds under the event E\mathcal{E}. We proceed by bounding (b)(b):

where in the last line we rely on the definition of [y]h[y]_{h}. We now bound (d):

By combining Eq. 34 and Eq. 35 into Eq. 33 we deduce

By combining Eq. 36 and Eq. C into Eq. C we deduce

Let denote γh=(1+1/H)h\gamma_{h}=(1+1/H)^{h}. The previous bound combined with an induction argument implies that

The inequality ln⁡(1+x)≤x\ln(1+x)\leq x for every x>−1x>-1 leads to γh≤γH≤e\gamma_{h}\leq\gamma_{H}\leq e for every h∈[H]h\in[H]. This combined with the assumption that vh≥vh∗v_{h}\geq v^{*}_{h} under the event Ωh\Omega_{h} completes the proof. ∎

Let k∈[k]k\in[k] and h∈[H]h\in[H]. Let the events E\mathcal{E} and Ωk,h\Omega_{k,h} hold. Then

The proof follows by summing up the bounds of Lem. 3 and taking into acoount the fact if Ωk,h\Omega_{k,h} holds then Ωi,j\Omega_{i,j} for all (i,j)∈[k,h]hist(i,j)\in[k,h]_{hist} hold. ∎

To simplify the bound of Lem. 4 we prove bound on sum of the martingales εk,h\varepsilon_{k,h} and εˉk,h\bar{\varepsilon}_{k,h}

Let k∈[k]k\in[k] and h∈[H]h\in[H]. Let the events E\mathcal{E} and Ωk,h\Omega_{k,h} hold. Then the following bound holds

Also the following bounds holds for every x∈Xx\in\mathcal{X} and h∈Hh\in\mathcal{H}:

The fact that the event E\mathcal{E} holds implies that the events Eaz(FΔ~,k,h,H)\mathcal{E}_{\text{az}}(\mathcal{F}_{\widetilde{\Delta},k,h},H), Eaz(FΔ~,k,h′,1L)\mathcal{E}_{\text{az}}(\mathcal{F}^{\prime}_{\widetilde{\Delta},k,h},\frac{1}{\sqrt{L}}) , Eaz(FΔ~,k,h,x,H)\mathcal{E}_{\text{az}}(\mathcal{F}_{\widetilde{\Delta},k,h,x},H) and Eaz(FΔ~,x,k,h′,1L)\mathcal{E}_{\text{az}}(\mathcal{F}^{\prime}_{\widetilde{\Delta},x,k,h},\frac{1}{\sqrt{L}}) hold. Under these events the inequalities of the statement hold. This combined with the fact that (H−h)k≤Tk(H-h)k\leq T_{k} completes the proof.

We now bound the sum of δ\deltas in terms of the upper-bound UU:

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Let the events E\mathcal{E} and Ωk,h\Omega_{k,h} holds. Then the following bounds hold for every h∈[H]h\in[H] x∈Sx\in\mathcal{S}

The proof follows by incorporating the result of Lem. 5 into Lem. 4 and taking into account that for every h∈[H]h\in[H] the term Uk,hU_{k,h} (Uk,h,xU_{k,h,x}) is a summation of non-negative terms which are also contained in Uk,1U_{k,1} (U1,h,xU_{1,h,x}). ∎

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Let the events E\mathcal{E} and Ωk,h\Omega_{k,h} holds. Then the following bounds hold for every x∈Sx\in\mathcal{S}

The proof follows by summing up the bounds of Lem. 6. ∎

We now focus on bounding the terms Ck,hC_{k,h} (Ck,h,xC_{k,h,x}) and Bk,hB_{k,h} (Bk,h,xB_{k,h,x}) in Lem. 11 and Lem. 12, respectively. Before we proceed with the proof of Lem. 11 and Lem. 12. we prove the following key result which bounds sum of the variances of Vk,hπV^{\pi}_{k,h} using an LTV argument:

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Then under the events E\mathcal{E} and Ωk,h\Omega_{k,h} the following hold for every x∈Sx\in\mathcal{S}

Eq. 41 and Eq. 42 combined with Eq. 43 and Eq. 44, respectively, complete the proof.

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Then under the events E\mathcal{E} and Ωk,h\Omega_{k,h} the following hold for every x∈Sx\in\mathcal{S}

We begin by the following sequence of inequalities:

where (I)(I) is obtained from the definition of the variance as well as the fact that Vi,j∗≥Vk,hπV^{*}_{i,j}\geq V^{\pi}_{k,h}. The last line also follows from the fact that Vπk≤Vh∗≤HV^{\pi_{k}}\leq V^{*}_{h}\leq H.

Using an identical argument we can also prove the following bound for state-dependent difference:

To bound (a)(a) we use the fact that under the event E\mathcal{E} the event Eaz(FΔ~,k,h,H)\mathcal{E}_{\text{az}}(\mathcal{F}_{\widetilde{\Delta},k,h},H) also holds. This combined with the fact that under the event Ωk,h\Omega_{k,h} the inequality δk,h≤δ~k,h\delta_{k,h}\leq\widetilde{\delta}_{k,h} holds implies that

where in the last line we rely on the result of Lem. 7. Similarly we can prove the following bound for (b)(b) under the events Ωk,h\Omega_{k,h} and Eaz(FΔ~,k,h,x,H)\mathcal{E}_{\text{az}}(\mathcal{F}_{\widetilde{\Delta},k,h,x},H):

The result then follows by incorporating the results of Eq. 49 and Eq. 50 into Eq. 47 and Eq. 48, respectively.

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Then under the events E\mathcal{E} and Ωk,h\Omega_{k,h} the following hold for every x∈Sx\in\mathcal{S}

Here we only prove the bound on Eq. 51. The proof for the bound of Eq. 52 can be done in a very similar manner, as it is shown in the previous lemmas (the only difference is that HNk,h′(x)HN^{\prime}_{k,h}(x) and Uk,h,xU_{k,h,x} replace TkT_{k} and Uk,1U_{k,1}, respectively). The following sequence of inequalities hold:

where (I)(I) holds due to the fact that under Ωk,h\Omega_{k,h}, Vi,j≥Vj∗≥VjπiV_{i,j}\geq V^{*}_{j}\geq V^{\pi_{i}}_{j} and (II)(II) holds under the event E\mathcal{E}.

where (I)(I) holds under the event E\mathcal{E} and (II)(II) holds due to the pigeon-hole argument (see, e.g., Jaksch et al., 2010, for the proof).

Using an identical analysis to the one in Lem. 10 and taking into account that Vi,j≥Vj∗V_{i,j}\geq V^{*}_{j} under the event Ωk,h\Omega_{k,h} and E\mathcal{E} we can bound (b)(b)

where (I)(I) holds since under the event E\mathcal{E} the event Eaz(FΔ~,k,h,H)\mathcal{E}_{az}(\mathcal{F}_{\widetilde{\Delta},k,h},H) holds. Another application of pigeon-hole principle leads to a bound of 6H2SATkL6H^{2}\sqrt{SAT_{k}L} on (c)(c). We then combine this with the bounds on (a)(a) and (b)(b) to bound Eq. 53, which proves the result.

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Then under the events E\mathcal{E} and Ωk,h\Omega_{k,h} the following hold for every x∈Sx\in\mathcal{S}

Here we only prove the bound on Eq. 54. The proof for the bound of Eq. 55 can be done in a very similar manner, as it is shown in the previous lemmas (the only difference is that HNk,h′(x)HN^{\prime}_{k,h}(x) and Uk,h,xU_{k,h,x} replace TkT_{k} and Uk,1U_{k,1}, respectively). The Cauchy–Schwarz inequality leads to the following sequence of inequalities:

We now prove bounds on (a)(a) and (b)(b) respectively

(c)(c) and (d)(d) can be bounded under the events E\mathcal{E} and Ωk,h\Omega_{k,h} using the results of Lem. 8 and Lem.9. We then deduce

where the last line follows by the fact that for the typical episodes Tk≥250H2S2AL2T_{k}\geq 250H^{2}S^{2}AL^{2}. Thus if Tk≤H2LT_{k}\leq H^{2}L the term Ck,hC_{k,h} trivially equals to otherwise the higher order terms are bounded by O(HTk)O(HT_{k}).

We now bound (b)(b) using a pigeon-hole argument

Plugging the bound on (a)(a) and (b)(b) into Eq. 56 and taking in to account that for the typical episodes [k]typ[k]_{\text{typ}} we have that T≥H2LT\geq H^{2}L completes the proof.

Let k∈[K]k\in[K] and h∈[H]h\in[H]. Let the bonus is defined according to Algo. 4. Then under the events E\mathcal{E} and Ωk,h\Omega_{k,h} the following hold for every x∈Sx\in\mathcal{S},

Here we only prove the bound on Eq. 58. The proof for the bound of Eq. 59 can be done in a very similar manner, as it is shown in the previous lemmas (the only difference is that HNk,h′(x)HN^{\prime}_{k,h}(x) and Uk,h,xU_{k,h,x} replace TkT_{k} and Uk,1U_{k,1}, respectively). We first notice that the following holds:

The bound on (d)(d) is identical to the corresponding bound in Lem. 11. So we only focus on bounding (c)(c):

(e)(e) and (f)(f) can be bounded in high probability using the results of Lem. 8 and Lem.10. This implies

where the last line follows by the fact that for the typical episodes Tk≥250H2S2ALT_{k}\geq 250H^{2}S^{2}AL. Thus if Tk≤250H2S2LT_{k}\leq 250H^{2}S^{2}L then Bk,hB_{k,h} trivially equals to otherwise the higher order terms are bounded by O(HT)O(HT). Combining the bound on (b)(b) and (c)(c) leads to the following bound on (a)(a):

To bound (b)(b) we make use of Cauchy-Schwarz inequality again.

The term (h)(h) bounded by 2SAL2SAL using a pigeon-hole argument (see Lem. 11). We proceed by bounding (g)(g):

Given that the event E\mathcal{E} holds the term (i)(i) bounded by 22H2SALTk2\sqrt{2}H^{2}S\sqrt{ALT_{k}} by using the pigeon-hole argument. Under the event E\mathcal{E} the event Eaz(Fb′,k,h,H2)\mathcal{E}_{az}(\mathcal{F}_{b^{\prime},k,h},H^{2}) holds. This implies that the term (j)(j) is also bounded by 2H2TkL2H^{2}\sqrt{T_{k}L} as it is sum of the martingale differences. The term (k)(k) is also bounded by 20000H3S3A3L320000H^{3}S^{3}A^{3}L^{3} using the pigeon-hole argument. Combining all these bounds together leads to the following bound on (b)(b)

Combining this with the bound on (a)(a) and taking into account the fact that we only bound the Bk,hB_{k,h} for the typical episodes, in which Tk≥250H2S2AL2T_{k}\geq 250H^{2}S^{2}AL^{2}, completes the proof.

Let the bonus is defined according to Algo. 4. Then under the events E\mathcal{E} and ΩK,1\Omega_{K,1} the following hold

We first notice that Regret(K)\text{Regret}(K) and Regret(K)\text{Regret}(K) are bounded by Uk,1U_{k,1} due to Lem.6. To bound Uk,1U_{k,1} we sum up the regret due to Bk,hB_{k,h} and Ck,hC_{k,h} from Lem. 11 and Lem. 12. We also bound the sum ∑k=1K∑h=1Hc4,k,h\sum_{k=1}^{K}\sum_{h=1}^{H}c_{4,k,h} by 2HSAL2HSAL using a pigeon hole argument. We also note that Bk,hB_{k,h} and Ck,hC_{k,h} only account for the regret of typical episodes in which T≥H2S2A2LT\geq H^{2}S^{2}A^{2}L. The regret of those episodes which do not belong to the typical set [k]typ[k]_{\text{typ}}, can be bounded by O(H2S2A2L2)O(H^{2}S^{2}A^{2}L^{2}), trivially. ∎

The following lemma establishes an explicit bound on the regret:

Let the bonus is defined according to Algo. 4. Then under the events E\mathcal{E} and ΩK,1\Omega_{K,1} the following hold

The proof follows by solving the bound of Lem. 13 in terms of Uk,1U_{k,1}. which only contributes to the additional regret of O(H2L2SA)O(H^{2}L^{2}SA). ∎

Let the bonus is defined according to Algo. 3. Then under the events E\mathcal{E} and ΩK,1\Omega_{K,1} the following holds

The proof up to Lem. 11 is identical to the proof of Lem. 14. The main difference is to prove bound on Ck,hC_{k,h} and Bk,hB_{k,h} here we use a loose bound of O(HSALnk,h)O(H\sqrt{\frac{SAL}{n_{k,h}}}) for both exploration bonus bk,hb_{k,h} and the confidence interval c1,k,hc_{1,k,h} and then sum these terms using a pigeon-hole argument (The proof is provided in Jaksch et al., 2010) which leads to a bound of O(HSATL)O(H\sqrt{SATL}) on both BK,1B_{K,1} and CK,1C_{K,1}. Plugging these results into the bound of Lem. 7 combined with the regret of non-typical episodes complete the proof

Let the bonus is defined according to Algo. 4. Let k∈[K]k\in[K] and h∈[H]h\in[H]. Then under the events E\mathcal{E} and Ωk,h\Omega_{k,h} the following hold for every x∈Sx\in\mathcal{S},

The proof is similar to the proof of total regret. Here also we use Lem. 12, Lem. 11 and a pigeon-hole argument to bound the regrets due to Bk,hB_{k,h}, Ck,hC_{k,h} and c4,k,hc_{4,k,h}. We then incorporate these terms into Lem.6 to bound the regret in terms of Uk,h,xU_{k,h,x}. The result follows by solving the bound w.r.t. the upper bound Uk,h,xU_{k,h,x}. ∎

Let the bonus bb is defined according to Algo. 4. Let k∈[K]k\in[K] and h∈[H]h\in[H]. Then under the events E\mathcal{E} and Ωk,h\Omega_{k,h} the following hold for every x∈Sx\in\mathcal{S}

where the last inequality holds due to the fact that Vk,hV_{k,h} by definition is monotonically non-increasing in kk. The proof then follows by collecting terms.

Let the bonus bb is defined according to Algo. 3. Then under the event E\mathcal{E} the set of events {Ωk,h}k∈[K],h∈H\{\Omega_{k,h}\}_{k\in[K],h\in H} hold.

We prove this result by induction. First we notice that for h=Hh=H by definition Vk,h=Vh∗V_{k,h}=V^{*}_{h} thus the inequality Vk,h≥Vh∗V_{k,h}\geq V^{*}_{h} trivially holds. Thus to prove this result for h<Hh<H we only need to show that if the inequality Vk,h≥Vh∗V_{k,h}\geq V^{*}_{h} holds for hh it also holds for h−1h-1 for every h<Hh<H:

where the last line follows by the induction condition that Vk,h+1≥Vh+1∗V_{k,h+1}\geq V^{*}_{h+1}. The fact that the event E\mathcal{E} hols implies that (Phπ∗−P^k,hπ∗)Vh+1∗(x)≤c1(Nk(x,πh∗(x)))≤bk(x,πh∗(x))(P^{\pi^{*}}_{h}-\widehat{P}^{\pi^{*}}_{k,h})V^{*}_{h+1}(x)\leq c_{1}(N_{k}(x,\pi^{*}_{h}(x)))\leq b_{k}(x,\pi^{*}_{h}(x)), which completes the proof.

Let the bonus bb is defined according to Algo. 4. Then under the event E\mathcal{E} the set of events {Ωk,h}k∈[K],h∈H\{\Omega_{k,h}\}_{k\in[K],h\in H} hold.

We prove this result by induction. We first notice that in the case of the first episode V1,h=H≥Vh∗V_{1,h}=H\geq V^{*}_{h}.

To prove this result by induction in the case of 1<k∈[K]1<k\in[K] we need to show that in the case of h∈[H−1]h\in[H-1] if Ωk,h+1\Omega_{k,h+1} holds then Ωk,h\Omega_{k,h} also holds.

If Ωk,h−1\Omega_{k,h-1} holds then Vi,j≥Vj∗V_{i,j}\geq V^{*}_{j} for every (i,j)∈[k,h]hist(i,j)\in[k,h]_{\text{hist}}. We can then invoke the result of Lem. 17 which implies

Using this result which guarantees that Vk,h+1V_{k,h+1} is close to Vh+1∗V^{*}_{h+1} we prove that Vk,h−Vh∗≥0V_{k,h}-V^{*}_{h}\geq 0, that is the event Ωk,h\Omega_{k,h} holds.

If Vk−1,h≤Tk,hVi,j+1V_{k-1,h}\leq\mathcal{T}_{k,h}V_{i,j+1} the result Vk,h−Vh∗=Vk−1,h−Vh∗≥0V_{k,h}-V^{*}_{h}=V_{k-1,h}-V^{*}_{h}\geq 0 holds trivially. Also if Vk−1,h≥HV_{k-1,h}\geq H the result trivially holds. So we only need to consider the case that Tk,hVi,j+1≤Vk−1,h≤H\mathcal{T}_{k,h}V_{i,j+1}\leq V_{k-1,h}\leq H in that case we have w

where in (I)(I) we rely on the fact that πk,h\pi_{k,h} is the greedy policy w.r.t. Vk,hV_{k,h}. Thus

Also (II)(II) follows from the induction assumption. Under the event E\mathcal{E} we have

where (I)(I) is an application of Lem. 2. We now bound (b)(b). Combining this result with the result of Eq. C leads to the following bound on (a)(a)

where the last inequality holds under the event E\mathcal{E}. The proof is completed by plugging (a)(a) and (b)(b) into Eq. C which proves that Vk,h≥Vh∗V_{k,h}\geq V^{*}_{h} thus the event Ωk,hholds\Omega_{k,h}holds.

The result is a direct consequence of Lem. 18 and Lem. 15 and the fact that the high probability event E\mathcal{E} holds w.p. 1−δ1-\delta.

C.2 Proof of Thm. 2

The result is a direct consequence of Lem. 19 and Lem. 14 and the fact that the high probability event E\mathcal{E} holds w.p. 1−δ1-\delta.