Closing the Log Gap: Minimax-Optimal Regret for Episodic RL
Guy Zamir, Victor Boone, Matthew Zurek, Yudong Chen
Abstract
In this paper, we study the regret minimization problem in episodic tabular MDPs. Our algorithm achieves the first expected regret bound scaling as H3SAK for sufficiently large K, where H is the episode length, K is the number of episodes, and S and A are the numbers of states and actions, respectively. Our method is the first to match the minimax lower bound without extra polylog factors. We introduce a variant of UCBVI which does not maintain strictly optimistic estimates, and uses MOSS-style exploration bonuses whose logarithmic terms adapt to both visit counts and estimated variances. A key challenge is controlling the propagation of errors caused by under-optimism, which we accomplish in an occupancy-weighted way, avoiding logarithmic overhead that would be incurred by uniform-over-rows concentration. Our analysis develops time-uniform and variance-aware concentration bounds that may be of independent interest. As a corollary we also develop an algorithm for (ε,δ)-PAC best-policy identification, which is the first to match the Ω(H3SAlog(δ1)ε−2) minimax lower bound up to constants in some regimes.
1 Introduction
In online reinforcement learning (RL), the balance of exploration and exploitation is one of the most central and investigated problems. A canonical setting for the study of the exploration-exploitation tradeoff is that of finite-horizon Markov decision processes (MDPs), and in particular the problem of regret minimization in such environments. In regret minimization, the learning agent dynamically explores the unknown environment by playing actions, and its performance is measured by comparing its aggregate reward with that of an omniscient agent that knows the environment in advance. In this work, we are interested in the derivation of formal bounds of the worst-case regret (a.k.a. minimax regret) in expectation and in the time-inhomogeneous setting, where rewards and transitions are time-dependent.
This problem has been extensively studied. In the class of tabular MDPs with S states, A actions per state and fixed horizon H, it is known [Domingues et al., 2021] that the minimax regret of every learning algorithm is at least Ω(H3SAK), where K is the total number of episodes. In the community, UCBVI [Azar et al., 2017] is recognized as the first algorithm to reach the minimax lower bound of Domingues et al. [2021]. It was succeeded by many others, such as Euler [Zanette and Brunskill, 2019] or MVP [Zhang et al., 2021], with better second order terms or better dependency with respect to the episode horizon H (see Table 1 for a more comprehensive list). Although these algorithms are claimed to be minimax optimal, all their regret guarantees are O(H3SAK), where O(−) is a variant of O(−) that ignores logarithmic factors. Unraveling what the O(−) hides, the true regret bounds of these methods are O(H3SAKlog(HSAK)γ) for γ>0 (Table 1). As such, no algorithm reaches the true minimax optimal rate prior to this work.
Algorithm
Expected regret scaling as K→∞
Original work is time-inhomogeneous
Optimistic with high probability
UCBVI Azar et al. [2017]
H3SAKlog(K)2
No
Yes
Euler Zanette and Brunskill [2019]
H3SAKlog(K)6
No
Yes
UCB-Advantage Zhang et al. [2020]
H3SAKlog(K)+H3Klog(K)3
Yes
Yes
UCBMQ Ménard et al. [2021]
H3SAKlog(K)3
Yes
Yes
MVP Zhang et al. [2021]
H3SAKlog(K)2
No
Yes
Modified MVP Zhang et al. [2025]
H3SAKlog(K)5
Yes
Yes
SSR Xiong et al. [2022]
H3SAKlog(K)3
Yes
Yes
OPSRL Tiapkin et al. [2022]
H3SAKlog(K)3
Yes
Yes
EQO Lee and Oh [2025], EQO+ Lee and Oh [2026]
H3SAKlog(HSA)log(K)
No
No
MORE-UCBVI (ours)
H3SAK
Yes
No
Lower Bound Domingues et al. [2021]
H3SAK
—
—
Table 1: A compendium of algorithms which are minimax optimal up to at most log factors.
In this paper, we close this longstanding gap and construct the first algorithm with minimax regret O(H3SAK) for sufficiently large K.
Our contributions. We introduce MORE-UCBVI, a variant of UCBVI Azar et al. [2017] that uses MOSS-style bonuses Audibert and Bubeck [2009] in place of UCB-style bonuses Agrawal [1995], Auer et al. [2002].
We derive a MOSS-style bonus for UCBVI whose logarithmic term adapts to both visit counts and estimated variances. The resulting algorithm (Section 5, Algorithm 1) deviates from the UCBVI framework by allowing for under-optimism; that is, its value estimates may underestimate the optimal value function.
We obtain an expected regret bound of O(H3SAK) for sufficiently large K without logarithmic factors, thereby matching the minimax rate up to a universal constant for the first time (Section 6, Theorem 6.1).
Our main result requires a sharper analysis. We replace the standard monotonicity-based optimism induction with a stability argument that controls how under-optimism propagates through Bellman updates. This argument enables us to bound the cumulative cost of under-optimism without the logarithmic overhead induced by a union bound. We provide a more detailed proof sketch in Section 7.
As a corollary, we construct an algorithm for (ε,δ)-PAC best-policy identification which is the first to match the minimax sample complexity lower bound of Ω(H3SAlog(δ1)ε−2) established by Domingues et al. [2021] in some regime, improving the logarithmic factor relative to prior works (Section 6, Corollary 6.2).
Along the way, we prove a time-uniform Bernstein inequality with a linear drift, giving an analogue of [Lattimore and Szepesvári, 2020, Lemma 9.3] for sub-gamma random variables (Section 4, Theorem 4.1). This variance-aware concentration result may be of independent interest.
Related work. The literature of regret minimization in RL is vast. Focusing on episodic MDPs, Table 1 lists existing algorithms matching the minimax lower bound up to logarithmic factors. Some are originally for the homogeneous setting, in which all P1,…,PH are equal, in which case they can be applied to the inhomogeneous setting by augmenting all states with a time index in [H], thus multiplying the size of the state space by H. Many of these have been introduced to enrich regret minimization with parallel considerations. MVP [Zhang et al., 2021] is meant to improve on the dependency in the horizon H, for what is known as horizon-free RL. EQO+ [Lee and Oh, 2025, 2026] provides regret guarantees in probability simultaneously for every confidence level δ>0. UCBMQ [Ménard et al., 2021] is a variant of Q-Learning [Watkins and Dayan,
1992] with near minimax optimal guarantees; it is model-free and therefore has a cheaper memory cost. As discussed in Section 3, the logarithmic factors incurred by these algorithms are inherent to their construction.
Beyond the nearly minimax optimal algorithms in Table 1, there exists a large range of methods with formal guarantees that are interesting in their own right, such as the line of works on model-free methods [Ménard et al., 2021] or that on Bayesian methods [Osband et al., 2013, Tiapkin et al., 2022].
Furthermore, parallel to minimax regret bounds, there is a growing literature on problem-dependent regret analysis with bounds scaling as log(K) rather than K, see for instance Xu et al. [2021], Tirinzoni et al. [2021], Dann et al. [2021], Yang et al. [2021]. We also note that many episodic RL algorithms have analogues in average-reward RL. For instance, the analogue of UCBVI [Azar et al., 2017] is FOCUS [Zamir et al., 2026], although the dominant template there is rather UCRL2 [Auer et al., 2008] and its variants [Filippi et al., 2010, Bourel et al., 2020, Boone and Zhang, 2024].
2 Preliminaries
A tabular episodic Markov decision process (MDP) is a tuple (S,A,H,(Ph)h=1H,(rh)h=1H,μ). S and A are the state and action spaces with cardinalities S and A, respectively. H is the length of each episode. Ph:S×A→Δ(S) is the transition kernel at step h, with Ph(⋅∣s,a) denoting the distribution over possible next states upon taking action a at state s. rh:S×A→[0,1] is the (deterministic) reward function at step h. μ is the initial state distribution.
We study tabular online RL. For each episode k=1,…,K, the learner plays a policy πk=(πhk)h=1H then observes the trajectory s1k,a1k,r1k,…,sHk,aHk,rHk, where s1k∼μ, then for each h∈[H], ahk=πhk(shk), rhk=rh(shk,ahk), and sh+1k∼Ph(⋅∣shk,ahk). Note that we assume the learner does not know the transition kernels (Ph) or initial state distribution μ but otherwise knows S, A, H, (rh), and K.
For a policy π=(πh)h=1H we let (Vhπ)h=1H+1 and (Qhπ)h=1H+1 be the value and action-value functions for the policy π. We also denote by (Vh⋆) and (Qh⋆) the optimal value and action-value functions. The learner's goal is to minimize the regret, defined as
Reg(K):=k=1∑K(V1⋆(s1k)−V1πk(s1k)).(1)
We are interested in minimizing the regret in expectation and in the worst case, called minimax regret, that is, bounding the expectation of Reg(K) uniformly for every MDP with S states, A actions and horizon H.
2.1 Additional Notation
Let P be a transition kernel. Given a step h and a state-action pair (s,a), we often write Ph,s,a to denote the row vector of length S whose entries are Ph(s′∣s,a) for each s′. Hence, for V∈RS we use Ph,s,aV as shorthand for ∑s′Ph(s′∣s,a)V(s′). Given a distribution p∈Δ(S) and value function V∈RS, we define
Var(p,V):=pV2−(pV)2=Vars∼p(V(s)).
For an integer n≥1, we let [n]:={1,…,n}. 1 to denotes the all-ones vector and I denotes the indicator function. We write x≲y or x≤O(y) if x≤cy for some universal constant c>0, and x≍y if both x≲y and y≲x. Finally, we define log≥0(x):=log(max{1,x}), log≥1(x):=max{1,log≥0(x)}, Var≥1(p,V):=max{1,Var(p,V)}, and x+:=max{0,x}.
3 Insufficiency of State-of-the-Art Methods
There are multiple routes to obtain an algorithm with regret of order H3SAKlog(K)α. These include variants of UCBVI [Azar et al., 2017], optimistic variants of PSRL [Osband et al., 2013], and optimistic variants of Q-Learning [Watkins and Dayan, 1992]. Note that most state-of-the-art approaches are optimistic, with only a few exceptions [Lee and Oh, 2025, 2026]. In this work, we take the first route and design our minimax optimal algorithm as a variant of UCBVI. Our approach differs significantly from the existing family of UCBVI-methods, which is perhaps unsurprising since every existing algorithm suffers from polylog(K) factors and is therefore not minimax optimal (Table 1). In this section, we identify the culprit responsible for this suboptimality: the optimistic bonus design.
3.1 The UCBVI Algorithm
The UCBVI algorithm of Azar et al. [2017] consists of performing dynamic programming (DP) over the MDP with overestimated reward function (rh+bhk)h=1 and empirical transition kernel
where Nhk(s,a,s′):=∑i=1k−1I(shi=s,ahi=a,sh+1i=s′) and Nhk(s,a):=∑s′Nhk(s,a,s′) are the empirical visit counts before episode k. To be more precise, given the above notation, one computes
with VH+1k(s):=0 for every state s∈S. Then, during episode k, the learner plays the greedy policy with respect to Qhk:
πhk(shk)∈arga∈AmaxQhk(shk,a),
breaking ties arbitrarily.
3.2 Why log(K) Appears in Variants of UCBVI
To derive minimax regret bounds for UCBVI, the bonus (bhk)h=1 is designed so that Vhk upper bounds Vh∗ uniformly over steps h∈[H] and episodes k∈[K] with high probability. Typically, bhk is constructed in order to invoke an empirical Bernstein inequality [Maurer and Pontil, 2009]:
with the convention bhk(s,a)=+∞ for Nhk(s,a)=0. With this bonus, one usually obtains high-probability regret bounds of the form
P(Reg(K)≥CH3SAK(log(K/δ))γ)≤δ
for some γ≥1. To convert the above into a bound in expectation, one can choose the confidence parameter as δ≍1/poly(K). The reason for this choice of δ is that, when the good event in the above display fails to hold, not much can be done other than bounding Reg(K) by its worst possible value HK. Consequently, the expected regret is bounded by
E[Reg(K)]≲H3SAK(log(K/δ))γ+δ⋅HK.
This expected regret bound of order H3SAK(log(K))γ is sub-optimal by a factor log(K)γ/2.
Where the log(K)γ/2 comes from. The cost of optimism must at some point be paid. In standard regret analyses, this fact appears via the sum of bonuses ∑k,hbhk(shk,ahk). Intuitively speaking, the regret bound suffers when the bonus is larger than necessary. Keeping only the dominant terms of the analysis, the bound of this term goes as such:
where (°1) unfolds the definition of the bonus ( bhk); (°2) approximates various estimators by their true values; (°3) rewrites the sum over triplets (s, a, h) and integrates; (°4) follows from Cauchy–Schwarz; and (°5) follows by a well-known lemma of the field.
In the final bound after (°5), we recognize a term scaling as the lower bound, as well as an extra factor ℓ≍log(K)γ/2. This factor ℓ was pulled from the start at (°1) and is therefore incompressible; we pay it as soon as we have to bound ∑k,hbhk(shk,ahk). In other words, prior algorithms which use bonuses of the form (3) cannot attain the minimax lower bound. We emphasize that this suboptimality is not simply an artifact of the above analysis, and that the resulting log factor in the regret is unavoidable because the fixed-log bonus is too large. This claim is supported by lower bounds in the bandits setting for the UCB algorithm, which also has a fixed log factor in its bonus and is similarly doomed to incur an extra log factor in its regret [Kalvit and Zeevi, 2021].
4 Variance-Aware Time-Uniform Concentration
Section 3 identifies the fixed logarithmic factor in standard UCBVI bonuses as an obstacle to achieving minimax optimality. Now, we introduce the main concentration tool that we use to overcome this obstacle.
In stochastic bandits, UCB [Auer et al., 2002] was made minimax-optimal via MOSS [Audibert and Bubeck, 2009], which is essentially the same algorithm with optimistic bonuses tailored to guarantees in expectation. Because UCBVI takes its roots in UCB, it is only natural to generalize MOSS's bonuses to our setting. The essence of MOSS's bonuses is dividing by visit counts within the logarithmic factors, replacing the static log(1/δ) with a term of the form log≥0(1/(nδ)), where n is an appropriate visit count. This modification allows the logarithmic terms to shrink as observations accumulate, rather than always paying the same factor. By taking δ≍1/K, it follows that the log factor vanishes when n≍K is large. As such and with careful analysis, the factor ℓ from the computation (°1–5) in Section 3 becomes removable.
We now face a new challenge: these smaller bonuses need not preserve optimism. Instead of ensuring that an estimate remains optimistic, we will control how far below the true value it can fall. The following variance-aware, time-uniform concentration inequality provides this control. We defer the proof to Appendix C.
Theorem 4.1 (Variance-aware MOSS concentration). Let (Xn)n=1∞ be i.i.d. random variables such that
E[Xi]=μ,Var(Xi)=σ2,∣Xi−μ∣≤ca.s.
For n≥1, write μ^n:=n1∑i=1nXi. Set α0=4 and β0=2/3. For every δ∈(0,1), the random variable
satisfies P(∃n≥1:Zn≥Δ)≤16δ(Δ2σ2+Δc) for every error level Δ>0.
Theorem 4.1 is a time-uniform analogue of Bernstein's inequality with linear drift (the quantity Δ). It bounds the probability that the empirical mean plus a confidence interval underestimates the true mean by at least Δ at any sample size. That is, the bound applies at every sample size without a union bound.
To see how this result guides the bonus design, fix a triplet (h,s,a), write P=Ph,s,a, and let P^=Ph,s,a,n be its corresponding empirical transition row after n observed transitions from (h,s,a). In previous works that require optimism, the bonus is designed to be an upper bound to (P−P^)Vh+1⋆. Applying the usual Bernstein's inequality and then taking a union bound over n leads to the fixed log factor discussed in Section 3. Theorem 4.1 instead suggests a bonus of the form
When P^≈P and Vh+1k≈Vh+1⋆, the variance estimate is approximately Var(P,Vh+1⋆), and Theorem 4.1 provides control on how (P−P^)Vh+1⋆ relates to the bonus. The exact bonus we use in our algorithm, which we present in the next section, has roughly the same form but requires some additional care.
5 Our Algorithm: MORE-UCBVI
In this section we introduce MORE-UCBVI (Minimax Optimal Regret in Expectation with UCBVI), given in Algorithm 1. We build on the UCBVI framework described in Section 3. To recap, before each episode k we update an empirical transition kernel according to (2) then use it in value iteration to compute our value estimates Qk and Vk. Then for the duration of the episode we act greedily with respect to Qk, with ties between best actions broken arbitrarily.
The difference between the original UCBVI of Azar et al. [2017] and our algorithm lies in the bonus. Write nhk(s,a):=max{1,Nhk(s,a)}, B:=HK/(SA). For a distribution p∈Δ(S), visit count n≥1, and value function V∈RS, we define a bonus function
Algorithm 1: MORE-UCBVI: Minimax Optimal Regret in Expectation for UCBVI
for k=1,…,K do
Compute empirical kernels Pk, see Eq. (2)
Set VH+1k(s)←0 for all states s
for h=H,…,1 do // optimistic DP
Qhk(s,a)←min{rh(s,a)+Ph,s,akVh+1k+bhk(s,a),H−h+1} for all pairs (s,a)Vhk(s)←maxaQhk(s,a) for all states s
end
Observe the initial state s1k
for h=1,…,H do // run episode
Take action ahk=argmaxaQhk(shk,a)
Observe the new state sh+1k
end
end
Here, α=64, β=4096, B=HK/(SA), and Var is a high probability upper-bound of the variance:
Var(p,n,V):=2Var≥1(p,V)+n64H2SL.
Then the bonus used by the algorithm to compute Qhk(s,a) before episode k is simply the bonus function evaluated at the corresponding empirical transition kernel, count, and next-step value function:
bhk(s,a):=b(Ph,s,ak,nhk(s,a),Vh+1k).
We remark that B can be interpreted as an exploration budget because the logarithmic factor decreases to 1 as the visit count increases to B/Var. Choosing larger B results in larger bonuses, while decreasing B yields worse under-optimism. The choice B=HK/(SA) optimally balances this tradeoff. optimize α and β, which could likely be significantly improved.
The bonus b:=max{b1,b2} is typical of sub-gamma random variables. The part b1 is due to a sub-gaussian tail that dominates for large n, while b2 is the shadow of a sub-exponential tail that outweighs b1 for small n. Note that b1 is a MOSS-style bonus while b2 is reminiscent of a UCB-style bonus. Because b1 ends up being dominant for large n, taking it in MOSS-style is crucial to have tight guarantees in expectation. On the other hand, taking b2 as UCB-style instead will be more appropriate for the use of good events. In addition, note the presence of an optimistic estimator of variance in b1. Its role cannot be explained by Theorem 4.1 alone, so we defer further clarifying its presence to Section 7.2.
6 Main Theorem
We now present the main result of our paper.
Theorem 6.1. The regret of Algorithm 1 satisfies
E[Reg(K)]≤O(H3SAK+H3S2A(logK)2).
We provide a proof sketch in Section 7 and a complete proof in Appendix A. The leading term in Theorem 6.1 matches the Ω(H3SAK) minimax lower bound of Domingues et al. [2021] for time-inhomogeneous episodic MDPs up to a universal constant. Unlike the results of previous works summarized in Table 1, the leading term of our regret bound contains no extra logarithmic factors. Theorem 6.1 is therefore the first result to completely close the gap between upper and lower bounds (for K greater than a polynomial of H, S, A).
An application to best policy identification. We next provide an application of our main result to the problem of best-policy identification [Domingues et al., 2021]. We say that an algorithm is (ε,δ)-PAC if, for every MDP, it terminates after a finite number of episodes and returns a policy π^=(π^h)h=1H satisfying
P(V1⋆(μ)−V1π^(μ)≤ε)≥1−δ.
Here V_1^\hat{\pi}(\mu) = \sum_s \mu(s) V_1^\hat{\pi}(s) is the expected value function with respect to the starting distribution μ, and likewise V1⋆(μ)=∑sμ(s)V1⋆(s).
Corollary 6.2. There exists an algorithm which, for any ε∈(0,H], δ∈(0,1], is (ε,δ)-PAC for best-policy identification and uses at most
O(ε2H3SALδ+ε2H2Lδ2+H3S3A(log(eHSA))4Lδ)
episodes, where Lδ=log(2/δ).
In the regime where ε is sufficiently small and δ is not exponentially small in SAH, specifically ε≤S(log(eHSA))21 and δ≥exp(−SAH), the total number of episodes used is O(H3SAlog(δ2)ε−2). To the best of our knowledge this is the first result to match the Ω(H3SAlog(δ1)ε−2) minimax lower bound shown by Domingues et al. [2021] in some regimes, improving the logarithmic factors relative to prior work.
Corollary 6.2 follows easily from Theorem 6.1 by applying standard regret-to-PAC techniques [Kaufmann et al., 2021]: we can run Algorithm 1 for sufficiently many episodes K0 so that E[Reg(K0)/K0]≤O(ε), use Markov's inequality to conclude that a uniformly randomly selected policy from π1,…,πK0 has suboptimality O(ε) with at least constant probability, and then boost the success probability by repeating O(log(1/δ)) times, evaluating all policies to error O(ε) and returning the best one. We refer to Appendix D for the formal algorithm statement, proof, and more discussion of related work on best-policy identification and the regimes where the lower bound of Domingues et al. [2021] holds.
7 Proof Sketch
In this section we sketch the proof of Theorem 6.1, focusing on the main technical contributions. We defer the full analysis to Appendix A.
Using standard arguments (see Azar et al. [2017], Zhang et al. [2021] and Lemma A.1), we decompose the expected regret into two
The term T−quantifies the total cost due to the optimistic value V1k(s1k) underestimating the true value V1⋆(s1k), and is therefore a cost of under-optimism. That is, as the bonus decreases and the algorithm becomes less optimistic, T−increases. Meanwhile, T+quantifies how much the optimistic value V1k(s1k) tends to overshoot the true value V1⋆(s1k), and is therefore a cost of over-optimism; the larger the bonus, the larger T+. To have the best regret possible, these two terms must be balanced. In particular, and in opposition to past analysis such as Azar et al. [2017] and Zhang et al. [2021], we will see that the MOSS-style bonuses no longer ensure that T−vanishes.
7.1 Bounding T−: Under-Optimism
As mentioned in Section 3, optimistic algorithms choose bonuses large enough to ensure that Vhk≥Vh∗ simultaneously for all k,h – and therefore T−≤0 – with high probability. We first recall the role of monotonicity in this argument before explaining what changes for our smaller MOSS-style bonus.
The argument of UCBVI and its successors. Consider a UCB-style bonus bucb for which the Bellman update V↦pV+bucb(p,n,V) is monotone, as in the analysis of MVP [Zhang et al., 2021]. Fix k, and let Vhk,h∈[H+1], denote the value estimates computed before the k-th episode using UCBVI with the bonus bucb. The proof shows Vhk≥Vh∗∀h by backwards induction over h. The base case is of course trivial because VH+1k=VH+1∗=0. Then, for the inductive case, suppose that Vh+1k≥Vh+1∗ and let s be arbitrary.
For ease of notation, write a⋆=πh⋆(s), P=Ph,s,a⋆, P^=Ph,s,a⋆k and n=nhk(s,a⋆). If Vhk(s)=H−h+1, the claim follows immediately. Otherwise, with high probability,
Here, the inequality (°1) is by definition of Vhk, and the inequality (°3) is because bucb is large enough so that
(P−P^)Vh+1⋆≤bucb(P^,n,Vh+1⋆)(6)
with high probability (simultaneously for all h,s,a,n). The inequality (∘2) crucially depends on the aforementioned monotonicity of the Bellman update. In particular, Vh+1k≥Vh+1⋆ implies P^Vh+1k+bucb(P^,n,Vh+1k)≥P^Vh+1⋆+bucb(P^,n,Vh+1⋆). This monotonicity allows us to replace the data-dependent vector Vh+1k by the fixed vector Vh+1⋆ before applying concentration, thereby avoiding potentially loose covering arguments over value functions.
Controlling the cost of under-optimism. For our smaller MOSS-style bonus b, a concentration inequality of the form of Eq. (6) need not hold simultaneously for all h,s,a,n with high enough probability. We therefore cannot assume Vh+1k≥Vh+1⋆ at the next step of the induction, even though the function V↦P^V+b(P^,n,V) is still monotone (see Corollary A.5). However, while we cannot order Vh+1k and Vh+1⋆ in a strict manner, we can instead control how a next-step shortfall propagates through the Bellman update. This is made possible by the following result, which is a slightly simplified version of Corollary A.6.
Lemma 7.1 (Stability of the Bellman Update). Let p∈Δ(S), n≥1, and V,V′∈[0,H]S. Then
pV+b(p,n,V)≥pV′+b(p,n,V′)−(1+16H1)p(V′−V)+.
Applying this lemma with V=Vh+1k and V′=Vh+1⋆ gives nearly the same substitution as monotonicity, except that now Vh+1k and Vh+1⋆ may be unordered. Moreover, this substitution only incurs an extra cost of approximately P^(Vh+1⋆−Vh+1k)+. Roughly speaking, the previous argument with bucb was that “ Vh+1k is optimistic so Vhk is optimistic”. The new argument with b states that “ Vh+1k is nearly optimistic so Vhk is nearly optimistic”.
Explicitly, under a certain high probability good event E, stability yields
There are three notable adjustments which require explaining: instead of b we have bˉ; instead of (1+1/(16H)) we have (1+1/(4H)); and instead of P^ we have P. To obtain the desired bound on (V1⋆(s)−V1k(s))+ we will unroll the above inequality backwards from h=H+1 to 1, and for reasons that will shortly be apparent, it is important that the next-step shortfall is weighted by P instead of P^. We accomplish this change by splitting off half the bonus and using it to approximately upper bound ∣P^−P∣ under the good event E. bˉ=b/2 is the remaining half of the bonus, and the “approximate” upper bounding is what necessitates changing (1+1/(16H)) to (1+1/(4H)).
Since VH+1k=VH+1⋆=0, as mentioned above, we can unroll the previous inequality backwards. Using (1+1/(4H))H≤2, what remains is an occupancy weighted sum of only the first terms. Specifically,
Here, Pμπ∗(sh=s,ah=a) is the probability of visiting (s,a) at step h in the true MDP, starting from a state randomly drawn from μ then following π∗. These occupancies belong to the true MDP under π∗ and are thus deterministic. Consequently, we only need an expected shortfall bound for each fixed (h,s,a), rather than a simultaneous guarantee for all (h,s,a). Note that if we kept P^ instead of P, we would encounter issues due to data-dependent occupancies.
We obtain the following lemma by applying the time-uniform concentration inequality Theorem 4.1 and integrating its tail bound. Time-uniformity is essential because nhk(s,a) is chosen adaptively, and we cannot afford to take a union bound over its possible values.
Lemma 7.2. For each episode k and triplet t≡(h,s,a),
All that remains is accounting for Ec, a standard argument to bound a sum of variance terms, summing over K, and plugging in B=HK/(SA). These imply
E[T−]≲BKH2+K2H≲H3SAK.
7.2 Bounding T+: Over-Optimism
To bound the over-optimism error T+, we utilize the splitting Vh+1k=Vh+1⋆+(Vh+1k−Vh+1⋆). Specifically, we upper bound T+ by the sum of three terms:
By splitting like so, we are allowed to apply concentration results to the fixed vector Vh+1⋆, thereby avoiding in T1+ issues of dependence between the empirical transition kernel Ph,shk,ahkk and the value estimate Vh+1k.
Overall, the decomposition of T1+, T2+, T3+ is standard and can be found in Zhang et al. [2020] for instance. We can handle T2+ using a standard variance analysis along the learner's trajectory. For the other sums T1+ and T3+, however, we must develop sharper arguments to avoid extra logarithms in the leading term. This is what we discuss in the remainder of the section. The detailed analyses of E[T1+], E[T2+], and
E[T3+] are found in Appendix A.5.
Bounding T1+: Concentration of cumulative deviations. For a fixed triplet (h,s,a), bounding dn:=(P^h,s,a,n−Ph,s,a)Vh+1⋆ simultaneously for all n∈[K] would require a union bound over K events, incurring a factor of log(K), or at least loglog(K) by the law of iterated logarithms. Instead, we develop a general result — which may be of independent interest — to directly bound the sum of deviations ∑ndn (proved in Appendix A.5, Proposition A.12).
Proposition 7.3 (Concentration on sums with slackness). Let (Xn)n=1∞ be i.i.d. random variables with mean μ, variance σ2, and ∣Xi−μ∣≤c almost surely. Write μ^n=n−1∑i=1nXi the empirical mean. There is a universal constant C>0 such that, for every Δ>0,
n=1∑∞E[(μ^n−μ−Δ)+]≤C(Δσ2+c).
The following corollary helps bound T1+. It follows by adding and subtracting a slackness parameter Δ, then tuning to the optimal choice Δ=σ2/E[N].
Corollary 7.4 (Concentration on sums). Under the setting of Proposition 7.3, for any nonnegative integer-valued random variable N with E[N]<∞,
E[n=1∑N(μ^n−μ)+]≲σ2E[N]+c.
Recall that Nh(s,a) is the total number of visits to (h,s,a) over the K episodes. After rearranging the sum over k,h into a sum over h,s,a,n, Corollary 7.4 gives
Unlike the fixed logarithmic factor in the bonus in Section 3, here the logarithmic term log≥1(B/(nσh(s,a)2)) decreases as the visit count n increases. Crucially, we compute the sum with the decreasing logarithmic terms directly, rather than upper bounding all logs by their largest value and pulling a logB factor outside the sum. We formalize this in the following lemma.
Lemma 7.5 (Variance-normalized MOSS sum). For every q>0, B>0, and integer N≥0,
n=1∑Nnqlog≥1(nqB)≤6B+BqN.
We remark that, as opposed to UCB-style bonuses, summing MOSS-style bonuses via Lemma 7.5 does not spawn logarithmic terms. The proof splits the sum according to n≤B/q and n>B/q. For n≤B/q, an integral comparison sums the bonuses to at most 6B. For n>B/q, the logarithmic factor equals 1, so each bonus is at most q/B, giving the remaining qN/B.
With all the results so far, we can finally explain when the inclusion of the variance in the denominator of the logarithm of b1 in Eq. (4) makes its play. Without it, the same integral comparison as before would yield a first term of ∑h,s,aσh(s,a)2B, whose worst-case bound is of order H2SAB=H5SAK, a factor H larger than the desired H3SAK rate. Including the variance in the denominator changes the range of the first sum from n≤B to n≤B/q. The integral comparison then gives B rather than qB, since the factor q in the bonus is exactly canceled by the factor 1/q from the shorter summation range.
The last line follows from a folklore result on the variance sum (Lemma A.9), then plugging in B=SAHK.
8 Conclusion
In this paper we match the minimax regret lower bound in episodic RL without extra polylogarithmic factors, using a MOSS-style bonus which incorporates visit counts and variance estimates. We believe that these algorithmic techniques, as well as our concentration results and analysis of the resulting under-optimism, may be more widely useful. Future directions include improving the additive “burn-in” regret term (similar to Zhang et al. [2025]) and handling the time-homogeneous setting.
AI Acknowledgment
The problem formulation and most of the proof ideas were developed by the authors. The initial writing was completely done by the authors. ChatGPT 5.6 Sol and ChatGPT 6 Astra were used for the following: (i) they helped refine some of our arguments, including removing a log H factor by inserting the variance approximation Var in the denominator of the log in the bonus, and it helped to remove a log S factor with the stability lemma; (ii) they helped with literature review, catching typos, improving the writing, and double-checking the correctness of proofs.
Any components which were assisted with LLMs were thoroughly reviewed and re-written with our own notation, exposition, and understanding. We take complete responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of LLMs.
Acknowledgment
G. Zamir, M. Zurek, and Y. Chen acknowledge support by National Science Foundation grants CCF-2233152 and DMS-2023239, by a Cisco Systems Fellowship, and by a Vilas Associates Award.
References
Rajeev Agrawal. Sample mean based index policies by o (log n) regret for the multi-armed bandit problem. Advances in applied probability, 27(4):1054–1078, 1995.
Jean-Yves Audibert and Sébastien Bubeck. Minimax policies for adversarial and stochastic bandits. In Colt, pages 217–226, 2009.
Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2):235–256, 2002.
Peter Auer, Thomas Jaksch, and Ronald Ortner. Near-optimal regret bounds for reinforcement learning. Advances in neural information processing systems, 21, 2008.
Mohammad Gheshlaghi Azar, Ian Osband, and Rémi Munos. Minimax regret bounds for reinforcement learning. In International conference on machine learning, pages 263–272. PMLR, 2017.
Victor Boone and Zihan Zhang. Achieving Tractable Minimax Optimal Regret in Average Reward MDPs. In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang, editors, Advances in Neural Information Processing Systems, volume 37, pages 26728–26769. Curran Associates, Inc., 2024.
Stéphane Boucheron, Gábor Lugosi, and Pascal Massart. Concentration Inequalities: A Nonasymptotic Theory of Independence. Oxford University Press, 02 2013. ISBN 9780199535255. doi: 10.1093/acprof:oso/9780199535255.001.0001.
Hippolyte Bourel, Odalric Maillard, and Mohammad Sadegh Talebi. Tightening Exploration in Upper Confidence Reinforcement Learning. In Hal Daumé III and Aarti Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 1056–1066. PMLR, July 2020.
Christoph Dann, Lihong Li, Wei Wei, and Emma Brunskill. Policy Certificates: Towards Accountable Reinforcement Learning. In Proceedings of the 36th International Conference on Machine Learning, pages 1507–1516. PMLR, May 2019. URL https://proceedings.mlr.press/v97/dann19a.html.
Christoph Dann, Teodor Vanislavov Marinov, Mehryar Mohri, and Julian Zimmert. Beyond value-function gaps: Improved instance-dependent regret bounds for episodic reinforcement learning. In Marc'Aurelio Ranzato, Alina Beygelzimer, Yann N. Dauphin, Percy Liang, and Jennifer Wortman Vaughan, editors, Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, virtual, pages 1–12, 2021.
Omar Darwiche Domingues, Pierre Ménard, Emilie Kaufmann, and Michal Valko. Episodic reinforcement learning in finite mdps: Minimax lower bounds revisited. In Algorithmic Learning Theory, pages 578–598. PMLR, 2021.
Sarah Filippi, Olivier Cappé, and Aurélien Garivier. Optimism in Reinforcement Learning and Kullback-Leibler Divergence. 2010 48th Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 115–122, September 2010. arXiv: 1004.5229.
Anand Kalvit and Assaf Zeevi. A closer look at the worst-case behavior of multi-armed bandit algorithms. In Advances in Neural Information Processing Systems, volume 34, pages 8807–8819, 2021. URL https://arxiv.org/abs/2106.02126.
Emilie Kaufmann, Pierre Ménard, Omar Darwiche Domingues, Anders Jonsson, Edouard Leurent, and Michal Valko. Adaptive reward-free exploration. In Vitaly Feldman, Katrina Ligett, and Sivan Sabato, editors, Proceedings of the 32nd International Conference on Algorithmic Learning Theory, volume 132 of Proceedings of Machine Learning Research, pages 865–891. PMLR, 16–19 Mar 2021. URL https://proceedings.mlr.press/v132/kaufmann21a.html.
Cyrille Kone and Kevin Jamieson. Optimal Posterior Sampling for Policy Identification in Tabular Markov Decision Processes. In Proceedings of The 29th International Conference on Artificial Intelligence and Statistics, pages 766–774. PMLR, August 2026. URL https://proceedings.mlr.press/v300/kone26a.html.
Tor Lattimore and Csaba Szepesvári. Bandit algorithms. Cambridge University Press, 2020.
Harin Lee and Min-hwan Oh. Minimax optimal reinforcement learning with quasi-optimism. In International Conference on Learning Representations, volume 2025, pages 13184–13231, 2025.
Harin Lee and Min-hwan Oh. Unified framework of distributional regret in multi-armed bandits and reinforcement learning. arXiv preprint arXiv:2605.05102, 2026.
Andreas Maurer and Massimiliano Pontil. Empirical bernstein bounds and sample variance penalization, 2009. URL https://arxiv.org/abs/0907.3740.
Pierre Menard, Omar Darwiche Domingues, Anders Jonsson, Emilie Kaufmann, Edouard Leurent, and Michal Valko. Fast active learning for pure exploration in reinforcement learning. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 7599–7608. PMLR, 18–24 Jul 2021. URL https://proceedings.mlr.press/v139/menard21a.html.
Pierre Ménard, Omar Darwiche Domingues, Xuedong Shang, and Michal Valko. Ucb momentum q-learning: Correcting the bias without forgetting. In International Conference on Machine Learning, pages 7609–7618. PMLR, 2021.
Ian Osband, Daniel Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. Advances in Neural Information Processing Systems, 26, 2013.
Daniil Tiapkin, Denis Belomestny, Daniele Calandriello, Eric Moulines, Remi Munos, Alexey Naumov, Mark Rowland, Michal Valko, and Pierre Ménard. Optimistic posterior sampling for reinforcement learning with few samples and tight guarantees. Advances in Neural Information Processing Systems, 35:10737–10751, 2022.
Andrea Tirinzoni, Matteo Pirotta, and Alessandro Lazaric. A fully problem-dependent regret lower bound for finite-horizon mdps. CoRR, abs/2106.13013, 2021. URL https://arxiv.org/abs/2106.13013.
Andrea Tirinzoni, Aymen Al-Marjani, and Emilie Kaufmann. Optimistic PAC Reinforcement Learning: the Instance-Dependent View. In Proceedings of The 34th International Conference on Algorithmic Learning Theory, pages 1460–1480. PMLR, February 2023. URL https://proceedings.mlr.press/v201/tirinzoni23a.html.
Andrew J Wagenmaker, Max Simchowitz, and Kevin Jamieson. Beyond no regret: Instance-dependent pac reinforcement learning. In Po-Ling Loh and Maxim Raginsky, editors, Proceedings of Thirty Fifth Conference on Learning Theory, volume 178 of Proceedings of Machine Learning Research, pages 358–418. PMLR, 02–05 Jul 2022. URL https://proceedings.mlr.press/v178/wagenmaker22a.html.
Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3):279–292, 1992.
Zhihan Xiong, Ruoqi Shen, Qiwen Cui, Maryam Fazel, and Simon Du. Near-optimal randomized exploration for tabular markov decision processes. In S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh, editors, Advances in Neural Information Processing Systems, volume 35, pages 6358–6371. Curran Associates, Inc., 2022.
Haike Xu, Tengyu Ma, and Simon S. Du. Fine-grained gap-dependent bounds for tabular mdps via adaptive multi-step bootstrap. In Mikhail Belkin and Samory Kpotufe, editors, Conference on Learning Theory, COLT 2021, 15-19 August 2021, Boulder, Colorado, USA, Proceedings of Machine Learning Research, pages 4438–4472. PMLR, 2021.
Kunhe Yang, Lin F. Yang, and Simon S. Du. Q-learning with logarithmic regret. In Arindam Banerjee and Kenji Fukumizu, editors, The 24th International Conference on Artificial Intelligence and Statistics, AISTATS 2021, April 13-15, 2021, Virtual Event, Proceedings of Machine Learning Research, pages 1576–1584. PMLR, 2021.
Guy Zamir, Matthew Zurek, and Yudong Chen. Optimal variance-dependent regret bounds for infinite-horizon mdps. In Steve Hanneke and Tor Lattimore, editors, Proceedings of Thirty Ninth Conference on Learning Theory, volume 336 of Proceedings of Machine Learning Research, pages 7016–7061. PMLR, 29 Jun–03 Jul 2026.
Andrea Zanette and Emma Brunskill. Tighter problem-dependent regret bounds in reinforcement learning without domain knowledge using value function bounds. In International Conference on Machine Learning, pages 7304–7312. PMLR, 2019.
Zihan Zhang, Yuan Zhou, and Xiangyang Ji. Almost optimal model-free reinforcement learning via reference-advantage decomposition. Advances in Neural Information Processing Systems, 33:15198–15207, 2020.
Zihan Zhang, Xiangyang Ji, and Simon S Du. Is reinforcement learning more difficult than bandits? a near-optimal algorithm escaping the curse of horizon. In COLT, pages 4528–4531, 2021.
Zihan Zhang, Yuxin Chen, Jason Lee, and Simon S Du. Settling the sample complexity of online reinforcement learning. Journal of the ACM, 72(3):1–63, 2025.
A Complete Proof of Theorem 6.1
In this section we prove our main result, Theorem 6.1.
A.1 Overview of Notation and Conventions
We recall notation used throughout the proof. Unless stated otherwise, sums over k and h range over [K] and [H], respectively, and inequalities between vectors are understood componentwise. For each (h,s,a)∈[H]×S×A, let (Xh,s,a,i)i≥1 be an i.i.d. sequence with law Ph,s,a. We take these sequences to be mutually independent and independent of the initial states (s1k)k=1K, which are drawn i.i.d. from μ. Equivalently, the trajectory can be generated by revealing the next unused sample from the corresponding sequence whenever the learner visits (h,s,a). For every integer n≥1, define the empirical row
When Nhk(s,a)≥1, we have Ph,s,ak=P^h,s,a,Nhk(s,a)=P^h,s,a,nhk(s,a). When Nhk(s,a)=0, the algorithm instead uses the uniform row Ph,s,ak(s′)=1/S. We do not identify this initialization with P^h,s,a,1, so we handle first visits separately when using concentration bounds for the empirical rows.
We also recall that B=HK/(SA) and L=log(10HS2AK4), and that
Powers and positive parts of vectors are taken componentwise.
The algorithm uses the bonus bhk(s,a)=b(Ph,s,ak,nhk(s,a),Vh+1k). The bonus function b is defined by b=max{b1,b2}, where b1 and b2 are defined as in Section 5. For the under-optimism analysis we define the half-bonus
bˉ(p,n,V):=21b(p,n,V).
As briefly discussed in Section 7, we will use bˉ to compare value functions and reserve the remaining half of b to replace empirical transitions by true transitions. Finally, we recall our choices of constants within the bonus:
The following lemma states that E holds with high probability and provides three useful inequalities which hold under E. The proof follows from Bernstein's inequality and a union bound over all (h,s,a,s′,n). We defer the complete proof to Appendix B.2.
Lemma A.2. The event E defined in Eq. (A.2) holds with probability at least 1−1/K3. Moreover, under E, the following hold simultaneously for every (h,s,a)∈[H]×S×A, every n∈[K], and every (potentially data-dependent) V∈[0,H]S:
Var(Ph,s,a,V)≤2Var(P^h,s,a,n,V)+n8H2SL,
Var(P^h,s,a,n,V)≤2Var(Ph,s,a,V)+n8H2SL,
P^h,s,a,nV≤(1+16H1)Ph,s,aV+n9H2SL.
A.4 Bounding T−: Cost of Under-Optimism
In this section, we bound the expectation of the cost of under-optimism, that is E[T−].
Lemma A.3 (Expected amount of under-optimism). The expected cost of under-optimism is bounded by
E[T−]≤O(H3SAK).(A.3)
A.4.1 Stability Properties of Our Bonus Function
We start by providing various stability results on the bonus function. The goal of the present section is to prove Lemma 7.1, restated in the form of Corollary A.6. The following lemma controls how much the bonus changes when the value function increases. We defer the proof to Section B.3.
Lemma A.4 (Stability of the Bonus Function). Let p∈Δ(S) and n≥1 be arbitrary. For any 0≤V≤V′≤H1,
∣b(p,n,V′)−b(p,n,V)∣≤16H1p(V′−V).
As an immediate consequence, the corresponding Bellman update has the following monotonicity property.
Corollary A.5 (Monotonicity of the Bellman Update). Let p∈Δ(S) be a probability distribution and n≥1 be arbitrary. For any vectors 0≤V≤V′≤H1, and any c∈(0,16), we have
where (°1) follows by Lemma A.4; and (°2) uses that V−V′≤0 and that 1−c/(16H)≥0.
Of course, we need something that holds when V and V′ are not necessarily ordered. It is not hard to generalize the previous lemma to this case by considering V and V+(V′−V)+, see below.
Corollary A.6 (Stability of the Bellman Update, Complete Version of Lemma 7.1). Let p∈Δ(S) and n≥1 be arbitrary. For any V,V′∈[0,H]S, and any c∈(0,16), we have
pV+c⋅b(p,n,V)≥pV′+c⋅b(p,n,V′)−(1+16Hc)p(V′−V)+.
Proof. The idea is to apply previous results with V and V+(V′−V)+. We have
At this point the next-step error is weighted by the empirical transition Ph,s,πh⋆(s)k. Unrolling the induction on h now would produce data-dependent visitation probabilities. Instead, we use the correction term split off from the bonus to replace Ph,s,πh⋆(s)k by the true transition Ph,s,πh⋆(s), and only then we proceed with the induction. Assume that Nhk(s,πh⋆(s))≥1. Then, on E, we have
where (°1) follows by Part 3 of Lemma A.2; and (°2) holds since 9cH≤21β by choice of β. In the case that Nhk(s,πh⋆(s))=0, then (Vh+1⋆−Vh+1k)+=0 and the above inequality holds trivially. Combining with the previous display inequality and taking the positive parts of both sides, we obtain
Observing the recursive nature of this inequality, we can iterate backwards and use the fact that (1+4H1)H≤2 to obtain that, on E, for every fixed initial state s1,
where Ps1π⋆(sh=s) denotes the probability of visiting s at step h in the true MDP, starting from s1 and following the policy π⋆.
Since the weights in the above display are deterministic for a fixed s1, it suffices to bound the expected shortfall for each fixed (k,h,s,a) instead of requiring all shortfalls to vanish simultaneously. That is, no union bound is necessary.
The following lemma gives us the desired bound on the expected shortfall for a fixed (k,h,s,a). The proof, which we give in Section B.4, follows from the time-uniform concentration inequality Theorem 4.1 by integrating its tail bound.
Lemma A.7 (Expected Shortfall). For every k∈[K], h∈[H], s∈S, and a∈A,
This is for a fixed state s1 instead of the observed s1k which is randomly drawn from μ. Let Pμπ∗(sh=s) denote the probability of visiting s at step h in the true MDP, starting from a state randomly drawn from μ then following π∗. Denote by Eμπ∗[−] the associated expectation operator. Because V1k is computed from the history before s1k∼μ is drawn, it is independent of s1k. Subsequently, since Pμπ∗(sh=s)=∑s1μ(s1)Ps1π∗(sh=s),
The term T1+ measures transition estimation error applied to the optimal value function, while T2+ measures transition error applied to the difference Vh+1k−Vh+1⋆. The remaining term T3+ is the sum of bonuses over the learner's trajectory. We will additionally make use of the following two variance sums:
The following lemma, which we prove in Appendix B.5, gives a bound on E[Var⋆]. We deal with Vardiff later.
Lemma A.9 (Sum of variances). For the total visit counts Nh(s,a) defined above, we have
Eh,s,a∑Var(Ph,s,a,Vh+1⋆)Nh(s,a)≤4H2K.
Consequently, the sum of floored variances satisfies
E[Var⋆]≤5H2K.
We also frequently use the following deterministic sum. The proof is given in Appendix B.6.
Lemma A.10. ∑k,hnhk(shk,ahk)1≤HSAL.
A.5.2 Analysis of T1+
We can now proceed to analyzing the first term T1+. We show the following bound.
Lemma A.11 (Bound on T1+). We have E[T1+]≤O(H3SAK+H2SA).
To do so, we prove a general concentration inequality – which may be of independent interest – involving sums of deviations. It is related to, but different than the time-uniform Bernstein-type concentration result, which considers a maximum over deviations. The complete proof is in Appendix B.7.
Proposition A.12 (Proposition 7.3, Concentration on sums with slackness). Let X1,X2,… be i.i.d. random variables such that
E[Xi]=μ,Var(Xi)=σ2,∣Xi−μ∣≤ca.s.
For n≥1, write μ^n:=n1∑i=1nXi. There is a universal constant C>0 such that, for every slackness Δ>0,
n=1∑∞E[(μ^n−μ−Δ)+]≤C(Δσ2+c).
By tuning the slackness Δ, we obtain the following useful corollary.
Corollary A.13 (Corollary 7.4, Concentration on sums). Under the setting of Proposition A.12, there is a universal constant C′>0 such that, for any nonnegative integer-valued random variable N with E[N]<∞,
E[n=1∑N(μ^n−μ)+]≤C′(σ2E[N]+c).
Proof. The cases E[N]=0 and σ2=0 are trivial, so assume E[N]>0 and σ2>0. By Proposition A.12, we have for any Δ>0,
E[n=1∑N(μ^n−μ)+]≤ΔE[N]+C(Δσ2+c).
Then taking Δ=σ2/E[N] and C′=C+1 yields the desired result.
Proof of Lemma A.11. For each fixed (h,s,a), apply Corollary A.13 to the i.i.d. random variables Vh+1⋆(Xh,s,a,i), whose mean is Ph,s,aVh+1⋆, variance is Var(Ph,s,a,Vh+1⋆), and centered absolute value is at most H. Since Nh(s,a)≤K, the corollary gives
(°1) holds because (P^h,s,a,n−Ph,s,a)c=0 for any real number c; (°2) is by the triangle inequality; (°3) uses E; and (°4) follows from Cauchy-Schwarz and ∣V(s′)−Ph,s,aV∣≤2H. Hence, we have on E
(°7) uses E[I(E)Vardiff]≤E[Vardiff]≤E[Vardiff] by Jensen's inequality.
A.5.4 Analysis of T3+
The bound on the third term T3+ requires the following key lemma. We will use it to show that our MOSS-style bonus can be summed without introducing log factors.
Lemma A.15 (Variance-Normalized MOSS Sum). For any fixed q > 0, B > 0, and integer N≥0, we have
n=1∑Nnqlog≥1nqB≤6B+BqN.
Proof. Write m=⌊B/q⌋. Interpret empty sums below as zero. We upper bound the sum from 1 to N by the sum from 1 to m plus the sum from m+1 to N. Now, since x↦xqlog≥1xqB is nonincreasing on (0,∞) and m≤B/q, we can bound
Above we used the substitutions u=xq/B and t=−logu. For every remaining index m<n≤N, we have n>B/q and hence log≥1nqB=1, so
n=m+1∑Nnqlog≥1nqB=n=m+1∑Nnq≤NB/qq=BqN.
Combining the two sums yields the desired bound.
With this lemma we can obtain the following bound on T3+. The main ideas here are as follows. We use E so that the empirical variances are approximately the same as the true variances up to an additive lower order term. Then, we split terms involving Vh+1k into terms involving V∗ and terms involving Vh+1k−V∗. The former we bound by O(H3SAK+H3S2AL2) by direct computation on top of Lemma A.15, and the latter we bound by a term involving Vardiff. For the complete proof, see Appendix B.8.
where the second inequality holds by xy≤x+y with x=H2S2AL2 and y=H3SAK.
A.6 Conclusion: Bounding the Expected Regret and Proving Theorem 6.1
We conclude by the regret decomposition (Lemma A.1), the bound on E[T−] (Lemma A.3), and the bound on E[T+] (Eq. (A.8)) that
E[Reg(K)]≤E[T−]+E[T+]≤O(H3SAK+H3S2AL2).
If K≤HSA, then E[Reg(K)]≤HK≤H3SAK. Otherwise, K>HSA implies K≥2 and HS2A≤(HSA)2<K2, so L=log(10HS2AK4)≤log(10K6)≲logK. In either case,
E[Reg(K)]≤O(H3SAK+H3S2A(logK)2).
B Missing Proofs from Section A
This section contains proofs which were omitted for ease of presentation. We also state Bernstein's inequality here for completeness.
Lemma B.1 (Bernstein's Inequality, Theorem 3 in Maurer and Pontil [2009]). Let (Xk)k=1 be a sequence of i.i.d. random variables. Let μ:=E[X1] be their expected value and v:=Var(X1) be their variance. If X1−μ≤c a.s. for some c>0, then for all x≥0,
where (°1) follows by a union bound; (°2) follows by bounding the summand via Bernstein's inequality (Lemma B.1) and bounding the number of terms by HS2AK; and (°3) holds by the definition of L.
We continue with the proof of Assertion (1). By the AM–GM inequality, 2pL/n≤p/2+L/n. So, on E, for every (h,s,a,s′,n)∈[H]×S×A×S×[K], we have
Here, (°1) unfolds the definition of Var; (°2) holds because ∣max(u,1)−max(v,1)∣≤∣u−v∣ for u,v∈R; and (°3) unfolds the definition of Var. For (°4), the difference-of-squares identity and linearity of p give
(pV′)2−(pV)2=(pV′−pV)(pV′+pV)=p(V′−V)p(V′+V).
Then (°5) uses that p(V′+V) is a scalar and can therefore be moved inside p. Finally, (°6) follows from V′−V≥0 and
∣V′+V−p(V′+V)1∣≤2H1.
Next, the function Φ(x)=xlog≥1(B/(nx)) is continuous on [1,∞), and, wherever it is differentiable,
Both expressions lie in [0,log≥1(B/n)] on their respective domains within [1,∞).
Now we argue that, for x,x′≥1 we have
∣Φ(x′)−Φ(x)∣≤log≥1(nB)∣x′−x∣.(B.2)
If x=x′ the bound is immediate, so otherwise assume WLOG that x′>x. Let x0=B/(en). If x0∈/(x,x′) then Φ is differentiable on the interval (x,x′) and the mean value theorem immediately implies (B.2). If x<x0<x′ then applying the mean value theorem on each of the intervals [x,x0] and [x0,x′] (noting that Φ is continuous at x0) yields that
Here, (°7) is the difference-of-squares identity. For (°8), observe that
b(p,n,V)2=max{b1(p,n,V)2,b2(p,n,V)2},
and the second branch (in b2) is the same for V and V′. Thus, taking the maximum with this common term cannot increase the difference in the numerator, while both terms in the denominator are at least b2(p,n,V). Inequality (∘9) follows from the preceding bound on b12, and (∘10) follows from (∘6). Equality (∘11) unfolds the definition of b2, (∘12) uses log≥1(B/n)≤2L, and (∘13) follows by choosing β≥64α and using S≥1.
B.4 Proof of Expected Shortfall, Lemma A.7
Fix k,h,s,a. When Nhk(s,a)=0, we have bˉ(Ph,s,ak,nhk(s,a),Vh+1⋆)≥H, and trivially the desired claim holds. The desired claim also trivially holds if Var≥1(Ph,s,a,Vh+1⋆)/B≥H. It therefore suffices to consider the case Nhk(s,a)≥1 and Var≥1(Ph,s,a,Vh+1⋆)/B<H.
On E, Lemma A.2 gives, for every n∈[K],
Var(P^h,s,a,n,n,Vh+1⋆)≥Var≥1(Ph,s,a,Vh+1⋆).
Then, since x↦xlog≥1(B/(nx)) is nondecreasing on (0,∞),
Finally, (∘3) follows directly from bˉ=max{b1/2,b2/2}.
For fixed (h,s,a), the successive transition observations can be generated in advance as an i.i.d. sequence with law Ph,s,a, and P^h,s,a,n is the empirical transition row after its first n observations. Their Vh+1⋆ values have mean Ph,s,aVh+1⋆, variance Var(Ph,s,a,Vh+1⋆), and absolute centered values bounded by H. For positive visit counts, Ph,s,ak=P^h,s,a,nhk(s,a). Therefore, on E,
implies the failure event in Theorem 4.1 with confidence δx and slackness x/2. Since Theorem 4.1 is uniform over n, it applies at the random count nhk(s,a) without conditioning on the count or on E. We can therefore bound
Denote by Δh,s,a:=Vh⋆(s)−rh(s,a)−Ph,s,aVh+1⋆ the Bellman gap of the triplet (h,s,a). Note that the Bellman optimality equation implies that Δh,s,a≥0. For every triplet (h,s,a), we have
where (∘1) uses that rh(s,a)+Δh,s,a≥0 and the bound Vh⋆≤H; and (∘2) uses that rh(s,a)≤1. Further summing over episodes k∈[K] and time h∈[H], we conclude the proof as such:
where (°3) follows by invoking (°2); and (°4) follows by simplifying the telescopic sum in the first expectation of (°3). In (°4), the first expectation is nonpositive since PH,sHk,aHk(VH+1⋆)2−(V1⋆(s1k))2=−(V1⋆(s1k))2≤0; and the second expectation is equal to the expected regret, so is trivially bounded by HK.
we conclude that ∑k,hnhk(shk,ahk)1≤HSA(2+logK)≤HSAL.
B.7 Proof of the Concentration Result on Sums with Slackness, Proposition A.12
Let (Xi)i=1∞ be a sequence of i.i.d. random variables and let E[Xi]=μ and σ2=E[(Xi−μ)2] be their respective expectation and variance. Further assume that ∣Xi−μ∣≤c a.s., for some c∈R≥0. Recall that μ^n:=n1∑i=1nXi denotes the empirical mean after n samples. We show that, for all Δ>0,
n=1∑∞E[(μ^n−μ−Δ)+]≤C(Δσ2+c).(B.3)
where C<∞ is a universal constant.
Note that for σ=0, we have E[(μ^n−μ−Δ)+]=0 for all Δ>0, so that Eq. B.3 is trivial. In the sequel, we assume that σ>0.
Fix Δ>0. To bound the summand E[(μ^n−μ−Δ)+], we distinguish between two cases, depending on whether the visit count n is below or above the threshold:
n⋆:=⌈Δ2σ2+σ2c2⌉.
Low visit counts are handled differently because the tails spawned by Bernstein's inequality are inadequate and the resulting bound is not tight enough. We therefore consider two cases.
• Partial sum for n≤n⋆. For low visit counts, a simple Jensen inequality is enough:
where (°1) follows by linearity of E[−] together with the inequality (x−y)+≤∣x∣ for y≥0; (°2) uses ∣x∣=x2 and invokes Jensen's inequality; (°3) uses that μ^n is the average of n independent copies of X1; (°4) follows by a series-integral comparison; and (°5) unfolds the definition of n∗ and uses the sub-additivity of x↦x.
• Partial sum for n>n⋆. The bound for high visit counts is slightly more involved and relies on Bernstein's inequality. We have:
where (°6) invokes Bernstein’s inequality (Lemma B.1); (°7) splits the integral depending on which of the quadratic and the linear terms dominate; and (°8) uses standard bounds on the error function together with n≥n⋆ for the first integral; and (°9) uses that n⋆≥c2/σ2.
We conclude by combining the two parts (°5) and (°9).
B.8 Proof of the T3+ Bound, Lemma A.16
From the definition of bhk and max{a,b}≤a+b for a,b≥0, we have
Now, fix k,h, and write P^=Ph,shk,ahkk, P=Ph,shk,ahk, n=nhk(shk,ahk), V^=Vh+1k, and V⋆=Vh+1⋆ for ease of notation. We again utilize the strategy of splitting V^ into V⋆ and V^−V⋆. In particular, Var≥1(P,V^)≤2Var≥1(P,V⋆)+2Var(P,V^−V⋆). Subsequently, under E, Lemma A.2 gives us
We can bound the third sum by H2S2AL2 via Lemma A.10. Further, we can handle the second sum exactly as we handled a similar looking term while bounding T2+. Specifically, Cauchy-Schwarz gives us
with (°1) following from Lemma A.15 bounding the MOSS-style sum and (°2) holding by the definition of Var⋆. By the choice of B=SAHK, the first sum is therefore bounded by H3SAK+HKSAVar⋆+H2SAL2 (up to a universal constant).
Since in the worst case bhk(shk,ahk)≲H2SL, we conclude that
Here, the first inequality is due to Jensen’s inequality and Lemma A.2 bounding P(Ec)≤1/K3, and the second inequality is by Lemma A.9 bounding E[Var⋆]≲H2K.
B.9 Proof of the Var diff Bound
Fix arbitrary k∈[K]. For each h∈[H+1], write Dh:=Vhk−Vh⋆. We directly compute for each h,
Lemma C.2 (Maximal Bernstein inequality). Let (Xn) be a sequence of i.i.d. random variables with mean μ and variance σ2 and such that ∣Xn−μ∣≤c a.s. Let Sn:=X1+…+Xn. Then, for every integer N≥1 and x>0,
P(1≤n≤Nmax(Sn−E[Sn])≥x)≤exp(2(Nσ2+cx/3)−x2).
Proof of Lemma C.2. This result is folklore.
The cases c=0 and σ=0 are trivial, because in either case Xn=μ a.s. and the probability bound is trivial. So, we assume in the sequel that c>0 and σ>0. Following typical computations for the proof of Bernstein's inequality, the Laplace transform of Xn can be bounded as such (see [Boucheron et al., 2013, Corollary 2.11 and the discussion that follows it]):
Proof of Theorem C.1. We write E≡Eδ,Δ the event of interest. If σ2=0 then Xk=μ a.s. so P(E)=0 trivially. In the sequel, we assume σ2>0. We bound P(E) by doing a union bound with a geometric grid:
where in (°1) we use that n↦log≥0(nδ1) is non-increasing; in (°2) we invoke the maximal Bernstein inequality (Lemma C.2) and introduce the notation ϕℓ≡ϕαℓ,βℓ (see Lemma C.3) with αℓ:=2ℓ+1σ2 and βℓ≡β:=c/3; and in (°3) we use the super-additivity of ϕℓ (see Lemma C.3).
We proceed by bounding the two factors (I) ℓ and (II) ℓ.
Fix ℓ≥0. For short, write m:=2ℓ and L:=log≥0(2mδ1). Recall that α≡αℓ=2mσ2 and β=c/3.
• Factor (I) ℓ: For the first factor (I) ℓ, by setting q:=2αL+2βL, we show via straight-forward algebra that q2−2L(α+βq)=2βL2αL≥0. This readily implies ϕℓ(q)=2(α+βq)q2≥L. So:
where (°5) follows by injecting Eq. (C.2) and Eq. (C.3) into (°3); and (°6) follows by an integral-series comparison.
D Best Policy Identification
D.1 Related Work
First we discuss additional related work on the problem of best-policy identification in episodic MDPs.
Jin et al. [2018] describe a standard regret-to-PAC conversion for episodic MDPs which selects a policy from a single uniformly random episode, and only achieves a constant success probability (once the average regret is sufficiently small). A regret-to-PAC conversion from a high-probability regret bound can instead retain the same success probability if the conversion instead outputs a mixture policy, but it is generally more common to require the learner to output a single policy [Wagenmaker et al., 2022]. Menard et al. [2021] also discuss the poor dependence on the failure probability if a single uniformly random episode's policy is chosen. However, Kaufmann et al. [2021] note that it is instead possible to amplify the success probability by estimating the values of multiple policies that have constant probability of being O(ε)-optimal and outputting the best; this is the same approach used within our Algorithm 2. The minimax sample complexity lower bound Ω(H3SAlog(1/δ)/ε2) (measured in episodes) is due to Domingues et al. [2021], and it requires the mild additional assumption that H≥Ω(logAS), as well as that S,A, and H/ε are at least certain absolute constants. We refer to their Theorems 7 and 10 for the precise requirements. This lower bound allows the learner to have a random stopping time and concerns its expected stopping time, so it applies to our Corollary 6.2 which has a deterministic stopping time. Some prior algorithms discussed below use random stopping times and only bound them with high probability, but such results can be easily converted to algorithms with deterministic stopping times by simply terminating the algorithm once the budget from its proven complexity guarantee is reached.
Next we compare with other sample complexity bounds for (ε,δ)-PAC best-policy identification, measuring episodes and assuming rewards are in [0, 1]. Throughout we abbreviate L1=log(eSAH/δ), L2=log(eSAH2L1/ε). The BPI-UCRL algorithm of Kaufmann et al. [2021] has a suboptimal outer H4 horizon dependence rather than H3. The BPI-UCBVI algorithm of Menard et al. [2021] give a sample complexity bound for sufficiently small ε of O(ε2H3SAL1L22). After expanding the hidden logarithmic factors, to the best of our knowledge the ORLC algorithm of Dann et al. [2019] yields a PAC sample complexity bound of O((ε2H3SA+εH5S2A)L2(L1+logL2)). After augmenting the state space with a time index to apply the time-homogeneous results of Lee and Oh [2025] to our inhomogenous setting, their EQ0-based method achieves a PAC complexity bound of O(ε2H3SAL1L2+εH3S2A(L1+logL2)L2). In summary, the best sample complexity guarantees for best-policy identification still suffer from a gap of multiplicative logarithmic factors relative to the minimax lower bound.
Additionally, the aforementioned regret-to-PAC conversions [Kaufmann et al., 2021] could be applied to any algorithms that enjoy suitable sublinear expected regret or high-probability regret bounds, including the nearly minimax-optimal algorithms from Table 1, but such reductions would still retain the suboptimal logarithmic factors. (We note that if there did exist a high-probability regret bound with suboptimal dependence only on 1/δ, then, because the regret-to-PAC reduction of Kaufmann et al. [2021] only requires constant success probability, the algorithm could still be used to obtain an optimal sample complexity for best-policy identification in some regimes. However, to the best of our knowledge even for δ1=O(1) all previous work still contains suboptimal logarithmic factors in S, A, H, or K, so this is not possible from existing guarantees.) Of particular interest is the result of Zhang et al. [2025], because despite the suboptimal multiplicative logarithmic factors in its leading order K regret term, it does not suffer from additional additive “burn-in” regret terms, and so combining with the regret-to-PAC conversion of Kaufmann et al. [2021] would yield a best-policy identification sample complexity of O(ε2H3SALδ(log(eSAH/ε))5+ε2H2Lδ2) (recall Lδ=log(2/δ)), which can be superior to our Corollary 6.2 in regimes of sufficiently large ε.
Wagenmaker et al. [2022] and Tirinzoni et al. [2023] study instance-dependent complexity of best-policy identification, with dependencies on suboptimality gaps and state visitation probabilities, rather than the minimax complexity for fixed S,A,H,ε,δ. Kone and Jamieson [2026] study the complexity of exact identification of an optimal policy in the regime of small δ.
D.2 Algorithm and Proof of Corollary 6.2
Next we present the algorithm which is the subject of Corollary 6.2, as well as the proof. In Algorithm 2, C,C′ are absolute constants which are defined in the proof below in terms of the constants for which the regret bound in Theorem 6.1 holds.
Independently run K0 episodes of Algorithm 1, generating policies π(i),1,…,π(i),K0
Independently sample Ji∼Uniform{1,…,K0} and let πˉ(i)=π(i),Ji
end
for i=1,…,m do
// estimate the value of policy πˉ(i)
Follow policy πˉ(i) for M episodes and record cumulative returns within each episode
Ri,1,…,Ri,M
Vi←M1∑j=1MRi,j
end
Let I∈argmaxiVi and return πˉ(I)
Algorithm 2 has two phases. First it generates m candidate policies πˉ(1),…,πˉ(m). For each i∈[m] this is done by running K0 episodes of Algorithm 1, where K0 is chosen so that the expected average regret over K0 episodes is at most ε/6. As shown in the proof, this implies via Markov's inequality that if we sample an episode Ji uniformly at random from [K0] and use the policy π(i),Ji from that episode, then π(i),Ji (which is the definition of πˉ(i)) will be ε/3-optimal with constant probability.
The success probability is then amplified by estimating the value of all m=O(log2(2/δ)) policies and choosing the (estimated) best one. This amplification step is standard and is basically identical to [Kaufmann et al., 2021, Proposition 12], but we provide the short argument for completeness.
Lemma D.1. Let X>1. If K≥e4X(log(e4X))4, then (logK)4K≥X.
Proof. Define the function g(x)=(logx)4x. This function is non-decreasing on [e4,∞) because
g′(x)=(logx)41(1−logx4)≥0.
Letting x0=e4X(log(e4X))4≥e4, since x0≥e4 it suffices to show that g(x0)≥X, because then for all K≥x0 we have
where the penultimate implication is by Lemma D.1, and the final implication is by choosing a sufficiently large constant C4. Hence as long as K≥C4H3S3A(log(eHSA))4, we have
E[Reg(K)]≤2C1H3SAK=C3H3SAK
where C3=4C1
Next, for any i∈[m], the expected suboptimality of the candidate policy πˉ(i)=π(i),Ji is bounded as
Here the first equality is because the conditional expectation (on the transitions used in forming the policies π(i),1,…,π(i),K0) of V1πˉ(i)(μ) is equal to K01∑k=1K0V1π(i),k(μ). The second equality uses the fact that each π(i),k is chosen before s1k is sampled from μ, so E[V1⋆(μ)−V1π(i),k(μ)]=E[V1⋆(s1k)−V1π(i),k(s1k)]. By Markov's inequality (since V1⋆(μ)−V1πˉ(i)(μ)≥0 almost surely),
where the final inequality holds if K0≥ε236C3SAH3, which is clearly true for the choice
K0=⌈ε236C3SAH3+C4H3S3A(log(eHSA))4⌉,
and so we let C=36C3 and C′=C4.
Consequently, applying this fact to the πˉ(1),…,πˉ(m) generated by Algorithm 2, and noting their independence, we can bound the probability of all these policies being ε/3-suboptimal as
P(∀i,V1⋆(μ)−V1πˉ(i)(μ)≥3ε)≤2−m≤2δ.
Letting I⋆∈argmaxiV1πˉ(i)(μ), we consequently have
P(V1πˉ(I∗)(μ)≥V1⋆(μ)−3ε)≥1−2δ.
For each fixed i∈[m],j∈[M], letting D be the sigma-algebra generated by the candidate policies πˉ(1),…,πˉ(m), since E[Ri,j∣D]=V1πˉ(i)(μ) and 0≤Ri,j≤H almost surely, by (conditional) Hoeffding's inequality (using conditional independence from the data used to construct the πˉ(i)) and the union bound we have that
P(∀i,Vi−V1πˉ(i)(μ)≤3ε)≥1−2δ
by the choice of M=2ε29H2log(4m/δ).
On the intersection of both of the above good events, which has probability at least 1−δ, we have that
Finally, we note that for all δ∈(0,1), from the standard bound log(2/δ)≤δ2−1 we have that log(2/δ)≤δ2, so M=O(ε2H2log(2/δ)). The bound on the number of episodes is thus mK0+mM≤O(ε2H3SALδ+ε2H2Lδ2+H3S3A(log(eHSA))4Lδ) where Lδ=log(2/δ).