<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Feasible $Q$-Learning for Average Reward Reinforcement Learning</title></titleStmt>
			<publicationStmt>
				<publisher>Proceedings of The 27th International Conference on Artificial Intelligence and Statistics, PMLR</publisher>
				<date>05/04/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10528569</idno>
					<idno type="doi"></idno>
					
					<author>Jin Ying</author><author>Gummadi Ramki</author><author>Zhengyuan Zhou</author><author>Jose Blanchet</author><author>Sanjoy Dasgupta</author><author>Stephan Mandt</author><author>Yingzhen Li</author><author>Proceedings_of_Machine_Learning_Research</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Average reward reinforcement learning (RL) provides a suitable framework for capturing the objective (i.e. long-run average reward) for continuing tasks, where there is often no natural way to identify a discount factor. However, existing average reward RL algorithms with sample complexity guarantees are not feasible, as they take as input the (unknown) mixing time of the Markov decision process (MDP). In this paper, we make initial progress towards addressing this open problem. We design a feasible average-reward $Q$-learning framework that requires no knowledge of any problem parameter as input. Our framework is based on discounted $Q$-learning, while we dynamically adapt the discount factor (and hence the effective horizon) to progressively approximate the average reward. In the synchronous setting, we solve three tasks: (i) learn a policy that is $\epsilon$-close to optimal, (ii) estimate optimal average reward with $\epsilon$-accuracy, and (iii) estimate the bias function (similar to $Q$-function in discounted case) with $\epsilon$-accuracy. We show that with carefully designed adaptation schemes, (i) can be achieved with $\tilde{O}(\frac{SA t_{\mathrm{mix}}^{8}}{\epsilon^{8}})$ samples, (ii) with $\tilde{O}(\frac{SA t_{\mathrm{mix}}^5}{\epsilon^5})$ samples, and (iii) with $\tilde{O}(\frac{SA B}{\epsilon^9})$ samples, where $t_\mathrm{mix}$ is the mixing time, and $B &gt; 0$ is an MDP-dependent constant. To our knowledge, we provide the first finite-sample guarantees that are polynomial in $S, A, t_{\mathrm{mix}}, \epsilon$ for a feasible variant of $Q$-learning. That said, the sample complexity bounds have tremendous room for improvement, which we leave for the community’s best minds. Preliminary simulations verify that our framework is effective without prior knowledge of parameters as input.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Reinforcement learning (RL) has achieved remarkable success in simulated environments such as beating world human champions in playing poker, chess and Go <ref type="bibr">(Brown and Sandholm, 2018;</ref><ref type="bibr">Schrittwieser et al., 2020;</ref><ref type="bibr">Silver et al., 2018;</ref><ref type="bibr">Mnih et al., 2015;</ref><ref type="bibr">Schaeffer et al., 1992;</ref><ref type="bibr">Campbell et al., 2002)</ref>. Such empirical successes-and the excitements generated therefromhave motivated a remarkably fruitful line of research on the sample complexity of various RL algorithms, which characterizes how many samples (from a generative model such as a simulator) are needed to obtain an &#1013;-optimal policy.</p><p>Regarding sample complexity, an important setting is the discounted infinite-horizon RL, where the goal is to maximize the (infinite) sum of all future &#947;-discounted rewards for a given factor 0 &lt; &#947; &lt; 1. Broadly speaking, there are (at least) two main classes of methods to tackle the problem: model-based methods and model-free methods. Model-free algorithms learn to select actions without model estimation. Compared with model-based ones <ref type="bibr">(Azar et al., 2013;</ref><ref type="bibr">Sidford et al., 2018b,a;</ref><ref type="bibr">Wang, 2020;</ref><ref type="bibr">Agarwal et al., 2020)</ref>, they are often more computationally efficient, have less storage overhead, and are easy to generalize to RL with function approximation <ref type="bibr">(Sutton and Barto, 2018;</ref><ref type="bibr">Fran&#231;ois-Lavet et al., 2018)</ref>. In particular, Q-learning <ref type="bibr">(Watkins and Dayan, 1992)</ref>, as the prototypical model-free algorithm, has been studied<ref type="foot">foot_1</ref> extensively in discounted infinite-horizon RL <ref type="bibr">(Kearns and Singh, 1999;</ref><ref type="bibr">Even-Dar et al., 2003;</ref><ref type="bibr">Beck and Srikant, 2012;</ref><ref type="bibr">Wainwright, 2019a;</ref><ref type="bibr">Chen et al., 2020;</ref><ref type="bibr">Li et al., 2021)</ref>.</p><p>Such remarkable research efforts notwithstanding, average-reward infinite-horizon RL remains far from being resolved: As recognized by the RL community <ref type="bibr">(Sutton and Barto, 2018;</ref><ref type="bibr">Wan et al., 2021;</ref><ref type="bibr">Mahadevan, 1996;</ref><ref type="bibr">Dewanto et al., 2020)</ref>, average reward RL, which provides a more natural objective for many continuing tasks, is a much more challenging problem and has remained largely under-explored. The sparsity of theoretical understanding also limits the implementation. Indeed, discount factors are often used in practical instantiations of RL algorithms, even when the final objective of interest is clearly the average undiscounted reward in the long term. This is partly due to the fact that algorithms to directly optimize average reward are much more challenging to characterize than the discounted ones. As a result, popular RL algorithms make an ad-hoc choice of a fixed discount factor that are only partially understood <ref type="bibr">(Tang et al., 2021)</ref>. However, many RL applications do not have a natural discount factor that can be endogenously identified.</p><p>Classical results <ref type="bibr">(Blackwell, 1962;</ref><ref type="bibr">Mahadevan, 1996)</ref> connect the discounted and average reward formulations via fundamental relations between optimal value functions asymptotically, yet there is only limited finite-sample guarantees related to algorithmic transfer between the two frameworks, given the ubiquitous practice of implementing the former to solve the latter. Recent works leverage similar relations to devise algorithms that optimizes the &#947;-discounted reward to approximate optimal average reward for a carefully designed, fixed &#947; <ref type="bibr">(Jin and</ref><ref type="bibr">Sidford, 2020, 2021)</ref>. However, these (model-based) algorithms that have finitesample guarantees all require knowing the mixing time t mix and are hence infeasible. In parallel, finite-sample guarantees for model-free methods (sometimes called R-learning, see Section 1.1) for average reward are even more scarce; the only one we know of is very recent <ref type="bibr">(Zhang et al., 2021)</ref>, and the algorithm therein also relies on unknown parameters as input. As such, and in light of the merits of model-free RL algorithms mentioned before, we are naturally led to the open question:</p><p>Can we design a feasible model-free averagereward RL algorithm with finite-sample guarantees for the sample complexity?</p><p>In this paper, we provide new theoretical results that highlight an important algorithmic role for the discounted formulation as a subroutine in solving several learning tasks in the average reward scenario. In contrast to the typical use of a fixed discount factor, we highlight the importance of a carefully selected schedule for progressively finer discount factors to ob-tain a solution to the average reward objective. Our high-level idea is in concordance with <ref type="bibr">Hordijk and Tijms (1975)</ref> which provides an asymptotic analysis for such paradigm when planning with knowledge of the MDP; in contrast, we provide finite-sample analysis for a learning problem, which requires judiciously chosen schemes of both discount factors and learning rates to tackle random data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Related Work</head><p>We include more detailed discussion of related work in this part, extending Section 1.2 in the main text.</p><p>Model-based average-reward RL. <ref type="bibr">(Kearns and Singh, 2002</ref>) is an early work on average-reward RL that proposes a model-based learning algorithm and establishes a sample complexity bound of O( S 5 poly(A)t 5 mix &#1013; 6</p><p>), where poly(A) is an unspecified polynomial of A. From an algorithmic standpoint, an important issue of the algorithm is that it requires the knowledge of both t mix and the optimal average reward<ref type="foot">foot_2</ref> . More recently, several different model-based average reward RL algorithms have been proposed <ref type="bibr">Wang (2017)</ref>; Zhang and Xie (2023); <ref type="bibr">Jin and</ref><ref type="bibr">Sidford (2020, 2021)</ref>, with the latter two achieving state-of-the-art sample-complexity bounds of O(</p><p>) and O( SAtmix &#1013; 3</p><p>), respectively. All three algorithms rely on knowing t mix or similar quantities. <ref type="bibr">Jin and Sidford (2021)</ref> further provides a lower bound of O( SAtmix &#1013; 2</p><p>) for average-reward RL when t mix is known. Consequently, while having the pleasing optimal dependence on SA, a minimax optimal algorithm for average-reward RL is not yet known even under known t mix , an impractical assumption to begin with.</p><p>Model-free average-reward RL. More recently, driven by the merits of model-free algorithms, <ref type="bibr">Zhang et al. (2021)</ref> provides the very first finite-sample analysis of a average reward Q-learning variant, yielding a sample complexity bound of O( SAJ 3</p><p>(1-&#948;) 5 &#1013; 2 ), where J and &#948; are two unknown MDP-dependent constants that may arbitrarily depend on t mix . This pioneering bound itself is valuable in light of the difficulty in characterizing finite-sample guarantees of Q-learning algorithms for average reward RL. However, the issue is that <ref type="bibr">Zhang et al. (2021)</ref> assumes J and &#948; are known and given, rendering the algorithm infeasible.</p><p>Feasible average-reward RL with asymptotic guarantees. The only feasible average-reward Qlearning (sometimes also called R-learning) variants that we know of are <ref type="bibr">Wan et al. (2021)</ref>; <ref type="bibr">Abounadi et al. (2001)</ref>, which attempt to directly learn the Q-values (called bias function in average-reward RL) associated with the Bellman equation for average reward MDP (discussed in more detail in Section 2). However, for both algorithms, only asymptotic consistency is established. It is largely unclear whether finite-sample sample complexity bounds can be established for Rlearning algorithms, since the underlying update is not a contraction. Remotely related is <ref type="bibr">Hordijk and Tijms (1975)</ref>, which shares a similar spirit as our methods for gradually adjusting discount factors to approximate average reward; however, it requires the exact knowledge of the MDP and hence solves a planning -rather than learning -problem (see the next subsection for more details), and only provide asymptotic analysis.</p><p>Other metrics for average-reward RL. Finally, we mention in passing that the literature has also studied other metrics such as regret <ref type="bibr">Jaksch et al. (2010)</ref>; <ref type="bibr">Jin et al. (2018)</ref>; <ref type="bibr">Dong et al. (2019)</ref>; <ref type="bibr">Fruit et al. (2020)</ref>; <ref type="bibr">Dong et al. (2021)</ref>; <ref type="bibr">Wei et al. (2020)</ref>, which is not the focus here. While there are online-to-batch tricks to turn regrets to sample complexity (e.g., via a randomly sample from history of policies), they can not tell which policy is &#1013;-close to optimal; this deviates from our goal of designing a practically feasible algorithm and analyzing its sample complexity. Instead, we focus on algorithms with a deterministic output given data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2">Our Contributions and Related Work</head><p>First, we design a feasible average-reward Q-learning algorithmic framework that requires no knowledge of any problem parameter. In contrast to the aforementioned Q-learning variants for average-reward RL <ref type="bibr">Wan et al. (2021)</ref>; <ref type="bibr">Abounadi et al. (2001)</ref>; <ref type="bibr">Zhang et al. (2021)</ref> that all aim to directly learn the bias function (which determines the optimal policy; see Section 2) in the average-reward Bellman equation, our algorithmic framework uses discounted Q-learning but dynamically adjusts the discount factor towards 1 -and hence gradually enlarging the effective horizon -to yield progressively finer approximations of the average-reward setting. This idea is quite simple and intuitive; however, the challenge lies in designing the specific horizon adaptation scheme (involving the simultaneous adjustment of learning rate and discount factor; see Algorithm 1) such that the finite-sample analysis goes through. Note that unlike in the discounted setting with a fixed &#947;, we now have a "moving target" problem as the discount factor is constantly shifting and weaker contraction, thereby making the analysis much more difficult. On this note, an early work back to 1970s <ref type="bibr">Hordijk and Tijms (1975)</ref> shares a similar idea of adjusting discount factors; however, it only provides asymptotic guarantees (and does so without any specific adaptation scheme); further, it requires the exact knowledge of the MDP and hence solves a planning problem.</p><p>Second, we offer two concrete instantiations of our framework under (distinct) judiciously chosen adaptation schemes. Using the first scheme, stopping our algorithm at any iteration T yields a policy whose average reward differs from the optimal by at most O(t mix /T 1/8 ). Under the synchronous setting we consider (see Section 2), it translates to a sample complexity bound of O(SAt 8 mix /&#1013; 8 ). Furthermore, if the goal is to simply estimate the optimal average reward, then we can do so at a faster rate by our second scheme: stopping at any iteration T yields an estimation accuracy of O(t mix /T 1/<ref type="foot">foot_3</ref> ), which translates to a sample complexity of O(SAt 5 mix /&#1013; 5 ). These results also indicate that our algorithm is any time: we do not need to know T beforehand when running the algorithm 5 . To the best of our knowledge, these are the first finitesample guarantees for a feasible Q-learning algorithm. That said, we believe these bounds can be improved; and we view our results as an open invitation for further progress in feasible average-reward RL.</p><p>Additionally, although not the main focus here, we also extend our algorithmic framework to estimate the bias function in the average-reward MDP Bellman equation (Section 5). As mentioned before, existing average-reward Q-learning algorithms Wan et al. Finally, through preliminary simulations, we verify that our algorithm learns the near-optimal policy with satisfactory convergence, and performs well across MDPs with various values of mixing time without the need of any prior knowledge of the mixing time.</p><p>We consider an infinite-horizon tabular MDP M = (S, A, P, r), with finite state space S = {1, . . . , S}, finite action space A = {1, . . . , A}, transition probability P : S &#215; A &#8594; &#8710;(S) (i.e., P (s &#8242; | s, a) is the probability of transiting to s &#8242; from a state-action pair (s, a) &#8712; S &#215; A), and reward function r : S &#215; A &#8594; [0, 1] (i.e., r(s, a) is the immediate reward at state s &#8712; S if action a &#8712; A is taken). We let &#960; : S &#8594; &#8710;(A) denote a policy, i.e., &#960;(a | s) is the probability of taking a at state s. When &#960; is a deterministic policy, &#960;(s) denotes the action chosen at state s. Learning objective. Given a policy &#960;, we define its long-term average reward as</p><p>Here E &#960; denotes the expectation over the trajectory {(s k , a k )} k&#8805;0 of the MDP under policy &#960;. Under sufficient generality<ref type="foot">foot_4</ref> , the standard MDP theory <ref type="bibr">(Puterman, 2014)</ref> shows that for any policy &#960;, there exists a constant J &#960; &#8712; [0, 1] such that V &#960; (s) = J &#960; for all s &#8712; S. The long-term average reward of &#960; initialized at any state-action pair also equals J &#960; , that is,</p><p>a for all (s, a) &#8712; S &#215; A. We use J &#960; &#8712; [0, 1] to denote the average reward of policy &#960;.</p><p>The optimal policy &#960; * for average reward attains J &#960; * = max &#960; J &#960; , and we denote J * = J &#960; * . Furthermore, there exists a function q * : S &#215;A &#8594; R so that the following Bellman equation holds for all (s, a) &#8712; S &#215;A:</p><p>where v * (s &#8242; ) = max a &#8242; &#8712;A q * (s &#8242; , a &#8242; ) for all s &#8242; &#8712; S. The optimal policy &#960; * is greedy w.r.t. q * , i.e., &#960; * (s) = argmax a&#8712;A q * (s, a) for all s &#8712; S. The solution (q * , v * ) to ( <ref type="formula">1</ref>) is unique up to a constant; one solution is</p><p>where v * and q * are called the value bias function and q-value bias function respectively <ref type="bibr">(Puterman, 2014)</ref>.</p><p>In this work, we will consider three tasks: (1) learning the optimal reward J * up to &#1013;-accuracy, (2) learning a policy whose average reward is &#1013;-close to J * , and (3) learning the bias functions q * and v * up to constants.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Sampling Scheme: Synchronous Setting with a Generative Model</head><p>Throughout this paper, we work under the synchronous scenario with a generative model (or simulator) <ref type="bibr">(Even-Dar et al., 2003)</ref>. That is, we consider algorithms that proceed in multiple iterations.</p><p>In each iteration t, we receive an independent sample s &#8242; &#8764; P (&#8226; | s, a) for all state-action pairs (s, a) &#8712; S &#215; A.</p><p>Despite being relatively simple, it serves as an idealistic sampling protocol that has received much attention for various RL algorithms throughout the RL literature <ref type="bibr">(Kearns et al., 2002;</ref><ref type="bibr">Kakade, 2003;</ref><ref type="bibr">Even-Dar et al., 2003;</ref><ref type="bibr">Azar et al., 2013;</ref><ref type="bibr">Beck and Srikant, 2012;</ref><ref type="bibr">Sidford et al., 2018a,b;</ref><ref type="bibr">Wainwright, 2019a,b;</ref><ref type="bibr">Yang and Wang, 2019;</ref><ref type="bibr">Zanette et al., 2019;</ref><ref type="bibr">Agarwal et al., 2020;</ref><ref type="bibr">Li et al., 2021)</ref>. We focus on this setting as a starting point for studying sample complexity of feasible average-reward RL algorithms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Mixing time and other related notions</head><p>Definition 2.1.</p><p>The mixing time t mix of an MDP is max &#960; min t : max q&#8712;&#8710;(S)</p><p>where d TV (&#181;, &#957;) := 1 2 s&#8712;S |&#181;(s) -&#957;(s)| is the total variation distance, and (P &#960; ) t (q) is the distribution of s t induced by policy &#960; with initial distribution s 0 &#8764; q. We suppose for any policy &#960; there exists a stationary distribution &#957; &#960; &#8712; &#8710;(S); otherwise t mix = &#8734;.</p><p>The notion of mixing time (3) is widely adopted in the literature of average reward MDPs <ref type="bibr">(Wei et al., 2020;</ref><ref type="bibr">Jin and Sidford, 2021)</ref>, and our assumption is standard inthe liteature <ref type="bibr">Wang (2017)</ref>; <ref type="bibr">Jin and Sidford (2020)</ref>. While we adopt such notion to be consistent with the literature, our analysis framework also works under other regularity conditions. Remark 2.2. Our results remain true if the mixing time (3) is replaced by the reward averaging time similar to De Farias and Van Roy (2006); <ref type="bibr">Dong et al. (2021)</ref>; the latter is also closely related to the notion of averaging time considered in <ref type="bibr">Kearns and Singh (2002)</ref>. To be specific, the reward averaging time is de-</p><p>average reward value function of &#960;. Our results carry over to this setting with t mix replaced by &#964; &lt; &#8734; in the upper bound. Remark 2.3. Our framework also applies to weakly communicating MDPs <ref type="bibr">(Wei et al., 2020)</ref>. Define the span of the optimal &#947;-discounted value function as sp</p><p>is the optimal discounted value function with a scaling; the exact definition of V * &#947; is deferred to (4). It is argued in <ref type="bibr">Wei et al. (2020)</ref> that the span is bounded by the diameter of the MDP (Lattimore and <ref type="bibr">Szepesv&#225;ri, 2020)</ref> for weakly-communicating MDPs. Our bound applies to MDPs with bounded spans with t mix replaced by sup &#947;&#8712;(0,1) sp(&#947;).</p><p>3 Algorithm: Dynamic Horizon Q-Learning</p><p>We start with a brief recap on the celebrated Qlearning algorithm for discounted value functions.</p><p>Given any discount factor &#947; &#8712; (0, 1) and any policy &#960;, with rewards r k = r(s k , a k ), we denote the rescaled &#947;-discounted value function and Q-function of &#960; as</p><p>for (s, a) &#8712; S &#215; A. For preparation, we also denote the unscaled &#947;-discounted value and Q-functions of &#960; as</p><p>and the optimal ones as</p><p>The optimal policy for &#947;-discounted reward is de-</p><p>&#947; (s, a). In synchronous setting, the Q-learning algorithm for &#947;-discounted rewards maintains an estimate</p><p>In each iteration t, it updates all entries of the estimate at once, according to</p><p>). Here &#951; t &#8712; (0, 1] is the learning rate or the step size, and T t is the empirical Bellman operator depending on the samples collected in the t-th iteration (with proper scaling):</p><p>where s &#8242; &#8764; P (&#8226; | s, a) is the independent sample collected for (s, a) from the generative model.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Dynamic Horizon Q-Learning Framework</head><p>In the existing works of <ref type="bibr">Wei et al. (2020)</ref>; <ref type="bibr">Jin and Sidford (2021)</ref>, algorithms for the discounted setting are applied with a properly chosen discounted factor &#947; that depends on the known mixing time and a prespecified sample size. Rather distinct from them, we avoid the knowledge of the mixing time and a prespecified sample size by employing a series of dynamic discount factors.</p><p>To be specific, given a sequence of discount factors {&#947; t } t&#8805;1 , we maintain an estimate Q t : S&#215;A &#8594; R in the t-th iteration. In each iteration, the algorithm updates all entries of the Q-function estimate via</p><p>for all state-action pairs (s, a) &#8712; S &#215; A. Here s t (s, a) is the independent sample from the generative model, &#947; t is the discount factor and &#951; t &#8712; (0, 1] is the learning rate in the t-th iteration. Correspondingly, we define the estimate of value function in the t-th iteration as V t (s) := max a&#8712;A Q t (s, a) for all s &#8712; S, and the associated greedy policy as</p><p>so that V t (s) = Q t (s, &#960; t (s)) for all s &#8712; S. The complete algorithm is summarized as follows.</p><p>Algorithm 1 Dynamic Horizon Q-Learning {&#951; t } t&#8805;1 , {&#947; t } t&#8805;1 .Initialization: Q 0 &#8801; 0. for t = 1, 2, . . . do 1: 2: 3: Generate s t (s, a) &#8764; P (&#8226; | s, a) for all (s, a) &#8712; S &#215; A. 4:</p><p>for all s &#8712; S. 6: end for</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Theory for estimating optimal reward</head><p>We provide theoretical guarantee of Algorithm 1 for learning the optimal reward J * as follows. The proof of Theorem 3.1 is sketched in Section 4.1 and 4.2, while detailed in Appendix A.1.</p><p>Theorem 3.1. In Algorithm 1, we set &#951; t = 1 + c1t 3/5 (log t) 3 -1 , &#947; t = 1 -t -1/5 , t &#8805; 2, for some constant c 1 &gt; 0 and set &#951; 1 = &#951; 2 , &#947; 1 = &#947; 2 . Let &#949; &#8712; (0, 1) and &#948; &#8712; (0, 1). Suppose T is sufficiently large such that T / log T &#8805; 300, T 1/5 (log T ) 2 &#8805; 4c 2 , (log T ) 2 &#8805; 12(10 + c 1 ), c 2 T 1/5 &#8805; 24(10 + c 1 )(log T ) 2/5 and T 2/5 &#8805; 64(log T ) 4 9c1 log |S||A|T &#948; for some constant c 2 &gt; 0. . Then with probability at least 1 -&#948;, after T iterations, Algorithm 1 achieves</p><p>T 1/5 simultaneously for all s &#8712; S, where J * &#8712; [0, 1] is the optimal average reward defined in Section 2, and c &gt; 0 is an absolute constant that only depends on c 1 , c 2 .</p><p>We take a moment to discuss the general idea of our learning framework. At a high level, we approximate the ultimate targets (i.e., the optimal average reward J * ) with a sequence of proxies {Q * &#947;t } that our estimates {Q t } eventually converge to. In particular,</p><p>) for all inputs in S &#215; A. The first term in (8) is the approximation error by discounted Q-functions that is controlled as follows (proof in Appendix A.2). Lemma 3.2.</p><p>The second term of ( <ref type="formula">8</ref>) is the estimation error of {Q t } to the dynamic targets {Q * &#947;t }. We provide the sketch of a recursive analysis for this term in Section 4.1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4">Theory for Learning &#1013;-Optimal Policy</head><p>Algorithm 1 can be adapted to learn a policy whose average reward is &#1013;-close to optimal. The idea is still to take the greedy policy from our estimate Q t . However, due to the subtlety between Q-function approximation and the value of the greedy policy, we need another adaptation scheme of {&#947; t } and {&#951; t }. A partial proof sketch of Theorem 3.3 is in Section 4.1; the detailed proof is in Appendix B. Theorem 3.3. In Algorithm 1, we set &#951; t = 1 + c1t 5/8 (log t) 2 -1 , &#947; t = 1 -t -1/8 , t &#8805; 2 for some constant c 1 &gt; 0 and set &#951; 1 = &#951; 2 , &#947; 1 = &#947; 2 . Let &#960; t be the greedy policy with respect to Q t from Algorithm 1 for all t &#8805; 1. Let &#949; &#8712; (0, 1) and &#948; &#8712; (0, 1). Suppose T is sufficiently large such that (log T ) 2 &#8805; 11(2 + c 1 )/2, T / log T &#8805; 100, c 2 T 1/4 &#8805; 4(2 + c 1 )(log T ) 11/8 and T 5/8 &#8805; 64(log T ) 3 9c1 log |S||A|T &#948; for some constant c 2 &gt; 0.</p><p>Then with probability at least 1 -&#948;, after T iterations, &#960; T in Algorithm 1 satisfies</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Analysis Framework</head><p>We provide the analysis framework for Theorems 3.1 and 3.3. In Section 4.1, we provide a general decomposition of the estimation error; we then give the proof sketch for Theorem 3.1 in Section 4.2. Theorem 3.3 follows similar ideas, with details in Appendix B.</p><p>Notations. Bold letters denote vectors and matrices. For any matrix M , we denote</p><p>For a group of vectors {a i : i &#8712; I}, we denote max i&#8712;I a i as the vector of entrywise maximum, that is, [max i&#8712;I a i ] j = max i&#8712;I [a i ] j , &#8704;j. We use vector r &#8712; R |S||A| to represent reward functions, so that for any (s, a) &#8712; S &#215; A, the (s, a)-th entry of r is given by r(s, a). We represent value and Q-functions in vectors: for example, the s-th entry of V &#960; &#8712; R |S| is given by V &#960; (s); we define</p><p>analogously. We use a matrix P &#8712; R |S||A|&#215;|S| to represent the probability transition kernel P , whose (s, a)-row P s,a represents the vector P (&#8226; | s, a). For any vector V &#8712; R |S| , we define V ar <ref type="bibr">a)</ref>. We also define the square probability transition matrix P &#960; &#8712; R |S||A|&#215;|S||A| (resp. P &#960; &#8712; R |S|&#215;|S| ) induced by a deterministic policy &#960; over the state-action pairs (resp. states) as P &#960; := P &#928; &#960; , P &#960; := &#928; &#960; P , where &#928; &#960; &#8712; {0, 1} |S|&#215;|S||A| is the projection matrix associated with &#960;, whose s-th row consists of |S| blocks each of length |A|, among which the s-th block is e &#8868; &#960;(s) , and e i is the i-th standard basis vector. Given samples s t (s, a) &#8764; P (&#8226; | s, a) collected in the t-th iteration, we define the empirical transition matrix P t &#8712; {0, 1} |S||A|&#215;|S| by P t (s, a), s &#8242; = 1{s &#8242; = s t (s, a)}.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Framework of Analysis for Algorithm 1</head><p>In this section, we provide a sketch of analysis for Algorithm 1. To begin with, we denote &#8710; t = Q t -Q * &#947;t , which is the estimation error of Q t for the rescaled optimal Q-function with &#947; t in the t-th iteration. Our updating rule (6) in the t-th iteration admits the representation:</p><p>&#947;t (note the rescaling of the value and Qfunctions compared to conventional notations),</p><p>The decomposition ( <ref type="formula">9</ref>) is similar to what appears in the standard analysis of discounted Q-learning updates, such as <ref type="bibr">Li et al. (2021)</ref>; <ref type="bibr">Wainwright (2019b)</ref>; however, we note a few key technical challenges due to a dynamic discount factor and a moving target Q * &#947;t , which require considerably more efforts and techniques to address.</p><p>(1) First, due to the dynamic discount factor &#947; t &#8594; 1, the contraction of ( <ref type="formula">9</ref>) is much weaker than that with a fixed discount factor, so that the last term &#951; t &#947; t P t V t-1 -P V * &#947;t is much more difficult to control. As a result, &#947; t cannot converge to 1 too fast.</p><p>(2) Due to the moving target Q * &#947;t , there is a bias (1 -</p><p>. It is large if &#947; t converges to 1 too quickly or if &#951; t is too small. A similar bias occurs in &#951; t &#947; t P t V t-1 -P V * &#947;t . In light of (1) and ( <ref type="formula">2</ref>) and the bias in Lemma 3.2 (large if &#947; t converges to 1 too slowly), we need a careful choice of &#947; t to balance different sources of bias.</p><p>(3) Similar to the discounted setting, the learning rate &#951; t needs to balance the bias from earlier updates and variance from recent updates. Moreover, as &#951; t is coupled with &#947; t in the third term, we have to admit a less aggressive learning rate due to additionally balancing the bias&amp;variance in random update with &#951; t and the bias from &#947; t .</p><p>To summarize, in sharp distinction from the discounted Q-learning, we need to address the bias due to &#947; t &#8594; 1 in conjunction with the statistical error in random learning update. As a result, our dynamic Qlearning algorithm typically yield slower convergence compared with the discounted counterpart.</p><p>Our analysis partially builds on the recent progress in sharp analysis for discounted Q-learning <ref type="bibr">Li et al. (2021)</ref>. However, we additionally tackle the bias due to &#947; t &#824; = &#947; t-1 , which leads to distinct analysis. The last term in the bracket in (9) can be further decomposed as</p><p>where</p><p>Above two inequalities use the fact that P * &#947;t-1 is greedy w.r.t. Q * &#947;t-1 , while &#960; t-1 is greedy w.r.t. Q t-1 . Plugging them back into (9) leads to</p><p>where we define the switching error in the t-th iteration</p><p>Applying (11a) and (11b) recursively, we arrive at</p><p>where we define &#951;</p><p>We now proceed to bound (12). Let &#946; &#8712; (0, 1) be a constant whose value will be specified later. Writing</p><p>where</p><p>The convergence rates for these quantities then depend on the choice of {&#951; t } and {&#947; t }, which we analyze in a case-by-case fashion for all our theoretical results.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Sketch of Analysis for Theorem 3.1</head><p>As an example of our analysis, we now bound the terms &#948; t , &#950; t and &#958; t in the decomposition (13), which leads to a recursive bound on &#8710; t for Theorem 3.1. To begin with, for the constant c 2 &gt; 0 in Theorem 3.1, we set</p><p>The lemmas throughout this subsection will be under the same conditions as Theorem 3.1.</p><p>Bounding switching error. First, the dynamic discount factors leads to the switching error &#948; t , since the estimation targets Q * &#947;t keeps moving. Lemma 4.1. Let T satisfy the conditions of Theorem 3.1. Then &#8741;&#948; t &#8741; &#8734; &#8804; 2( log T T ) 2/5 for all t obeying T / log T &#8804; t &#8804; T .</p><p>Bounding &#950; t . The second term &#950; t is the cumulative estimation error up to t &#946; = &#8970;(1 -&#946;)t&#8971;. It can be bounded via appropriate contraction with appropriate choices of t &#946; . We bound its &#8467; &#8734; -norm as follows. The proof of Lemma 4.2 is in Appendix A.5. Lemma 4.2. Let T satisfy the conditions of Theorem 3.1. Then &#8741;&#950; t &#8741; &#8734; &#8804; 2</p><p>T for all T / log T &#8804; t &#8804; T .</p><p>Bounding &#958; t . Finally, &#958; t is a random error term, for which we derive a high-probability bound, adapting the sharp analysis strategies introduced in Li et al. ( <ref type="formula">2021</ref>). The proof of Lemma 4.3 is in Appendix A.6. Lemma 4.3. For any fixed t obeying T / log T &#8804; t &#8804; T , it holds with probability at least 1 -&#948; that</p><p>A recursive bound. With the above three bounds in place, we put them together and obtain a recursive bound on &#8710; t , whose detailed proof is in Appendix A.3. Proposition 4.4. Under the conditions in Theorem 3.1, with probability at least 1 -&#948;,</p><p>The techniques of Proposition 4.4 are related to <ref type="bibr">Li et al. (2021)</ref>, but controlling multiple sources of bias and variance relies on quite different ideas.</p><p>A similar lower bound is in Proposition 4.5, whose proof is essentially the same as that of Proposition 4.4 hence omitted here.</p><p>Proposition 4.5. Suppose T satisfies the conditions in Theorem 3.1. Then with probability at least 1 -&#948;,</p><p>holds simultaneously for all t obeying 3T 2 log T &#8804; t &#8804; T , where c 3 &gt; 0 is a constant that only depends on c 1 , c 2 .</p><p>Finally, solving the recursive bounds proves Theorem 3.1; see Appendix A.1 for details.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Extension to Learning Bias Function</head><p>We now propose a variant of our framework that learns (up to a constant) q * (s, a) in (1) hence the optimal policy for average reward. In particular, our approach overcomes the non-contraction of the empirical Bellman updates that are often considered in the literature <ref type="bibr">(Abounadi et al., 2001;</ref><ref type="bibr">Zhang et al., 2021)</ref>, enabling finite-sample analysis of convergence to solutions to (1).</p><p>Our new algorithm maintains an estimate q t : S &#215;A &#8594; R for all t &#8805; 1; in each iteration t, it updates all entries of the estimate for all (s, a) &#8712; S &#215; A via q t (s, a) = (1 -&#952; t )q t-1 (s, a)</p><p>Here s t (s, a) is the independent sample from the generative model, and &#945; t and &#952; t are the discount factor and learning rate in the t-th iteration, respectively. In addition, we define the value function v t : S &#8594; R in the t-th iteration by v t (s) := max a&#8712;A q t (s, a) for all s &#8712; S. See Algorithm 2 for a formal statement.</p><p>Algorithm 2 Dynamic Horizon q-Learning {&#952; t } t&#8805;1 , {&#945; t } t&#8805;0 .Initialization:</p><p>) for all (s, a) &#8712; S &#215; A.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>5:</head><p>Set v t = max a&#8712;A q t (s, a) for all s &#8712; S.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>6: end for</head><p>The distinction between this procedure and Algorithm 1 is that we use r(s, a) instead of (1-&#945; t )r(s, a) in the update. As a result, our estimates approximate another set of dynamic targets: the unscaled discounted value functions {q * &#945;t } and {v * &#945;t } (c.f. ( <ref type="formula">5</ref>)), which further approximate solutions to (1).</p><p>Lemma 5.1. There exists a constant B &gt; 0 which only depends on the underlying MDP such that</p><p>for all state-action pairs (s, a) &#8712; S &#215; A, where J * is the optimal average reward, q * &#945; and v * &#945; are the unscaled optimal &#945;-discounted Q-(value) functions, and q * and v * are the bias functions defined in (2).</p><p>The proof of Lemma 5.1 is in Appendix D.2. Thus,</p><p>where, similar to the previous case, it remains to control the estimation error to the dynamic targets.</p><p>Theorem 5.2. In Algorithm 2, we set</p><p>Then with probability at least 1 -&#948;, after T iterations, Algorithm 2 achieves</p><p>simultaneously for all (s, a) &#8712; S &#215;A, where c &gt; 0 is an absolute constant that only depends on c 1 , c 2 , B is the constant given in Lemma 5.1, q * and v * are the bias functions defined in (2). See Appendix C.1 for a sketch of analysis, and Appendix C.2 for a detailed proof.</p><p>With the bias function estimator q T , a natural idea for the task of policy learning is to take the greedy policy with respect to q T :</p><p>Its suboptimality from the true optimal reward turns out to be of the same scale as the estimation error bound of q T . We thus have its near-optimality property. The proof of Corollary 5.3 is in Appendix C.3.</p><p>Corollary 5.3. Under the same conditions of Theorem 5.2, the greedy policy &#960; T with respect to q T obeys</p><p>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Empirical Validation</head><p>We support our theoretical results with preliminary simulations. We design MDPs with |S| = 10 and |A| = 8 according to the construction in <ref type="bibr">Jin and Sidford (2021)</ref>, which is the hardest instance (in the sense of information-theoretic lower bound) for learning a policy. We vary the mixing time t mix &#8712; {O(10), O(100), O(1000)}, which is obtained by tuning the parameter &#947; &#8712; {0.1, 0.01, 0.001} in <ref type="bibr">Jin and Sidford (2021)</ref>. On each MDP instance, we run our algorithm for Theorem 3.3 in 200 independent experiments for T = 10 7 . We keep the same scheduling of &#947; t = 1 -t -1/8 and &#951; t = (1 + t 5/8 (log t) 2 ) -1 for all instances, without adjusting algorithm inputs using any prior knowledge.</p><p>We compute the frequency where the algorithm finds the optimal action for each state at t &#8712; {10, 10 2 , . . . , 10 6 , 10 7 } in Figure <ref type="figure">1</ref> (for the first 4 states for visualization). The results suggest that our algorithm performs stably well, finding the optimal policy within a reasonable time of training (which might be better than what is predicted by our theory). As promised, it does not need any prior information as input, but works well for MDPs with different t mix . Interestingly, the recovery frequency turns out to be relatively stable across different values of t mix .</p><p>1-1/t_mix = 0.9 1-1/t_mix = 0.99 1-1/t_mix = 0.999 <ref type="table">1 2 3 4 5 6 7  1 2 3 4 5 6 7  1 2 3 4 5 6</ref>  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Conclusions</head><p>In this paper, we provide a feasible framework for average-reward RL that, distinct from existing works, does not require any problem-dependent parameters as input. Our results highlight the algorithmic role of sequentially adjusted discounted factors, along with a carefully selected adaptation scheme, in achieving several average reward learning objectives. We provide finite-sample guarantees for three popular learning tasks. We envision this work as initial progress towards algorithmic design and theoretical understanding of feasible model-free average-reward RL, and an invitation for subsequent efforts in these aspects.</p><p>Zanette, A., Kochenderfer, M. J., and Brunskill, E. (2019). Almost horizon-free structure-aware best policy identification with a generative model. Advances in Neural Information Processing Systems, 32. Zhang, S., Zhang, Z., and Maguluri, S. T. (2021). Finite sample analysis of average-reward td learning and q-learning. Advances in Neural Information Processing Systems, 34. Zhang, Z. and Ji, X. (2019). Regret minimization for reinforcement learning by evaluating the optimal bias function. Advances in Neural Information Processing Systems, 32. Zhang, Z. and Xie, Q. (2023). Sharper model-free reinforcement learning for average-reward markov decision processes. In The Thirty Sixth Annual Conference on Learning Theory, pages 5476-5477. PMLR. Checklist 1. For all models and algorithms presented, check if you include: (a) A clear description of the mathematical setting, assumptions, algorithm, and/or model. [Yes] (b) An analysis of the properties and complexity (time, space, sample size) of any algorithm. [Yes] (c) (Optional) Anonymized source code, with specification of all dependencies, including external libraries. [Not Applicable] 2. For any theoretical claim, check if you include: (a) Statements of the full set of assumptions of all theoretical results. [Yes] (b) Complete proofs of all theoretical results.</p><p>[Yes] (c) Clear explanations of any assumptions. <ref type="bibr">[Yes]</ref> 3. For all figures and tables that present empirical results, check if you include:</p><p>(a) The code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL). [Not Applicable] (Explanation: we will do so when it is possible to de-anonymize the paper.) (b) All the training details (e.g., data splits, hyperparameters, how they were chosen</p><p>). [Yes] (c) A clear definition of the specific measure or statistics and error bars (e.g., with respect to the random seed after running experiments multiple times). [Yes] (d) A description of the computing infrastructure used. (e.g., type of GPUs, internal cluster, or cloud provider). [Not Applicable] 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets, check if you include: (a) Citations of the creator If your work uses existing assets. [Not Applicable] (b) The license information of the assets, if applicable. [Not Applicable] (c) New assets either in the supplemental material or as a URL, if applicable. [Not Applicable] (d) Information about consent from data providers/curators. [Not Applicable] (e) Discussion of sensible content if applicable, e.g., personally identifiable information or offensive content. [Not Applicable] 5. If you used crowdsourcing or conducted research with human subjects, check if you include: (a) The full text of instructions given to participants and screenshots. [Not Applicable] (b) Descriptions of potential participant risks, with links to Institutional Review Board (IRB) approvals if applicable. [Not Applicable] (c) The estimated hourly wage paid to participants and the total amount spent on participant compensation. [Not Applicable]</p><p>A Technical Proofs Regarding Theorem 3.1</p><p>In this section, we provide detailed proofs for results regarding Theorem 3.1. Appendix A.1 provides the detailed proof for Theorem 3.1, and the remaining subsections provide proofs for intermediate results in the analysis sketch of Section 4.</p><p>Throughout the section, the learning rates and discount factors are</p><p>and we choose the proportion</p><p>for the constant c 2 &gt; 0 in Theorem 3.1.</p><p>A.1 Proof of Theorem 3.1 Proof of Theorem 3.1. We solve the recursive bounds in Propositions 4.4 and 4.5 to obtain the final highprobability bound. For any positive integer k, we define</p><p>A naive upper bound is u k &#8804; 1 for all k. Furthermore, by ( <ref type="formula">15</ref>) and the definition of u k , with probability at least 1 -&#948;, it holds simultaneously for all k &#8805; 1 that</p><p>for some absolute constant c 3 &gt; 0. If there exists some k such that</p><p>for some sufficiently large constant c 4 &gt; 0, then</p><p>as well. By induction, the above bound holds for all j &#8805; k, hence</p><p>On the other hand, suppose u j &gt; c 4 ((log T ) -1/5 + 9t mix )</p><p>for any 1 &#8804; j &#8804; k. Then we know</p><p>for some constant c 6 &gt; 0. Recursively applying this relation for 1 &#8804; j &lt; k yields</p><p>where we used the fact that u 0 &#8804; 1. Hence</p><p>Now we can set 2 k &#8805; log T /5, so that the above upper bound translates to</p><p>Combining the two cases above, we arrive at</p><p>with probability at least 1 -&#948; for T obeying the conditions of Proposition 4.4. Furthermore, since t mix &#8805; 1, the above bound translates to</p><p>for some constant c &gt; 0 that only depends on c 1 , c 2 , which completes the proof of Theorem 3.1.</p><p>A.2 Proof of Lemma 3.2</p><p>Proof of Lemma 3.2. For any discounted factor &#947; &#8712; (0, 1), the optimal policy &#960; * &#947; with respect to &#947;-discounted reward attains the optimal Q-function, i.e.,</p><p>Similarly, the optimal policy &#960; * with repsect to average reward satisfies J * = J &#960; * . Applying Lemma D.1 to &#960; * &#947; and &#947; leads to</p><p>for any state-action pair (s, a) &#8712; S &#215; A. On the other hand, applying Lemma D.1 to &#960; * and &#947; leads to</p><p>for any state-action pair (s, a) &#8712; S &#215; A. The last steps of the two equations follow from the bounded reward averaging time for &#960; * &#947; and &#960; * . Combining the two inequalities, we complete the proof of Lemma 3.2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.3 Proof of Proposition 4.4</head><p>Proof of Proposition 4.4. Combining Lemma 4.1, 4.2 and 4.3, for sufficiently larget T obeying the conditions of Theorem 3.1 and any fixed t within T / log T &#8804; t &#8804; T , it holds with probability at least 1 -&#948; that</p><p>where the second inequality follows from the fact that</p><p>for T so large that T / log T &#8805; 300. Once (1 -&#946;) &#8805; 3/4, for any fixed t obeying 3T /(2 log T ) &#8804; t &#8804; T , we apply (18) with a union bound over {k : 2t 3 &#8804; k &#8804; t} -as a result, with probability at least 1 -&#948;, one has</p><p>where we define</p><p>Before proceeding to recursively bound &#8710; t , we define {&#945;</p><p>which, following <ref type="bibr">Li et al. (2021)</ref>, satisfies</p><p>for all t. When T is sufficiently large so that 1 -&#946; &#8805; 2/3, We decompose (19) as</p><p>We recursively apply the above relation in a manner similar to Equation 68 of Li et al. ( <ref type="formula">2021</ref>), yet with a sequence of dynamic discount factor {&#947; t }:</p><p>where the third line uses &#951; <ref type="formula">22</ref>), and the last line uses</p><p>= 1 in ( <ref type="formula">22</ref>). We shall further recursively apply the above relation. To begin with, we set</p><p>We define the index set</p><p>By definition of &#946;, we have</p><p>for sufficiently small c 2 &#8804; log(3/2), which implies</p><p>Recursively invoking (23), we obtain</p><p>where the second line uses</p><p>In the following, we are to bound &#946; 1 and &#946; 2 in (24) separately. The easier term is &#946; 2 : noting that by definition of the discount factor {&#947; t }, we have &#947; j &#8804; &#947; T for all 2t/3 &#8804; j &#8804; T , indicating</p><p>where (i) follows from the bounded magnitude &#8741;&#8710; H &#8741; &#8734; &#8804; 1 and the fact that H h=1 P &#960;i h is a probability transition matrix; (ii) follows from</p><p>Moving on to &#946; 1 , its entrywise square can be upper bounded as</p><p>where (i) follows from Jensen's inequality noting that h k=1 P &#960;i k is a probability transition matrix, (ii) follows from the Cauchy-Schwarz inequality, (iii) follows from the definition of &#966; t in (20), and (iv) follows from the fact that h k=1 P &#960;i k 1 = 1 since h k=1 P &#960;i k is a probability transition matrix. We employ the following lemma to bound the first term of ( <ref type="formula">26</ref>), whose proof is in Appendix D.4.</p><p>Lemma A.1. Suppose T &#8805; 160, then it holds for all T / log T &#8804; t &#8804; T that</p><p>Invoking Lemma A.1, we obtain an upper bound</p><p>Recalling (24), by the upper bound (25) on |&#946; 2 | and (28) on |&#946; 1 |, for any fixed t such that 3T /(2 log T ) &#8804; t &#8804; T ,</p><p>holds with probability at least 1 -&#948;.</p><p>We now further take a union bound for (29) over {t : 3T /(2 log T ) &#8804; t &#8804; T }, which leads to the simultaneous (1 -&#948;) high-probability bound</p><p>. This completes the proof of Proposition 4.4.</p><p>A.4 Proof of Lemma 4.1</p><p>Proof of Lemma 4.1. Employing Lemma D.4, each term d t can be bounded as</p><p>where the second line uses &#8741;AB&#8741; &#8734; &#8804; &#8741;A&#8741; 1 &#8741;B&#8741; &#8734; for matrices A, B, the third line follows from &#8741;P &#8741; 1 = 1 since each row of P is a probability vector. For any t &gt; 1, we let &#945; = t -2/5 &#8712; (0, 1). By the triangular inequality, the switching error can be bounded as</p><p>Firstly, when t obeys &#8970;(1 -&#945;)t&#8971; = &#8970;t -t 2/5 &#8971; &#8805; 150 (which is satisfied by t &#8805; 160), for any i such that</p><p>&#8804; exp -&#945;t(log t) 3 (10 + c 1 )t 3/5 , where (i) follows from (99), and (ii) follows from (100) for j &#8805; &#8970;(1 -&#945;)t&#8971; &#8805; 150. Together with the fact that &#8741;d i &#8741; &#8734; &#8804; 1, the above bound implies</p><p>On the other hand, (30) implies</p><p>for all i &#8805; 1 + &#8970;(1 -&#945;)t&#8971;. The second inequality above is implied by</p><p>where for i &#8805; 2, we use the fact that log(1 -x) &#8805; -2x for x &#8804; log 2/2 and e x &#8805; 1 + x for x &#8712; R. Therefore, noting that &#945; &#8804; 0.2 for t &#8805; 150, we have</p><p>Combining ( <ref type="formula">31</ref>) and ( <ref type="formula">32</ref>), once T / log T &#8805; 160, we have</p><p>for all T / log T &#8804; t &#8804; T , where the third inequality follows from log T &#8805; 2 log log T , and the last inequality follows from (log T ) 3 /(80 + 8c 1 ) &#8805; 7 5 log T . Therefore, we complete the proof of Lemma 4.1.</p><p>A.5 Proof of Lemma 4.2</p><p>Proof of Lemma 4.2. The &#8467; &#8734; -norm of &#950; t can be bounded as</p><p>Here (i) uses &#8741;AB&#8741; &#8734; &#8804; &#8741;A&#8741; 1 &#8741;B&#8741; &#8734; for matrices A, B, and (ii) follows from the fact that &#8741;P i -P &#8741; 1 &#8804; &#8741;P i &#8741; 1 + &#8741;P &#8741; 1 &#8804; 2 and &#8741;P &#960;t-1 &#8741; 1 &#8804; 1 (since they are all probability matrices), and the bounded magnitudes</p><p>By definition of {&#951; t }, as long as &#946; &lt; 1/2 and t &#8805; 300,</p><p>where the second inequality follows from (99), and the last inequality follows from the monotonicity (100).</p><p>Similarly, when &#8970;(1 -&#946;)t&#8971; &#8805; 150 (satisfied as long as &#946; &lt; 1/2 and t &#8805; 300), for any 1</p><p>where the last inequality follows from (100). Combining ( <ref type="formula">33</ref>) and (34), once &#946; &lt; 1/2, we have</p><p>for all t &#8805; 300. Note that when T / log T &#8805; 300, for all t such that T / log T &#8804; t &#8804; T ,</p><p>where the second inequality follows from log T &#8805; 2 log log T . Meanwhile, for T / log</p><p>Therefore, for any T / log T &#8804; t &#8804; log T ,</p><p>if T obeys (satisfied by the conditions of Theorem 3.1)</p><p>T 2/5 log T &#8805; 16(10 + c 1 ) and c 2 T 1/5 &#8805; 24(10 + c 1 )(log T ) 2/5 , which completes the proof of Lemma 4.2.</p><p>Feasible Q-Learning for Average Reward Reinforcement Learning</p><p>A.6 Proof of Lemma 4.3</p><p>Proof of Lemma 4.3. We begin with some basic notations for convenience: write</p><p>Then (entries of) {z i } are martingale differences in the sense that</p><p>We shall obtain high-probability bound on &#8741;&#950; t &#8741; &#8734; via Freedman's inequality in Lemma D.6, for which we compute some basic quantities that would be of use.</p><p>Firstly, when &#8970;(1 -&#946;)t&#8971; &#8805; 150 and 1 -&#946; &#8805; 1/2, max</p><p>where the second inequality follows from &#8741;P i -P &#8741; 1 &#8804; &#8741;P i &#8741; 1 + &#8741;P &#8741; 1 &#8804; 2 and the bounded magnitude &#8741;V i-1 &#8741; &#8734; &#8804; 1, and the third inequality follows from (103).</p><p>We denote the entrywise conditional variance of z i as Var(</p><p>It can be (entrywisely) upper bounded as</p><p>where the last inequality follows from (103) and the fact that</p><p>i &#8804; 1 due to (101). In addition, since &#8741;V i-1 &#8741; &#8734; &#8804; 1, a deterministic upper bound of W t is given by</p><p>To apply Freedman's inequality, we further choose the (smallest) positive integer K such that for some constant c 2 &#8805; 1,</p><p>In view of ( <ref type="formula">36</ref>) and ( <ref type="formula">37</ref>) together with a union bound over all |S||A| entries, Freedman's inequality (Lemma D.6) implies that for any fixed t obeying &#8970;(1 -&#946;)t&#8971; &#8805; 150 and &#946; &lt; 1/2,</p><p>holds with probability at least 1 -&#948;, where the second line follows from the fact that log t/t &#8804; log 2/2 for t &#8805; 4.</p><p>Finally, for any fixed t obeying T / log T &#8804; t &#8804; log T , we have</p><p>The bound in (38) thus translates to</p><p>as long as t additionally satisfies</p><p>To see (39), note that under the conditions of Theorem 3.1, one has T 2/5 &#8805; 64(log</p><p>Var P (V i-1 ) + T -1/5 1 , which completes the proof of Lemma 4.3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Proof of Theorem 3.3</head><p>In this section, we provide the detailed proof of Theorem 3.3. It follows the same idea as that of Theorem 3.1, yet with different analysis on the convergence rates.</p><p>Recall that in Theorem 3.3, we set &#947; t = 1 -t -1/8 and</p><p>, t &#8805; 2 for some constant c 1 &gt; 0 in Algorithm 1. In the following, we are to set</p><p>for the constant c 2 &gt; 0 in Theorem 3.3. In this section, we still use the same notations as in the decomposition of Section 4.1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.1 Bound on the switching error</head><p>Following exactly the same arguments as in the proof of Lemma 4.1, the switching error can be bounded as</p><p>where we choose &#945; = t -3/8 . Firstly, when t obeys &#8970;(1 -&#945;)t&#8971; = &#8970;t -t 5/8 &#8971; &#8805; 50 (satisfied by t &#8805; 100), for any i such that 1 &#8804; i &#8804; &#8970;(1 -&#945;)t&#8971;, we have</p><p>where (i) follows from (105), and (ii) follows from (106) for j &#8805; &#8970;(1 -&#945;)t&#8971; &#8805; 50. Together with the fact that &#8741;d i &#8741; &#8734; &#8804; 1, the above bound implies</p><p>On the other hand, (30) implies</p><p>for all i &#8805; 1 + &#8970;(1 -&#945;)t&#8971;. The second inequality above is implied by</p><p>where for i &#8805; 2, we use the fact that log(1 -x) &#8805; -2x for x &#8804; log 2/2 and e x &#8805; 1 + x for x &#8712; R. Therefore, noting that &#945; &#8804; 0.25 for t &#8805; 150, we have</p><p>Combining ( <ref type="formula">40</ref>) and ( <ref type="formula">41</ref>), once T / log T &#8805; 100, we have</p><p>for all T / log T &#8804; t &#8804; T , where the third inequality follows from log T &#8805; 2 log log T , and the last inequality holds as long as T obeys (log T ) 3 /(8 + 4c 1 ) &#8805; 11 8 log T .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.2 Bounds on &#950; t</head><p>Similar to the proof of Lemma 4.2, the &#8467; &#8734; -norm of &#950; t can be bounded as</p><p>By definition of {&#951; t }, as long as &#946; &lt; 1/2 and t &#8805; 100,</p><p>where the second inequality follows from (105), and the last inequality follows from the monotonicity (106).</p><p>Similarly, when &#8970;(1 -&#946;)t&#8971; &#8805; 50 (which holds as long as &#946; &lt; 1/2 and t &#8805; 100), for any 1</p><p>Combining ( <ref type="formula">42</ref>) and ( <ref type="formula">43</ref>), once &#946; &lt; 1/2, we have</p><p>&#8804; exp -t(log t) 2 2(2 + c 1 )t 5/8 + 3 exp log t -&#946;t(log t) 3 (2 + c 1 )t 5/8 for all t &#8805; 100. Note that when T / log T &#8805; 100, for all t such that T / log T &#8804; t &#8804; T ,</p><p>where the second inequality follows from log T &#8805; 2 log log T . Meanwhile, for T / log</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.3 Bound on &#958; t</head><p>Similar to the proof of Lemma 4.3, we write</p><p>Then (entries of) {z i } are martingale differences, and we shall obtain high-probability bound on &#8741;&#958; t &#8741; &#8734; via Freedman's inequality as usual.</p><p>Firstly, parallel to (36), when &#8970;(1 -&#946;)t&#8971; &#8805; 50 and 1 -&#946; &#8805; 1/2, max</p><p>where the third inequality follows from (107).</p><p>We denote the entrywise conditional variance of z i as Var(z i | V i-1 , . . . , V 0 ) &#8712; R |S||A| , whose j-th element is the variance of [z i ] j conditional on V i-1 , . . . , V 0 . By the definition of z i in (44),</p><p>Similar to the situation in Lemma 4.3 (c.f. Appendix A.6), we have the crude entrywise upper bounded</p><p>where the last inequality follows from ( <ref type="formula">107</ref>) and the fact that</p><p>i &#8804; 1 due to (101). In addition, by the boundedness of &#8741;V i-1 &#8741; &#8734; &#8804; 1, we also have a deterministic upper bound of W t that</p><p>To apply Freedman's inequality, we further choose the (smallest) positive integer K such that for some constant c 2 &#8805; 1,</p><p>In view of ( <ref type="formula">45</ref>) and ( <ref type="formula">46</ref>) together with a union bound over all |S||A| entries, Freedman's inequality (Lemma D.6) implies that for any fixed t obeying &#8970;(1 -&#946;)t&#8971; &#8805; 50 and &#946; &lt; 1/2,</p><p>holds with probability at least 1 -&#948;, where the second line follows from the fact that log t/t &#8804; log 2/2 for t &#8805; 4.</p><p>Finally, for any fixed t obeying T / log T &#8804; t &#8804; log T , we have</p><p>The bound in (47) thus translates to</p><p>as long as t additionally satisfies</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.4 Recursive bound</head><p>Combining the three bounds in preceding subsections, for sufficiently large T satisfying all the mentioned conditions and any fixed t obeying T / log T &#8804; t &#8804; T , it holds with probability at least 1 -&#948; that</p><p>where the second inequality follows from the fact that</p><p>for T so large that T / log T &#8805; 100. Once (1 -&#946;) &#8805; 3/4, for any fixed t obeying 3T /(2 log T ) &#8804; t &#8804; T , we apply ( <ref type="formula">48</ref>) with a union bound over {k : 2t 3 &#8804; k &#8804; t} -as a result, with probability at least 1 -&#948;, one has</p><p>where we define</p><p>Var P (V i-1 ) + T -3/8 1 (50)</p><p>Var P (V i-1 ) + T -3/8 1 .</p><p>In the following, we are to follow exactly the same recipe as in the proof of Proposition 4.4 (c.f. Appendix A.3), where we correspondingly define the {&#945; (t) i } according this set of learning rates {&#951; j } here. We also set</p><p>) &#8805; 2/3 as long as c 2 &#8804; log(3/2)/2. Thus, when T is sufficiently large so that 1 -&#946; &#8805; 2/3, in parallel with (24), we have</p><p>In the following, we are to bound &#946; 1 and &#946; 2 in (51) separately. By definition of the discount factor {&#947; t }, we have &#947; j &#8804; &#947; T for all 2t/3 &#8804; j &#8804; T , indicating</p><p>where (i) follows from the bounded magnitude &#8741;&#8710; H &#8741; &#8734; &#8804; 1 and the fact that H h=1 P &#960;i h is a probability transition matrix; (ii) follows from</p><p>Again, for &#946; 1 , parallel to (26), we have the entrywise upper bound</p><p>We employ the following lemma to bound the first term of ( <ref type="formula">53</ref>); it is parallel to Lemma A.1, and the proof follows exactly the same arguments hence we omit here.</p><p>Lemma B.1. Suppose T 100, then it holds for all T / log T &#8804; t &#8804; T that</p><p>Invoking Lemma B.1, we obtain an upper bound</p><p>Recalling ( <ref type="formula">51</ref>), by the upper bound (52) on |&#946; 2 | and ( <ref type="formula">55</ref>) on |&#946; 1 |, for any fixed t such that 3T /(2 log T ) &#8804; t &#8804; T ,</p><p>holds with probability at least 1 -&#948;.</p><p>We now further take a union bound for (56) over {t : 3T /(2 log T ) &#8804; t &#8804; T }, which leads to the simultaneous (1 -&#948;) high-probability bound</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.5 Solving the recursive bound</head><p>We solve the recursive bounds to obtain the final high-probability bound. For any positive integer k, we define</p><p>A naive upper bound is u k &#8804; 1 for all k. Furthermore, by ( <ref type="formula">15</ref>) and the definition of u k , with probability at least 1 -&#948;, it holds simultaneously for all k &#8805; 1 that</p><p>for some absolute constant c 3 &gt; 0. If there exists some k such that 2 k+1 &#8804; 2 log T /3 and</p><p>then 2 k+1 3T 2 log T &#8804; T , and</p><p>(2(log T ) -1/8 + 18t mix ).</p><p>On the other hand, suppose u j &gt; ((log T ) -1/8 +9t mix )(T / log T ) -1/8 for any 1 &#8804; j &#8804; k for which 2 k+1 &#8804; 2 log T /3. Then</p><p>Recursively applying this relation for 1 &#8804; j &lt; k yields</p><p>where we used the fact that u 0 &#8804; 1. Hence</p><p>Now we can set 2 k &#8805; 3 log T /16, so that 2 k 3T /(2 log T ) &#8804; T , and the above upper bound translates to</p><p>Combining the two cases above, we arrive at</p><p>with probability at least 1 -&#948; for T obeying the conditions of Proposition 4.4.</p><p>We now take a moment to collect all the conditions we impose on T , which are</p><p>They can be further simplified to</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.6 From estimation to policy learning</head><p>Finally, we are to leverage the performance difference lemma for discounted reward MDP to obtain the bounds on average reward performance.</p><p>Invoking Lemma D.9 with &#947; = &#947; T , &#960; &#8242; = &#960; * &#947; T and &#960; = &#960; T , the greedy policy obtained in the T -th iteration, we know that</p><p>Since &#960; T is the greedy policy with respect to Q T , for any s &#8242; &#8712; S, we ahve</p><p>and also</p><p>Further invoking Lemma D.1, and recalling that &#960; * is the optimal policy for average reward, we have</p><p>where the first line follows from Lemma D.1 for &#960; T , the second line uses the previous result, the third line uses the optimality of &#960; * &#947; T for &#947; T -discounted reward, and the last line uses Lemma D.1 for &#960; * . Therefore, on the event that</p><p>, we have</p><p>+ 6T -1/8 t mix .</p><p>Since t mix &#8805; 1, the above bound translates to</p><p>for some absolute constant c &gt; 0 that only depends on c 1 , c 2 . This completes the proof of Theorem 3.3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C Technical proofs regarding Theorem 5.2</head><p>In this section, we provide detailed proofs for results regarding Algorithm 2. Appendix C.1 provides a proof sketch for Theorem 5.2, while the remaining of this section provides detailed proofs for supportive results.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.1 Sketch of analysis for Algorithm 2</head><p>In this section, we provide a sketch of analysis for the estimation error of Algorithm 2, which forms the basis for proving Theorem 5.2. The general approach is similar to Section 4.1 with slightly different bounds. Let</p><p>for t &#8805; 0, which is the estimation error of Algorithm 2 in the t-th iteration.</p><p>Our updating rule (17) in the t-th iteration satisfies</p><p>Employing the Bellman equation q * &#945;t = r + &#945; t P v * &#945;t , we obtain the decomposition</p><p>Similar as the arguments in the analysis of Algorithm 1 (see Section 4), we have</p><p>where the term</p><p>Here with some abuse of notations, we define &#960; t as the greedy policy with respect to q t . Plugging (59a) and (59b) back into (58) leads to the recursive relation</p><p>where we define the switching error in the t-th iteration as</p><p>Applying (60a) and (60b) recursively, we arrive at</p><p>where we define &#952;</p><p>(1 -&#952; j ), and &#952;</p><p>Now we set (with some abuse of notation)</p><p>for some constant c 2 &gt; 0. The upper bound of (61) can be decomposed as</p><p>The three terms, similar to before, are bounded as follows.</p><p>Lemma C.1. For all sufficiently large t such that t &#8805; max{e 2+c1 , 100}, it holds that Lemma C.2. Suppose T is sufficiently large such that c 2 log T &#8805; 5(2+c 1 )(log T ) 1/3 +log log T , c 1 T 3 &#8805; 3(log T ) 5 and (T / log T ) 1/3 &#8805; 4(2 + c 1 ). Then</p><p>for any t such that T / log T &#8804; t &#8804; T .</p><p>Proof of Lemma C.2. See Appendix C.6 for a detailed proof.</p><p>We utilize the Freedman's inequality to control the term &#958; t .</p><p>Lemma C.3. When &#946; &lt; 1/2 and T / log T &#8805; max{e c1 , 100}, for any fixed t such that T / log T &#8804; t &#8804; T ,</p><p>holds with probability at least 1 -&#948;, where c 3 = 16/c 1 + 144/c 2 1 is an absolute constant.</p><p>Proof of Lemma C.3. See Appendix C.7 for a detailed proof.</p><p>Based on the above three lemmas, we have the following recursive relation, which form the base of proving Theorem 5.2.</p><p>Proposition C.4. Suppose T is sufficiently large such that</p><p>for some constant c 2 &gt; 0 and c 3 = 16/c 1 + 144/c 2 1 . Then with probability at least 1 -&#948;,</p><p>holds simultaneously for all 3T /(2 log T ) &#8804; t &#8804; T , where we define the constant c 4 = 2(1 + 3/c 1 ).</p><p>Proof of Proposition C.4. See Appendix C.4 for a detailed proof.</p><p>C.2 Proof of Theorem 5.2</p><p>Proof of Theorem 5.2. We solve the recursive bound of Propositions C.4 that</p><p>with probability at least 1 -&#948; for all 3T /(2 log T ) &#8804; t &#8804; T . For any positive integer k, we define</p><p>By (62) and the definition of w k , with probability at least 1 -&#948;, it holds simultaneously for all k &#8805; 1 that</p><p>If there exists some k such that u k &#8804; 1 and 2 k+1 &#8804; 2 log T /3, then</p><p>for some sufficiently large constant c 5 &gt; 0. Otherwise, suppose u j &gt; 1 for any 1 &#8804; j &#8804; k where k &#8804; &#8970;log 2 (2 log T /3)&#8971; -1, then</p><p>.</p><p>Recursively applying this relation for 1 &#8804; j &lt; k yields</p><p>where we used the fact that</p><p>for the constant c 6 = 4c 3 (1 + c 4 ). Combining the two cases above, for any fixed T obeying the given conditions,</p><p>holds with probability at least 1 -&#948; for some constant c 5 &gt; 0. Finally, by Lemma 5.1, we have</p><p>Put it another way, given any &#949; &gt; 0, as long as T satisfies</p><p>On the same event of probability at least 1 -&#948;, we also have</p><p>Still by Lemma 5.1, we also obtain the form of v * and q * , which by standard MDP theory <ref type="bibr">(Puterman, 2014)</ref> satisfies the Bellman equation ( <ref type="formula">1</ref>). Therefore, we complete the proof of Theorem 5.2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.3 Proof of Corollary 5.3</head><p>Proof of Corollary 5.3. Recall that &#960; T (s) = argmax a&#8712;A q T (s, a) for all s &#8712; S is the greedy policy, and &#960; * is the optimal policy for average reward. Then under the conditions of Theorem 5.2, we have</p><p>where &#949; = B+c(log T ) 4 (log</p><p>, since the function q * defined in Theorem 5.2 equals q &#960; * . Assume without loss of generality that &#960; * and &#960; T are both deterministic policies. Invoking Lemma D.8 with &#960; &#8242; = &#960; T and &#960; = &#960; * , we know that</p><p>Here by the optimality of &#960; * and (63), we have</p><p>where the second and fourth lines uses the uniform bound and the third line uses the property of greedy policy &#960; T . This leads to</p><p>as desired. </p><p>Var P (v i-1 ) + 2(log T ) 6 1 with probability at least 1 -&#948; for any fixed t within T / log T &#8804; t &#8804; T , as long as T satisfies</p><p>Further simplifying this inequality leads to</p><p>as long as T additionally satisfy (log T ) 50/9 &#8805; 9 2c3 . Once (1 -&#946;) &#8805; 3/4, for any fixed t obeying 3T /(2 log T ) &#8804; t &#8804; T , we apply (64) with a union bound over {k : 2t 3 &#8804; k &#8804; t} -as a result, with probability at least 1 -&#948;,</p><p>where we define</p><p>Following exactly the same arguments as in the proof of Proposition 4.4, we define</p><p>and arrive at the decomposition</p><p>To further apply such recursion, we define G = T 1/9 log T, and</p><p>We define the index set</p><p>Note that once T 2/9 log T &#8805; 6 (implied by a stronger condition T 2/9 &#8805; (log T ) 5 imposed before), we have</p><p>Feasible Q-Learning for Average Reward Reinforcement Learning</p><p>Recursively invoking (68), we obtain</p><p>We now treat the two terms &#946; 1 and &#946; 2 separately. The easier part is</p><p>where the second inequality uses the fact that G h=1 P &#960;i h is a probability matrix, and the third inequality uses &#8741;&#948; j &#8741; &#8734; &#8804; &#8741;q j &#8741; &#8734; + &#8741;q * &#945;j &#8741; &#8734; &#8804; 3j 1/3 (log j) 2 /c 1 + j 1/9 by Lemma E.2. On the other hand, following exactly the same argument as 26, we have</p><p>Var P (v i ) .</p><p>(70)</p><p>Applying Lemma D.7, we know that max &#8970;t/2&#8971;&#8804;i&lt;t</p><p>which, by the boundedness that</p><p>Plug back into (70), we have</p><p>where we define the constant c 4 = 2(1 + 3/c 1 ) &gt; 0. Therefore, combining with (69), we have</p><p>that holds with probability at least 1 -&#948; for any fixed t obeying 3T /(2 log T ) &#8804; t &#8804; T , as long as T satisfies T 10/9 (log</p><p>T |S||A| &#948; ) 2 &#8805; (1+3/c1) 2 2c3 (log T ) 4 to ensure (72). Taking a union bound over such t and noting that log T |S||A| &#948;/T &#8804; 2 log T |S||A| &#948; , we know that</p><p>holds simultaneously for all 3T /(2 log T ) &#8804; t &#8804; T with probability at least 1 -&#948;/2. On the other hand, following exactly the same arguments, starting from the lower bound in (61) leads to</p><p>simultaneously for all 3T /(2 log T ) &#8804; t T with probability at least 1 -&#948;/2. Finally, we summarize all the conditions as</p><p>which can be simplified to</p><p>We thus complete the proof of Proposition C.4 by taking a union bound.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.5 Proof of Lemma C.1</head><p>Proof of Lemma C.1. Firstly, Lemma D.3 implies that each term d i can be bounded as</p><p>where the second last inequality follows from the fact that x 1/9 -y 1/9 = (x -y)z -8/9 /9 for some z lying between x and y.</p><p>For any fixed t &#8805; 1, let &#955; = t -1/3 , then the switching error can be decomposed as</p><p>where the first summation can be bounded as</p><p>where invoking (109) we know that once (1 -&#955;)t = t -t 2/3 &#8805; 50,</p><p>Feasible Q-Learning for Average Reward Reinforcement Learning as long as log t &#8805; 1/c &#8242; = 2 + c 1 . When &#955; &lt; 1/2, the second summation is bounded as</p><p>Putting them together, we arrive at</p><p>as long as log t &#8805; 2 + c 1 and t -t 2/3 &gt; 50 (which is satisfied when t &#8805; 100).</p><p>C.6 Proof of Lemma C.2</p><p>Proof of Lemma C.2. By the initialization, &#8741;&#948; 0 &#8741; &#8804; 20. Once t &#8805; 50, by the monotonicity in (109),</p><p>as long as t 1/3 log t &#8805; 4(2 + c 1 ). By the boundedness of &#8741;v i &#8741; &#8734; &#8804; 3(log i) 2 i 1/3 /c 1 , invoking (110) we know that when &#8970;(1 -&#946;)t&#8971; &#8805; 50,</p><p>Here for any t such that T / log T &#8804; t &#8804; T , we have</p><p>as long as c 2 log T &#8805; 5(2 + c 1 )(log T ) 1/3 + log log T , which leads to</p><p>for any t such that T / log T &#8804; t &#8804; T , if T satisfies c 1 T 3 &#8805; 3(log T ) 5 . We thus complete the proof of Lemma C.2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.7 Proof of Lemma C.3</head><p>Proof of Lemma C.3. We write</p><p>i=1+&#8970;(1-&#946;)t&#8971; is a martingale difference squence with the coarse deterministic bound</p><p>1 (log t) 4 t -1/3 =: R.</p><p>as long as &#946; &lt; 1/2. Furthermore, we define the sum of conditional variances as</p><p>as long as &#946; &lt; 1/2, where the last line follows from the fact that</p><p>We now choose the positive integer K such that</p><p>as long as t &#8805; max{e c1 , 100}. Applying the Freedman's inequality (c.f. Lemma D.6) with a union bound over all |S||A| entries, we know that with probability at least 1 -&#948;, for any fixed t such that T / log T &#8804; t &#8804; T ,</p><p>Var P (v i-1 ) + 2(log T ) 6</p><p>where c 3 = 32/c 1 + 144/c 4 1 . This completes the proof of Lemma C.3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D Supporting lemmas</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.1 Relations of value functions</head><p>We quote the following lemma adapted from <ref type="bibr">Jin and Sidford (2021, Lemma 2)</ref>. It relates the average reward J &#960; and the rescaled discounted ones Q &#960; &#947; , V &#960; &#947; of any policy &#960;. The proof the lemma is similar to that of <ref type="bibr">Jin and Sidford (2021)</ref> and is omitted here.</p><p>Lemma D.1 (Lemma 2 of <ref type="bibr">Jin and Sidford (2021)</ref>). For any policy &#960; : S &#8594; &#8710;(A) and any discount factor &#947; &#8712; (0, 1], it holds that</p><p>The following lemma is adapted from <ref type="bibr">Dong et al. (2021) and</ref><ref type="bibr">De Farias and</ref><ref type="bibr">Van Roy (2006)</ref>, showing that our framework is applicable when the finite mixing time condition is replaced by the reward averaging time &#964; (see Remark 2.2). The proof the lemma is similar to that of De Farias and Van Roy ( <ref type="formula">2006</ref>) and is omitted here. </p><p>The following lemma bounds the difference between rescaled optimal value and Q-functions with two discount factors.</p><p>Lemma D.3. For any &#947; 1 , &#947; 2 such that 0 &lt; &#947; 1 &lt; &#947; 2 &lt; 1, it holds that</p><p>where 0 (resp. 1) is a vector or matrix with all entries equal to 0 (resp. 1).</p><p>Proof of Lemma D.3. We first show (75a). The upper bound follows directly from Lemma 17 of Dong et al.</p><p>(2021) with a rescaling. For any policy &#960;, we note that</p><p>which follows from &#947; 2 &gt; &#947; 1 and the non-negativeness of the reward function r. Applying the above relation to &#960; * &#947;1 , we obtain</p><p>which completes the proof of lower bound in (75a). Further noting V * &#947; (s) = max a &#8242; &#8712;A Q * &#947; (s, a &#8242; ) for any s &#8712; S, the fact that maximum is a contraction map leads to (75b) and completes the proof of Lemma D.3. Lemma D.4. For any discount factors &#947; 1 , &#947; 2 such that 0 &lt; &#947; 1 &lt; &#947; 2 &lt; 1, it holds that</p><p>Proof of Lemma D.4. The boundedness of reward function 0 &#8804; r &#8804; 1 implies 0 &#8804; Q * &#947;i &#8804; 1 for i = 1, 2. For any state-action pair (s, a) &#8712; S &#215; A, applying the lower bound in Lemma D.3 yields</p><p>where the second inequality follows from Q * &#947;1 (s, a) &#8804; 1. On the other hand, the upper bound in Lemma D.3 together with Q * &#947;1 (s, a) &#8805; 0 implies</p><p>The second inequality in (76) follows from the same arguments. Lemma D.5. For any i &#8805; 1, it holds that</p><p>Proof of Lemma D.5. We start by bounding V i -V * &#947;i for all i &#8805; 1. Recalling that</p><p>where (i) follows from the optimality of &#960; * &#947;i with respect to Q * &#947;i , and (ii) holds since P &#960;i is a probability transition matrix. Similarly,</p><p>for all i &#8805; 1. By the definition of entrywise variance, we have</p><p>Furthermore, we have</p><p>where the last inequality follows from &#8741;P &#8741; 1 = 1 and</p><p>by the bounded magnitude, and (78). Meanwhile, similar arguments yield</p><p>Plugging the two bounds back in (79) completes the proof of (77).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.2 Proof of Lemma 5.1</head><p>Proof of Lemma 5.1. By Feinberg and Shwartz (2012, Theorem 8.1), there exists an optimal policy &#960; * (namely, a Blackwell optimal policy) for the average reward and some &#945; * &#8712; (0, 1), such that for all &#945; &#8712; (0, &#945; * ), &#960; * is also the optimal policy for &#945;-discounted reward. Since &#960; * is the optimal policy for average reward, its long-term average reward equals J * . We define</p><p>namely, the bias function of &#960; * . We also define P * &#8712; R |S|&#215;|S| as the transition matrix induced by &#960; * , and P * * = lim T &#8594;&#8734; 1 T T t=1 (P * ) t-1 as the long-term average transition matrix. Furthermore, let</p><p>By Puterman (2014, Theorem 8.2.3), letting &#961; = (1 -&#945;)/&#945;, for &#945; that is sufficiently close to 1, or equivalently for &#961; that is sufficiently close to 0, we have the Laurent series expansion</p><p>where J * is the long-term average reward of &#960; * , y n = (-1) n H n+1 P f , where f &#8712; R |S| is the vectorization of f (s) = r(s, &#960; * (s)) that also satisfies v * = H P f . Thus, recalling the Blackwell optimality of &#960; * and taking &#945; sufficiently close to 1, we have</p><p>Therefore, there exists a constant B 1 &gt; 0 which only depends on the underlying MDP that sup &#945;&#8712;(0,1)</p><p>We now define the function</p><p>for all state-action pairs (s, a) &#8712; S &#215; A, so that (v , q * ) satisfies the Bellman equation ( <ref type="formula">1</ref>) by standard MDP theory <ref type="bibr">(Puterman, 2014)</ref>. The equivalent vectorized representation is</p><p>Then the Bellman equation for optimal discounted value functions implies</p><p>where the second line follows from the optimality of &#960; * &#945; with respect to v * &#945; , the third line follows from (80), and the fifth line follows from the Bellman equation ( <ref type="formula">1</ref>) for (q * , v * ). Similarly, we have</p><p>Combining the above two inequalities, we know that there exists some constant B 2 &gt; 0 such that sup &#945;&#8712;(0,1)</p><p>Taking B = max{B 1 , B 2 } completes the proof of Lemma 5.1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.3 Freedman's inequality</head><p>The following lemma is adapted by Li et al. ( <ref type="formula">2021</ref>) from Freedman's inequality <ref type="bibr">Freedman (1975)</ref>.</p><p>Lemma D.6 (Theorem 5 of <ref type="bibr">Li et al. (2021)</ref>). Suppose</p><p>where we write E k-1 for the expectation conditional on {X j } j&lt;k . Then for any given &#963; 2 &#8805; 0, one has</p><p>In addition, suppose W n &#8804; &#963; 2 holds deterministically. For any positive integer K, with probability at least 1 -&#948; one has</p><p>) D.4 Proof of Lemma A.1 Proof of Lemma A.1. Employing (77) of Lemma D.5, we have the entrywise bound H-1 h=0 &#947; h T h k=1 P &#960;i k max &#8970;t/2&#8971;&#8804;i&lt;t</p><p>Var</p><p>where the third line follows from max i (a i + b i ) &#8804; max i a i + max i b i , and the last line follows from the fact that h k=1 P &#960;i k 1 = 1 since the product is still a probability transition matrix. Following the same arguments as the way we bound (79), it holds for all i &#8805; 1 that</p><p>On the other hand,</p><p>where the last equality follows from the Bellman equation Q * &#947; = (1 -&#947;)r + &#947;P V * &#947; for all &#947; &#8712; (0, 1). Using similar arguments as <ref type="bibr">Li et al. (2021)</ref>, the second term in (84) can be bounded as</p><p>where (i) follows from the fact that &#8741;P &#8741; 1 = 1, (ii) is due to the boundedness of &#8741;Q * &#947;t &#8741; &#8804; 1, (iii) follows from &#8741;&#928; &#960;i h+1 &#8741; 1 = 1 and V i h+1 = &#928; &#960;i h+1 Q i h+1 , (iv) follows from</p><p>, and (v) follows from the property of entrywise maximum. We thus obtain the entrywise upper bound (uniform over all &#8970;t/2&#8971; &#8804; i &lt; t) max &#8970;t/2&#8971;&#8804;i&lt;t</p><p>Var P (V * &#947;i ) &#8804; Var P (V * &#947;t ) + 4 max &#8970;t/2&#8971;&#8804;i&lt;t</p><p>where the first inequality follows from (83) and the second inequality follows from ( <ref type="formula">84</ref>) and ( <ref type="formula">93</ref>), and the last inequality follows from the monotonicity of &#947; t . Applying (94) to (82) yields the telescoping sum</p><p>H-1 h=0 &#947; h T h k=1 P &#960;i k max &#8970;t/2&#8971;&#8804;i&lt;t Var P (V i ) &#8804; H-1 h=0 &#947; h T h k=1 P &#960;i k max &#8970;t/2&#8971;&#8804;i&lt;t Var P (V * &#947;i ) + 4 1 -&#947; T max &#8970;t/2&#8971;&#8804;i&lt;t</p><p>where the first inequality follows from (82), and the second inequality uses h k=1 P &#960;i k 1 = 1 as the product is a probability transition matrix. As the rows of the probability transition matrix H k=1 P &#960;i h+1 all sum up to one, we have</p><p>by the boundedness of &#8741;Q * &#947; &#8741; &#8734; &#8804; 1 for all &#947; &#8712; (0, 1), as well as the fact that &#947; t &#8805; 1/2 for t &#8805; 160. On the other hand, for any &#8970;t/2&#8971; &#8804; i &lt; t, invoking Lemma D.1, we obtain</p><p>&#8804; 3(1 -&#947; t )t mix + 3(1 -&#947; i )t mix &#8804; 3 1 + 2 1/5 t -1/5 t mix &#8804; 9T -1/5 (log T ) 1/5 t mix for T / log T &#8804; t &#8804; log T . In addition, for T &#8805; 160, we also have</p><p>which, together with the above pieces, leads to ( <ref type="formula">27</ref>) and completes the proof of Lemma A.1.</p><p>Lemma D.7. For any i &#8805; 1, it holds that</p><p>Proof of Lemma D.7. We first bound v i -v * &#945;i for all i &#8805; 1. Recalling that &#948; i = q i -q * &#945;i , we have</p><p>where (i) follows from the optimality of &#960; * &#945;i with respect to q * &#945;i , and (ii) holds since P &#960;i is a probability transition matrix. Similarly, v i -v * &#945;i &#8805; P &#960; * &#945; i q i -P &#960; * &#945; i q * &#945;i &#8805; -&#8741;P &#960; * &#945; i &#8741; 1 &#8741;q i -q * &#945;i &#8741; &#8734; &#8805; -&#8741;&#948; i &#8741; &#8734; , which leads to</p><p>for all i &#8805; 1. By the definition of entrywise variance, we have</p><p>Furthermore, we have</p><p>, where the last inequality follows from &#8741;P &#8741; 1 = 1, the triangular inequality, and (96). Meanwhile, similar arguments yield</p><p>Plugging the two bounds back in (97) yields Var P (v i ) -Var P (v * &#945;i ) &#8734; &#8804; 2 &#8741;v i &#8741; &#8734; + &#8741;v * &#945;i &#8741; &#8734; &#8741;&#948; i &#8741; &#8734; &#8804; 2 i 1/9 + 3(log i) 2 i 1/3 /c 1 &#8741;&#948; i &#8741; &#8734; &#8804; 2(1 + 3/c 1 )(log i) 2 i 1/3 &#8741;&#948; i &#8741; &#8734; .</p><p>E.2 Learning rates for estimating optimal value in Theorem 3.1</p><p>In this part, we collect some useful facts about the learning rates speficied for Theorem 3.1 that would be used repeatedly. Recall that we define the learning rates as &#951; t = (1 + c1t 3/5 (log t) 3 ) -1 , &#8704; t &#8805; 2 for some constant c 1 &gt; 0.</p><p>Bound on &#951; j . Firstly, we have the naive upper bound</p><p>(log j) 3 &#8804; (log j) 3 c 1 j 3/5 , for all j &#8805; 2.</p><p>(98)</p><p>One can also check that j 3/5 /(log j) 3 &#8805; 0.1 for all j &#8805; 1 with the convention that 1/0 = &#8734;, which leads to the lower bounds</p><p>(log j) 3</p><p>&#8805; 1</p><p>(log j) 3 + c1j 3/5 (log j) 3 &#8805; (log j) 3 (10 + c 1 )j 3/5 , for all j &#8805; 2.</p><p>(99)</p><p>Furthermore, it can be easily checked that (log j) 3 j -3/5 is decreasing in j for j &#8805; 150. Hence &#951; j &#8805; &#951; t and (log j) 3 j 3/5 &#8805; (log t) 3 t 3/5 , for all t &gt; 150 and 150 &#8804; j &#8804; t.</p><p>(100)</p><p>Compound learning rates. Some associated quantities in the analysis include &#951;</p><p>(1 -&#951; j ), and &#951;</p><p>The sum of &#951;</p><p>(t) i over i obeys t i=0 &#951; (t) i = t j=1</p><p>(1 -&#951; j ) + &#951; 1 t j=2</p><p>(1 -&#951; j ) + &#8226; &#8226; &#8226; + &#951; t-1 (1 -&#951; t ) + &#951; t = 1. (101)</p><p>Moreover, we consider a generic &#946; &#8712; (0, 1) and bound the compound learning rates for i &#8804; &#8970;(1 -&#946;)t&#8971; and i &gt; &#8970;(1 -&#946;)t&#8971; separately.</p><p>&#8226; When &#946; &lt; 1/2, for any t &#8805; 300 (so that &#8970;(1 -&#946;)t&#8971; &#8805; 150) and any i &#8804; &#8970;(1 -&#946;)t&#8971;,</p><p>where the third inequality follows from (100), and the fourth inequality follows from (98).</p><p>&#8226; When &#946; &lt; 1/2, for any t &#8805; 300 and any i &gt; &#8970;(1 -&#946;)t&#8971; &#8805; t/2 &#8805; 150, &#951;</p><p>i &#8804; &#951; i &#8804; (log i) 3 c 1 i 3/5 &#8804; 2(log t) 3 c 1 t 3/5 (103) following ( <ref type="formula">98</ref>) and (100) and the fact that log i &#8804; log t and i -3/5 &#8804; 2t -3/5 for any i &#8805; t/2.</p><p>E.3 Learning rates for optimal policy in Theorem 3.3</p><p>We now present some useful facts about the learning rates that are particular to Theorem 3.3. Recall that in Theorem 3.3, we set &#947; t = 1 -t -1/8 and &#951; t = 1 1 + c1t 5/8 (log t) 2</p><p>, t &#8805; 2 for some constant c 1 &gt; 0 in Algorithm 1.</p><p>Feasible Q-Learning for Average Reward Reinforcement Learning</p><p>Bound on &#951; j . Firstly, we have the naive upper bound</p><p>(log j) 2 &#8804; (log j) 2 c 1 j 5/8 , for all j &#8805; 2. (104)</p><p>One can check that j 5/8 /(log j) 2 &#8805; 0.5 for all j &#8805; 1 with the convention that 1/0 = &#8734;, which leads to the lower bounds</p><p>(log j) 2 + c1j 5/8 (log j) 2 &#8805; (log j) 2 (2 + c 1 )j 5/8 , for all j &#8805; 2. (105)</p><p>Furthermore, it can be easily checked that (log j) 2 j -5/8 is decreasing in j for j &#8805; 50. Hence &#951; j &#8805; &#951; t and (log j)</p><p>2 j 5/8 &#8805; (log t) 2 t 5/8 , for all t &gt; 50 and 50 &#8804; j &#8804; t. (106) Compound learning rates. Some associated quantities in the analysis include &#951; (t) t = &#951; t , &#951; (t) 0 = t j=1 (1 -&#951; j ), and &#951; (t) i = &#951; i &#8226; t j=i+1 (1 -&#951; j ), &#8704;1 &#8804; i &lt; t. The sum of &#951; (t) i over i obeys t i=0 &#951; (t) i = t j=1</p><p>(1 -&#951; j ) + &#951; 1 t j=2</p><p>(1 -&#951; j ) + &#8226; &#8226; &#8226; + &#951; t-1 (1 -&#951; t ) + &#951; t = 1.</p><p>Moreover, we consider a generic &#946; &#8712; (0, 1) and bound the compound learning rates for i &#8804; &#8970;(1 -&#946;)t&#8971; and i &gt; &#8970;(1 -&#946;)t&#8971; separately.</p><p>&#8226; When &#946; &lt; 1/2, for any t &#8805; 100 (so that &#8970;(1 -&#946;)t&#8971; &#8805; 50) and any i &#8804; &#8970;(1 -&#946;)t&#8971;, &#951;</p><p>i &#8804; t j=i+1</p><p>(1 -&#951; j ) &#8804; exp - where the third inequality follows from (100), and the fourth inequality follows from (98).</p><p>&#8226; When &#946; &lt; 1/2, for any t &#8805; 100 and any i &gt; &#8970;(1 -&#946;)t&#8971; &#8805; t/2 &#8805; 50, &#951;</p><p>i &#8804; &#951; i &#8804; (log i) 3 c 1 i 5/8 &#8804; 2(log t) 2 c 1 t 5/8 (107) following ( <ref type="formula">104</ref>) and ( <ref type="formula">106</ref>) and the fact that log i &#8804; log t and i -5/8 &#8804; 2t -5/8 for any i &#8805; t/2.</p><p>E.4 Learning rates for bias function in Theorem 5.2</p><p>We now proceed to some basic facts on the learning rates of Algorithm 2. Recall that we define the learning rates as</p><p>, &#8704; t &#8805; 2.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_0"><p>This work is generously supported by National Science Foundation grants CCF-2312205 and CCF-2312204. Correspond to ying531@stanford.edu and zz26@nyu.edu.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_1"><p>Earlier works on discounted Q-learning focused on characterizing its asymptotic convergence without any finite-sample guarantees; see<ref type="bibr">Jaakkola et al. (1994)</ref>; Tsitsiklis (1994); Szepesv&#225;ri (1998);<ref type="bibr">Borkar and Meyn (2000)</ref>.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_2"><p>How to learn this quantity efficiently also remains under-explored. We provide an answer on this as well.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_3"><p>Algorithms without this property cannot provably adapt to additional samples beyond an initially chosen T .</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="7" xml:id="foot_4"><p><ref type="bibr">Puterman (2014)</ref> shows that if the state space S is finite or countable, then the limit (instead of liminf) V &#960; (s) exists; if the chain induced by &#960; is irreducible or has a single recurrent class, then V &#960; (s) is a constant function. We operate in this scenario.</p></note>
		</body>
		</text>
</TEI>
