Policy Mirror Descent for Reinforcement Learning: Linear Convergence, New Sampling Complexity, and Generalized Problem Classes

Guanghui Lan

Introduction

Here hπh^{\pi} is a closed convex function w.r.t. the policy π\pi, i.e., there exist some μ≥0\mu\geq 0 s.t.

where ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle denotes the inner product over the action space A{\cal A}, (h′)π′(s,⋅)(h^{\prime})^{\pi^{\prime}}(s,\cdot) denotes a subgradient of h(s)h(s) at π′\pi^{\prime}, and Dπ′π(s)D_{\pi^{\prime}}^{\pi}(s) is the Bregman’s distance or Kullback–Leibler (KL) divergence between π\pi and π′\pi^{\prime} (see Subsection 1.1 for more discussion).

Clearly, if hπ=0h^{\pi}=0, then QπQ^{\pi} becomes the classic action-value function. If hπ(s)=μDπ0π(s)h^{\pi}(s)=\mu D_{\pi_{0}}^{\pi}(s) for some μ>0\mu>0, then QπQ^{\pi} reduces to the so-called entropy regularized action-value function. The incorporation of a more general convex regularizer hπh^{\pi} allows us to not only unify these two cases, but also to greatly enhance the expression power and thus the applicability of RL. For example, by using either the indicator function, quadratic penalty or barrier functions, hπh^{\pi} can model the set of constraints that an optimal policy should satisfy. It can describe the correlation among different actions for different states. hπh^{\pi} can also model some risk or utility function associated with the policy π\pi. Throughout this paper, we say that hπh^{\pi} is a strongly convex regularizer if μ>0\mu>0. Otherwise, we call hπh^{\pi} a general convex regularizer. Clearly the latter class of problems covers the regular case with hπ=0h^{\pi}=0.

It can be easily seen from the definitions of QπQ^{\pi} and VπV^{\pi} that

for any s∈Ss\in{\cal S}. Here Δ∣A∣\Delta_{|{\cal A}|} denotes the simplex constraint given by

By examining Bellman’s optimality condition for dynamic programming (BellmanDreyfus1959 and Chapter 6 of PutermanBook1994), we can show the existence of a policy π∗\pi^{*} which satisfies (1.6) simultaneously for all s∈Ss\in{\cal S}. Hence, we can formulate (1.6) as an optimization problem with a single objective by taking the weighted sum of VπV^{\pi} over ss (with weights ρs>0\rho_{s}>0 and ∑s∈Sρs=1\textstyle\sum_{s\in S}\rho_{s}=1):

While the weights ρ\rho can be arbitrarily chosen, a reasonable selection of ρ\rho would be the stationary state distribution induced by the optimal policy π∗\pi^{*}, denoted by ν∗≡ν(π∗)\nu^{*}\equiv\nu(\pi^{*}). As such, problem (1.8) reduces to

It has been observed recently (eg., LiuCaiYangWang2019a) that one can simplify the analysis of various algorithms by setting ρ\rho to ν∗\nu^{*}. As we will also see later, even though the definition of the objective ff in (1.9) depends on ν∗\nu^{*} and hence the unknown optimal policy π∗\pi^{*}, the algorithms for solving (1.6) and (1.9) do not really require the input of π∗\pi^{*}.

Recently, there has been considerable interest in the development of first-order methods for solving RL problems in (1.8) -(1.9). While these methods have been derived under various names (e.g., policy gradient, natural policy gradient, trust region policy optimization), they all utilize the gradient information of ff (i.e., QQ function) in some form to guide the search of optimal policy (e.g., SuttonMcAllester1999; KakadeLangford2002; 10.2307/40538442; AgarwalKakadeLeeeMhhajan2019; DBLP:conf/aaai/ShaniEM20; 2020arXiv200706558C; Wang2020NeuralPG; 2020arXiv200506392M). As pointed out by a few authors recently, many of these algorithms are intrinsically connected to the classic mirror descent method originally presented by Nemirovski and Yudin nemyud:83; BeckTeb03-1; NJLS09-1, and some analysis techniques in mirror descent method have thus been adapted to reinforcement learning DBLP:conf/aaai/ShaniEM20; Wang2020NeuralPG; Tomar2020MirrorDP. In spite of the popularity of these methods in practice, a few significant issues remain on their theoretical studies. Firstly, most policy gradient methods converge only sublinearly, while many other classic algorithms (e.g., policy iteration) can converge at a linear rate due to the contraction properties of the Bellman operator. Recently, there are some interesting works relating first-order methods with the Bellman operator to establish their linear convergence 2020arXiv200711120B; 2020arXiv200706558C. However, in a nutshell these developments rely on the contraction of the Bellman operator, and as a consequence, they either require unrealistic algorithmic assumptions (e.g., exact line search 2020arXiv200711120B) or apply only for some restricted problem classes (e.g., entropy regularized problems 2020arXiv200706558C). Secondly, the convergence of stochastic policy gradient methods has not been well-understood in spite of intensive research effort. Due to unavoidable bias, stochastic policy gradient methods exhibit much slower rate of convergence than related methods, e.g., stochastic Q-learning.

Our contributions in this paper mainly exist in the following several aspects. Firstly, we present a policy mirror descent (PMD) method and show that it can achieve a linear rate of convergence for solving RL problems with strongly convex regularizers. We then develop a more general form of PMD, namely approximate policy mirror descent (APMD) method, obtained by applying an adaptive perturbation term into PMD, and show that it can achieve a linear rate of convergence for solving RL problems with general convex regularizers. Even though the overall problem is highly nonconvex, we exploit the generalized monotonicity DangLan12-1; LanBook2020; KotsalisLanLi2020PartI associated with the variational inequality (VI) reformulation of (1.8)-(1.9) (see FacPang03 for a comprehensive introduction to VI). As a consequence, our convergence analysis does not rely on the contraction properties of the Bellman operator. This fact not only enables us to define hπh^{\pi} as a general (strongly) convex function of π\pi and thus expand the problem classes considered in RL, but also facilitates the study of PMD methods under the stochastic settings.

Secondly, we develop the stochastic policy mirror descent (SPMD) and stochastic approximate policy mirror descent (SAPMD) method to handle stochastic first-order information. One key idea of SPMD and SAPMD is to handle separately the bias and expected error of the stochastic estimation of the action-value functions in our convergence analysis, since we can usually reduce the bias term much faster than the total expected error. We establish general convergence results for both SPMD and SAPMD applied to solve RL problems with strongly convex and general convex regularizers, under different conditions about the bias and expected error associated with the estimation of value functions.

Thirdly, we establish the overall sampling complexity of these algorithms by employing different schemes to estimate the action-value function. More specifically, we present an O(∣S∣∣A∣/μϵ){\cal O}(|{\cal S}||{\cal A}|/\mu\epsilon) and O(∣S∣∣A∣/ϵ2){\cal O}(|{\cal S}||{\cal A}|/\epsilon^{2}) sampling complexity for solving RL problems with strongly convex and general convex regularizers, when one has access to multiple independent sampling trajectories. To the best of our knowledge, the former sampling complexity is new in the RL literature, while the latter one has not been reported before for policy gradient type methods. We further enhance a recently developed conditional temporal difference (CTD) method KotsalisLanLi2020PartII so that it can reduce the bias term faster. We show that with CTD, the aforementioned O(1/μϵ){\cal O}(1/\mu\epsilon) and O(1/ϵ2){\cal O}(1/\epsilon^{2}) sampling complexity bounds can be achieved in the single trajectory setting with Markovian noise under certain regularity assumptions.

Fourthly, observe that unless hπh^{\pi} is relatively simple (e.g., hπh^{\pi} does not exist or it is given as the KL divergence), the subproblems in the SPMD and SAPMD methods do not have an explicit solution in general and require an efficient solution procedure to find some approximate solutions. We establish the general conditions on the accuracy for solving these subproblems, so that the aforementioned linear rate of convergence and new sampling complexity bounds can still be maintained. We further show that if hπh^{\pi} is a smooth convex function, by employing an accelerated gradient descent method for solving these subproblems, the overall gradient computations for hπh^{\pi} can be bounded by O{(log⁡γϵ)(1−γ)L/μlog⁡(1/ϵ)}{\cal O}\{(\log_{\gamma}\epsilon)\sqrt{(1-\gamma)L/\mu}\log(1/\epsilon)\} and O{(log⁡γϵ)L/ϵ}{\cal O}\{(\log_{\gamma}\epsilon)\sqrt{L/\epsilon}\}, respectively, for the case when hπh^{\pi} is a strongly convex and general convex function. To the best of our knowledge, such gradient complexity has not been considered before in the RL and optimization literature.

This paper is organized as follows. In Section 2, we discuss the optimality conditions and generalized monotonicity about RL with convex regularizers. Sections 3 and 4 are dedicated to the deterministic and stochastic policy mirror descent methods, respectively. In Section 5 we establish the sampling complexity bounds under different sampling schemes, while the gradient complexity of computing ∇hπ\nabla h^{\pi} is shown in Section 6. Some concluding remarks are made in Section 7.

For any two points π(⋅∣s),π′(⋅∣s)∈Δ∣A∣\pi(\cdot|s),\pi^{\prime}(\cdot|s)\in\Delta_{|{\cal A}|}, we measure their Kullback–Leibler (KL) divergence by

Observe that the KL divergence can be viewed as is a special instance of the Bregman’s distance (or prox-function) widely used in the optimization literature. Let the distance generating function ω(π(⋅∣s)):=∑a∈Aπ(a∣s)log⁡π(a∣s)\omega(\pi(\cdot|s)):=\textstyle\sum_{a\in{\cal A}}\pi(a|s)\log\pi(a|s) It is worth noting that we do not enforce π(a∣s)>0\pi(a|s)>0 when defining ω(π(⋅∣s))\omega(\pi(\cdot|s)) as all the search points generated by our algorithms will satisfy this assumption.. The Bregman’s distance associated with ω\omega is given by

where the last equation follows from the fact that ∑a∈A(π(a∣s)−π′(a∣s))=0\textstyle\sum_{a\in{\cal A}}(\pi(a|s)-\pi^{\prime}(a|s))=0. Therefore, we will use the KL divergence KL(π(⋅∣s)∥π′(⋅∣s)){\rm KL}(\pi(\cdot|s)\parallel\pi^{\prime}(\cdot|s)) and Bregman’s distance Dπ′π(s)D_{\pi^{\prime}}^{\pi}(s) interchangeably throughout this paper. It should be noted that our algorithmic framework allows us to use other distance generating functions, such as ∥⋅∥p2\|\cdot\|_{p}^{2} for some p>1p>1, which, different from the KL divergence, has a bounded prox-function over Δ∣A∣\Delta_{|{\cal A}|}.

Optimality Conditions and Generalized Monotonicity

It is well-known that the value function Vπ(s)V^{\pi}(s) in (1.3) is highly nonconvex w.r.t. π\pi, because the components of π(⋅∣s)\pi(\cdot|s) are multiplied by each other in their definitions (see also Lemma 3 of AgarwalKakadeLeeeMhhajan2019 for an instructive counterexample). However, we will show in this subsection that problem (1.9) can be formulated as a variational inequality (VI) which satisfies certain generalized monotonicity properties (see DangLan12-1, Section 3.8.2 of LanBook2020 and KotsalisLanLi2020PartI).

Let us first compute the gradient of the value function Vπ(s)V^{\pi}(s) in (1.3). For simplicity, we assume for now that hπh^{\pi} is differentiable and will relax this assumption later. For a given policy π\pi, we define the discounted state visitation distribution by

where Prπ(st=s∣s0){\rm Pr}^{\pi}(s_{t}=s|s_{0}) denotes the state visitation probability of st=ss_{t}=s after we follow the policy π\pi starting at state s0s_{0}. Let Pπ{\cal P}^{\pi} denote the transition probability matrix associated with policy π\pi, i.e., Pπ(i,j)=∑a∈Aπ(a∣i)P(j∣i,a){\cal P}^{\pi}(i,j)=\textstyle\sum_{a\in{\cal A}}\pi(a|i){\cal P}(j|i,a), and eie_{i} be the ii-th unit vector. Then Prπ(st=s∣s0)=es0T(Pπ)tes{\rm Pr}^{\pi}(s_{t}=s|s_{0})=e_{s_{0}}^{T}({\cal P}^{\pi})^{t}e_{s} and

For any (s0,s,a)∈S×S×A(s_{0},s,a)\in{\cal S}\times{\cal S}\times{\cal A}, we have

where ∇hπ(s,⋅)\nabla h^{\pi}(s,\cdot) denotes the gradient of hπ(s)h^{\pi}(s) w.r.t. π\pi.

Combining the above two relations, we obtain

where the second equality follows by expanding ∂Vπ(s′)∂π(a∣s)\tfrac{\partial V^{\pi}(s^{\prime})}{\partial\pi(a|s)} recursively, and the third equality follows from the definition of ds0π(s)d_{s_{0}}^{\pi}(s) in (2.1), and the last identity follows from ∂π(a′∣x)∂π(a∣s)=0\tfrac{\partial\pi(a^{\prime}|x)}{\partial\pi(a|s)}=0 for x≠sx\neq s or a′≠aa^{\prime}\neq a, and ∂hπ(x)∂π(a∣s)=0\tfrac{\partial h^{\pi}(x)}{\partial\pi(a|s)}=0 for x≠sx\neq s.

In view of Lemma 1, the gradient of the objective f(π)f(\pi) in (1.9) at the optimal policy π∗\pi^{*} is given by

where the third identity follows from (2.2) and the last one follows from the fact that (ν∗)T(Pπ∗)t=(ν∗)T(\nu^{*})^{T}({\cal P}^{\pi^{*}})^{t}=(\nu^{*})^{T} for any t≥0t\geq 0 since ν∗\nu^{*} is the steady state distribution of π∗\pi^{*}. Therefore, the optimality condition of (1.9) suggests us to solve the following variational inequality

However, the above VI requires hπh^{\pi} to be differentiable. In order to handle the possible non-smoothness of hπh^{\pi}, we instead solve the following problem

It turns out this variational inequality satisfies certain generalized monotonicity properties thanks to the following performance difference lemma obtained by generalizing some previous results (e.g., Lemma 6.1 of KakadeLangford2002).

For any two feasible policies π\pi and π′\pi^{\prime}, we have

For simplicity, let us denote ξπ′(s0)\xi^{\pi^{\prime}}(s_{0}) the random process (st,at,st+1)(s_{t},a_{t},s_{t+1}), t≥0t\geq 0, generated by following the policy π′\pi^{\prime} starting with the initial state s0s_{0}. It then follows from the definition of Vπ′V^{\pi^{\prime}} that

We are now ready to prove the generalized monotonicity for the variational inequality in (2.5).

It follows from Lemma 2 (with π′=π∗\pi^{\prime}=\pi^{*}) that

Let ee denote the vector of all 11’s. Then, we have

where the first identity follows from the definition of Aπ(s′,⋅)A^{\pi}(s^{\prime},\cdot) in (2.6), the second equality follows from the fact that ⟨e,π∗(⋅∣s′)⟩=1\langle e,\pi^{*}(\cdot|s^{\prime})\rangle=1, and the third equality follows from the definition of VπV^{\pi} in (1.3). Combining the above two relations and taking expectation w.r.t. ν∗\nu^{*}, we obtain

where the second identity follows similarly to (2.3) since ν∗\nu^{*} is the steady state distribution induced by π∗\pi^{*}. The result then follows by rearranging the terms.

Since Vπ(s)−Vπ∗(s)≥0V^{\pi}(s)-V^{\pi^{*}}(s)\geq 0 for any feasible policity π\pi, we conclude from Lemma 3 that

Therefore, the VI in (2.5) satisfies the generalized monotonicity. In the next few sections, we will exploit the generalized monotonicity and some other structural properties to design efficient algorithms for solving the RL problem.

Deterministic Policy Mirror Descent

In this section, we present the basic schemes of policy mirror descent (PMD) and establish their convergence properties.

In the proposed PMD methods, we will update a given policy π\pi to π+\pi^{+} through the following proximal mapping:

Here η>0\eta>0 denotes a certain stepsize (or learning rate), and GπG^{\pi} can be the operator for the VI formulation, e.g., Gπ(s,⋅)=Qπ(s,⋅)G^{\pi}(s,\cdot)=Q^{\pi}(s,\cdot) or its approximation.

It is well-known that one can solve (3.1) explicitly for some interesting special cases, e.g., when hp(s)=0h^{p}(s)=0 or hp(s)=τDπ0p(s)h^{p}(s)=\tau D_{\pi_{0}}^{p}(s) for some τ>0\tau>0 and given π0\pi_{0}. For both these cases, the solution of (3.1) boils down to solving a problem of the form

For more general convex functions hph^{p}, problem (3.1) usually does not have an explicit solution, and one can only solve it approximately. In fact, we will show in Section 6 that by applying the accelerated gradient descent method, we only need to compute a small number of updates in the form of (3.2) in order to approximately solve (3.1) without slowing down the efficiency of the overall PMD algorithms.

2 Basic PMD method

As shown in Algorithm 1, each iteration of the PMD method applies the prox-mapping step discussed in Subsection 3.1 to update the policy πk\pi_{k}. It involves the stepsize parameter ηk\eta_{k} and requires the selection of an initial point π0\pi_{0}. For the sake of simplicity, we will assume throughout the paper that

Observe also that we can replace Qπk(s,⋅)Q^{\pi_{k}}(s,\cdot) in (3.5) with Aπk(s,a)A^{\pi_{k}}(s,a) defined in (2.6) without impacting the updating of πk+1(s,⋅)\pi_{k+1}(s,\cdot), since this only introduces an extra constant into the objective function of (3.5).

Below we establish some general convergence properties about the PMD method. Different from the classic policy iteration or value iteration method used in Markov Decision Processes, our analysis does not rely on the contraction properties of the Bellman’s operator, but on the so-called three-point lemma associated with the optimality condition of problem (3.5) (see Lemma 4). Our analysis also significantly differs from the one for the classic mirror descent method in convex optimization (see, e.g., Chapter 3 of LanBook2020). First, the classic mirror descent method requires the convexity of the objective function, while the analysis of PMD utilizes the generalized monotonicity in Lemma 3. Second, the classic mirror descent utilizes the Lipschitz or smoothness properties of the objective function, while in the PMD method, we show the progress made in each iteration of this algorithm (see Lemma 5) by using the performance difference lemma (c.f., Lemma 2) and the three-point lemma (c.f., Lemma 4). As a result, we make no assumptions about the smoothness properties of the objective function at all.

The following result characterizes the optimality condition of problem (3.5) (see Lemma 3.5 of LanBook2020). We add a proof for the sake of completeness.

For any p(⋅∣s)∈Δ∣A∣p(\cdot|s)\in\Delta_{|{\cal A}|}, we have

where (h′)πk+1(h^{\prime})^{\pi_{k+1}} denotes the subgradient of hh at πk+1\pi_{k+1} and ∇Dπkπk+1(s,⋅)\nabla D_{\pi_{k}}^{\pi_{k+1}}(s,\cdot) denotes the gradient of Dπkπk+1(s)D_{\pi_{k}}^{\pi_{k+1}}(s) at πk+1\pi_{k+1}. Using the definition of Bregman’s distance, it is easy to verify that

The result then immediately follows by combining the above two relations together with (1.2).

It follows from Lemma 2 (with π′=πk+1\pi^{\prime}=\pi_{k+1}, π=πk\pi=\pi_{k} and τ=τk\tau=\tau_{k}) that

Combining the above two identities, we then obtain

Now we conclude from Lemma 4 applied to (3.5) with p(⋅∣s′)=πk(⋅∣s′)p(\cdot|s^{\prime})=\pi_{k}(\cdot|s^{\prime}) that

The previous two conclusions then clearly imply the result in (3.7). It also follows from (3.11) that

where the last inequality follows from the fact that dsπk+1(s)≥(1−γ)d_{s}^{\pi_{k+1}}(s)\geq(1-\gamma) due to the definition of dsπk+1d_{s}^{\pi_{k+1}} in (2.1). The result in (3.7) then follows immediately from (3.10) and the above inequality.

Now we show that with a constant stepsize rule, the PMD method can achieve a linear rate of convergence for solving RL problems with strongly convex regularizers (i.e., μ>0\mu>0).

Suppose that ηk=η\eta_{k}=\eta for any k≥0k\geq 0 in the PMD method with

By Lemma 4 applied to (3.5) (with ηk=η\eta_{k}=\eta and p=π∗p=\pi^{*}), we have

which, in view of (3.8), then implies that

Taking expectation w.r.t. ν∗\nu^{*} on both sides of the above inequality and using Lemma 3, we arrive at

Noting Vπk+1(s)−Vπk(s)=Vπk+1(s)−Vπ∗(s)−[Vπk(s)−Vπ∗(s)]V^{\pi_{k+1}}(s)-V^{\pi_{k}}(s)=V^{\pi_{k+1}}(s)-V^{\pi^{*}}(s)-[V^{\pi_{k}}(s)-V^{\pi^{*}}(s)] and rearranging the terms in the above inequality, we have

which, in view of the assumption (3.13) and the definition of ff in (1.9)

Applying this relation recursively and using the bound in (3.4) we then conclude the result.

According to Theorem 3.1, the PMD method converges linearly in terms of both function value and the distance to the optimal solution for solving RL problems with strongly convex regularizers. Now we show that a direct application of the PMD method only achieves a sublinear rate of convergence for the case when μ=0\mu=0.

Suppose that ηk=η\eta_{k}=\eta in the PMD method. Then we have

Taking the telescopic sum of the above inequalities and using the fact that Vπk+1(s)≤Vπk(s)V^{\pi_{k+1}}(s)\leq V^{\pi_{k}}(s) due to (3.7) , we obtain

which clearly implies the result in view of the definition of ff in (1.9) and the bound on Dπ0π∗D_{\pi_{0}}^{\pi^{*}} in (3.4).

The result in Theorem 3.2 shows that the PMD method requires O(1/(1−γ)ϵ){\cal O}(1/(1-\gamma)\epsilon) iterations to find an ϵ\epsilon-solution for general RL problems. This bound already matches, in terms of its dependence on (1−γ)(1-\gamma) and ϵ\epsilon, the previously best-known complexity for natural policy gradient methods AgarwalKakadeLeeeMhhajan2019. We will further enhance the PMD method so that it can achieve a linear rate of convergence for the case when μ=0\mu=0 in next subsection.

3 Approximate policy mirror descent method

In this subsection, we propose to enhance the basic PMD method by adding adaptively a perturbation term into the definition of the value functions or the proximal-mapping.

For some τ≥0\tau\geq 0 and a given initial policy π0(a∣s)>0\pi_{0}(a|s)>0, ∀s∈S,a∈A\forall s\in{\cal S},a\in{\cal A}, we define the perturbed action-value and state-value functions, respectively, by

Clearly, if τ=0\tau=0, then the perturbed value functions reduce to the usual value functions, i.e.,

The following result relates the value functions with different τ\tau.

For any given τ,τ′≥0\tau,\tau^{\prime}\geq 0, we have

As a consequence, if τ≥τ′≥0\tau\geq\tau^{\prime}\geq 0 then

By the definitions of VτπV_{\tau}^{\pi} and dsπd_{s}^{\pi}, we have

which together with the bound on Dπ0πD_{\pi_{0}}^{\pi} in (3.4) then imply (3.19).

As shown in Algorithm 2, the approximate policy mirror descent (APMD) method is obtained by replacing Qπk(s,⋅)Q^{\pi_{k}}(s,\cdot) with its approximation Qτkπk(s,⋅)Q_{\tau_{k}}^{\pi_{k}}(s,\cdot) and adding the perturbation τkDπ0π(st)\tau_{k}D_{\pi_{0}}^{\pi}(s_{t}) for the updating of πk+1\pi_{k+1} in the basic PMD method. As discussed in Subsection 3.1, the incorporation of the perturbation term does not impact the difficulty of solving the subproblem in (3.20). In fact, the APMD method can be viewed as a general form of the PMD method since it reduces to the PMD method when τk=0\tau_{k}=0. In fact, the perturbation parameter τk\tau_{k} used to define the action-value function Qτkπk(s,⋅)Q_{\tau_{k}}^{\pi_{k}}(s,\cdot) is not necessarily the same as the one used in the regularization term τkDπ0p(st)\tau_{k}D_{\pi_{0}}^{p}(s_{t}), yielding more flexibility to the design and analysis for this class of algorithms.

Our goal in the remaining part of this subsection is to show that the APMD method, when employed with proper selection of τk\tau_{k}, can achieve a linear rate of convergence for solving general RL problems. Note that in the classic mirror descent method, adding a perturbation term into the objective function usually would not improve its rate of convergence from sublinear to linear. However, the linear rate of convergence in PMD depends on the discount factor rather than the strongly convex modulus of the regularization term, which makes it possible for us to show a linear rate of convergence for the APMD method.

First we observe that Lemma 3 can still be applied to the perturbed value functions. The difference between the following result and Lemma 3 exists in that the RHS of (3.21) is no longer nonnegative, i.e., Vτπ(s)−Vτπ∗(s)≱0V_{\tau}^{\pi}(s)-V_{\tau}^{\pi^{*}}(s)\ngeqslant 0. However, this relation will be approximately satisfied if τ\tau is small enough.

The proof is the same as that for Lemma 3 except that we will apply the performance difference lemma (i.e., Lemma 2) to the perturbed value function VτπV_{\tau}^{\pi}.

Next we establish some general convergence properties about the APMD method. Lemma 8 below characterizes the optimal solution of (3.20) (see, e.g., Lemma 3.5 of LanBook2020).

Let πk+1(⋅∣s)\pi_{k+1}(\cdot|s) be defined in (3.20). For any p(⋅∣s)∈Δ∣A∣p(\cdot|s)\in\Delta_{|{\cal A}|}, we have

Lemma 9 below is similar to Lemma 5 for the PMD method.

By applying Lemma 2 to the perturbed value function VτπV_{\tau}^{\pi} and using an argument similar to (3.10), we can show that

Now we conclude from Lemma 8 with p(⋅∣s′)=πk(⋅∣s′)p(\cdot|s^{\prime})=\pi_{k}(\cdot|s^{\prime}) that

where the last inequality follows from the fact that dsπk+1(s)≥(1−γ)d_{s}^{\pi_{k+1}}(s)\geq(1-\gamma) due to the definition of dsπk+1d_{s}^{\pi_{k+1}} in (2.1). The result in (3.22) then follows immediately from (3.23) and the above inequality.

The following general result holds for different stepsize rules for APMD.

Suppose 1+ηkτk=1/γ1+\eta_{k}\tau_{k}=1/\gamma and τk≥τk+1\tau_{k}\geq\tau_{k+1} in the APMD method. Then for any k≥0k\geq 0, we have

Combining the above two relations, we obtain

Taking expectation w.r.t. ν∗\nu^{*} on both sides of the above inequality and using Lemma 7, we arrive at

Noting Vτkπk+1(s)−Vτkπk(s)=Vτkπk+1(s)−Vτkπ∗(s)−[Vτkπk(s)−Vτkπ∗(s)]V_{\tau_{k}}^{\pi_{k+1}}(s)-V_{\tau_{k}}^{\pi_{k}}(s)=V_{\tau_{k}}^{\pi_{k+1}}(s)-V_{\tau_{k}}^{\pi^{*}}(s)-[V_{\tau_{k}}^{\pi_{k}}(s)-V_{\tau_{k}}^{\pi^{*}}(s)] and rearranging the terms in the above inequality, we have

Using the above inequality, the assumption τk≥τk+1\tau_{k}\geq\tau_{k+1} and (3.19), we have

which implies the result by the assumption 1+ηkτk=1/γ1+\eta_{k}\tau_{k}=1/\gamma.

We are now ready to establish the rate of convergence of the APMD method with dynamic stepsize rules to select ηk\eta_{k} and τk\tau_{k} for solving general RL problems.

Suppose that τk=τ0γk\tau_{k}=\tau_{0}\gamma^{k} for some τ0≥0\tau_{0}\geq 0 and that 1+ηkτk=1/γ1+\eta_{k}\tau_{k}=1/\gamma for any k≥0k\geq 0 in the APMD method. Then for any k≥0k\geq 0, we have

Applying the result in Lemma 10 recursively, we have

Noting that Vτkπk(s)≥Vπk(s)V_{\tau_{k}}^{\pi_{k}}(s)\geq V^{\pi_{k}}(s), Vτkπ∗(s)≤Vπ∗(s)+τk1−γlog⁡∣A∣V_{\tau_{k}}^{\pi^{*}}(s)\leq V^{\pi^{*}}(s)+\tfrac{\tau_{k}}{1-\gamma}\log|{\cal A}|, and Vτ0π∗(s)≥Vπ∗(s)V_{\tau_{0}}^{\pi^{*}}(s)\geq V^{\pi^{*}}(s) due to (3.18), and that Vτ0π0(s)=Vπ0(s)V_{\tau_{0}}^{\pi_{0}}(s)=V^{\pi_{0}}(s) due to Dπ0π0(s)=0D_{\pi_{0}}^{\pi_{0}}(s)=0, we conclude from the previous inequality that

The result in (3.29) immediately follows from the above relation, the definition of ff in (1.9), and the selection of τk\tau_{k}.

According to (3.29), if τ0\tau_{0} is a constant, then the rate of convergence of the APMD method is O(kγk){\cal O}(k\gamma^{k}). If the total number of iterations kk is given a priori, we can improve the rate of convergence to O(γk){\cal O}(\gamma^{k}) by setting τ0=1/k\tau_{0}=1/k. Below we propose a different way to specify τk\tau_{k} for the APMD method so that it can achieve this O(γk){\cal O}(\gamma^{k}) rate of convergence without fixing kk a priori.

We first establish a technical result that will also be used later for the analysis of stochastic PMD methods.

Assume that the nonnegative sequences {Xk}k≥0,{Yk}k≥0\{X_{k}\}_{k\geq 0},\{Y_{k}\}_{k\geq 0} and {Zk}k≥0\{Z_{k}\}_{k\geq 0} satisfy

Let us denote l=⌈log⁡γ14⌉l=\left\lceil\log_{\gamma}\tfrac{1}{4}\right\rceil. If Yk=Y⋅2−(⌊k/l⌋+1)Y_{k}=Y\cdot 2^{-(\lfloor k/l\rfloor+1)} and Zk=Z⋅2−(⌊k/l⌋+2)Z_{k}=Z\cdot 2^{-(\lfloor k/l\rfloor+2)} for some Y≥0Y\geq 0 and Z≥0Z\geq 0, then

Let us group the indices {0,…,k}\{0,\ldots,k\} into pˉ≡⌊k/l⌋+1\bar{p}\equiv\lfloor k/l\rfloor+1 epochs with each of the first pˉ−1\bar{p}-1 epochs consisting of ll iterations. Let p=0,…,pˉp=0,\ldots,\bar{p} be the epoch indices. We first show that for any p=0,…,pˉ−1p=0,\ldots,\bar{p}-1,

This relation holds obviously for p=0p=0. Let us assume that (3.33) holds at the beginning of epoch pp ad examine the progress made in epoch pp. Note that for any indices k=pl,…,(p+1)l−1k=pl,\ldots,(p+1)l-1 in epoch pp, we have Yk=Y⋅2−(p+1)Y_{k}=Y\cdot 2^{-(p+1)} and Z=Z⋅2−(p+2)Z=Z\cdot 2^{-(p+2)}. By applying (3.31) recursively, we have

where the second inequality follows from the definition of ZplZ_{pl} and γl≥0\gamma^{l}\geq 0, the third one follows from γl≤1/4\gamma^{l}\leq 1/4, the fourth one follows by induction hypothesis, and the last one follows by regrouping the terms. Since k=(pˉ−1)l+k(modl)k=(\bar{p}-1)l+k\pmod{l}, we have

We are now ready to present a more convenient selection of τk\tau_{k} and ηk\eta_{k} for the APMD method.

Let us denote l:=⌈log⁡γ14⌉.l:=\left\lceil\log_{\gamma}\tfrac{1}{4}\right\rceil. If τk=2−(⌊k/l⌋+1)\tau_{k}=2^{-(\lfloor k/l\rfloor+1)} and 1+ηkτk=1/γ1+\eta_{k}\tau_{k}=1/\gamma, then

Noting that Vτkπk(s)≥Vπk(s)V_{\tau_{k}}^{\pi_{k}}(s)\geq V^{\pi_{k}}(s), Vτkπ∗(s)≤Vπ∗(s)+τk1−γlog⁡∣A∣V_{\tau_{k}}^{\pi^{*}}(s)\leq V^{\pi^{*}}(s)+\tfrac{\tau_{k}}{1-\gamma}\log|{\cal A}|, Vτ0π∗(s)≥Vπ∗(s)V_{\tau_{0}}^{\pi^{*}}(s)\geq V^{\pi^{*}}(s) due to (3.18), and that Vτ0π0(s)=Vπ0(s)V_{\tau_{0}}^{\pi_{0}}(s)=V^{\pi_{0}}(s) due to Dπ0π0(s)=0D_{\pi_{0}}^{\pi_{0}}(s)=0, we conclude from the previous inequality and the definition of τk\tau_{k} that

In view of Theorem 3.4, a policy πˉ\bar{\pi} s.t. f(πˉ)−f(π∗)≤ϵf(\bar{\pi})-f(\pi^{*})\leq\epsilon will be found in at most O(log⁡(1/ϵ)){\cal O}(\log(1/\epsilon)) epochs and hence at most O(llog⁡(1/ϵ))=O(log⁡γ(ϵ)){\cal O}(l\log(1/\epsilon))={\cal O}(\log_{\gamma}(\epsilon)) iterations, which matches the one for solving RL problems with strongly convex regularizers. However, for general RL problems, we cannot guarantee the linear convergence of Dπk+1π∗(s)D_{\pi_{k+1}}^{\pi^{*}}(s) since its coefficient τk\tau_{k} will become very small eventually. By using the continuity of the objective function and the compactness of the feasible set, we can possibly show that the solution sequence converges to the true optimal policy asymptotically as the number of iterations increases. On the other hand, the rate of convergence associated with the solution sequence of the PMD method for general RL problems cannot be established unless more structural properties of the RL problems can be further explored.

Stochastic Policy Mirror Descent

The policy mirror descent methods described in the previous section require the input of the exact action-value functions QπkQ^{\pi_{k}}. This requirement can hardly be satisfied in practice even for the case when P{\cal P} is given explicitly, since QπkQ^{\pi_{k}} is defined as an infinite sum. In addition, in RL one does not know the transition dynamics P{\cal P} and thus only stochastic estimators of action-value functions are available. In this section, we propose stochastic versions for the PMD and APMD methods to address these issues.

In this subsection, we assume that for a given policy πk\pi_{k}, there exists a stochastic estimator Qπk,ξk{\cal Q}^{\pi_{k},\xi_{k}} s.t.

for some σk≥\sigma_{k}\geq and ςk≥0\varsigma_{k}\geq 0, where ξk\xi_{k} denotes the random vector used to generate the stochastic estimator Qπk,ξk{\cal Q}^{\pi_{k},\xi_{k}}. Clearly, if σk=0\sigma_{k}=0, then we have exact information about QπkQ^{\pi_{k}}. One key insight we have for the stochastic PMD methods is to handle separately the bias term ςk\varsigma_{k} from the overall expected error term σk\sigma_{k}, because one can reduce the bias term much faster than the total error. This makes the analysis of the stochastic PMD method considerably different from that of the classic stochastic mirror descent method. While in this section we focus on the convergence analysis of the algorithms, we will show in next section that such separate treatment of bias and total error enables us to substantially improve the sampling complexity for solving RL problems by using policy gradient type methods.

The stochastic policy mirror descent (SPMD) is obtained by replacing QπkQ^{\pi_{k}} in (3.5) with its stochastic estimator Qπk,ξk{\cal Q}^{\pi_{k},\xi_{k}}, i.e.,

In the sequel, we denote ξ⌈k⌉\xi_{\lceil k\rceil} the sequence of random vectors ξ0,…,ξk\xi_{0},\ldots,\xi_{k} and define

By using the assumptions in (4.1) and (4.3) and the decomposition

Similar to Lemma 5, below we show some general convergence properties about the SPMD method. Unlike PMD, SPMD does not guarantee the non-increasing property of Vπk(s)V^{\pi_{k}}(s) anymore.

Observe that (3.10) still holds, and hence that

where the first inequality follows from Young’s inequality and the second one follows from the strong convexity of Dπk+1πkD_{\pi_{k+1}}^{\pi_{k}} w.r.t. to ∥⋅∥1\|\cdot\|_{1}. Moreover, we conclude from Lemma 4 applied to (4.4) with QπkQ^{\pi_{k}} replaced by Qπk,ξk{\cal Q}^{\pi_{k},\xi_{k}} and p(⋅∣s′)=πk(⋅∣s′)p(\cdot|s^{\prime})=\pi_{k}(\cdot|s^{\prime}) that

where the last inequality follows from the fact that dsπk+1(s)≥1−γd_{s}^{\pi_{k+1}}(s)\geq 1-\gamma due to the definition of dsπk+1d_{s}^{\pi_{k+1}} in (2.1). The result in (4.7) then follows immediately from (4.8) and the above inequality.

We now establish an important recursion about the SPMD method.

By applying Lemma 4 to (3.5) (with QπkQ^{\pi_{k}} replaced by Qπk,ξk{\cal Q}^{\pi_{k},\xi_{k}} and p=π∗p=\pi^{*}), we have

which, in view of (4.7), then implies that

Taking expectation w.r.t. ξ⌈k⌉\xi_{\lceil k\rceil} and ν∗\nu^{*} on both sides of the above inequality, and using Lemma 3 and the relation in (4.6), we arrive at

Noting Vπk+1(s)−Vπk(s)=Vπk+1(s)−Vπ∗(s)−[Vπk(s)−Vπ∗(s)]V^{\pi_{k+1}}(s)-V^{\pi_{k}}(s)=V^{\pi_{k+1}}(s)-V^{\pi^{*}}(s)-[V^{\pi_{k}}(s)-V^{\pi^{*}}(s)], rearranging the terms in the above inequality, and using the definition of ff in (1.9), we arrive at the result.

We are now ready to establish the convergence rate of the SPMD method. We start with the case when μ>0\mu>0 and state a constant stepsize rule which requires both ςk\varsigma_{k} and σk\sigma_{k}, k≥0k\geq 0, to be small enough to guarantee the convergence of the SPMD method.

Suppose that ηk=η=1−γγμ\eta_{k}=\eta=\tfrac{1-\gamma}{\gamma\mu} in the SPMD method. If ςk=2−(⌊k/l⌋+2)\varsigma_{k}=2^{-(\lfloor k/l\rfloor+2)} and σk2=2−(⌊k/l⌋+2)\sigma_{k}^{2}=2^{-(\lfloor k/l\rfloor+2)} for any k≥0k\geq 0 with l:=⌈log⁡γ(1/4)⌉l:=\left\lceil\log_{\gamma}(1/4)\right\rceil, then

By Lemma 13 and the selection of η\eta, we have

We now turn our attention to the convergence properties of the SPMD method for the case when μ=0\mu=0.

Suppose that ηk=η\eta_{k}=\eta for any k≥0k\geq 0 in the SPMD method. If ςk≤ς\varsigma_{k}\leq\varsigma and σk≤σ\sigma_{k}\leq\sigma for any k≥0k\geq 0, then we have

where RR denotes a random number uniformly distributed between 11 and kk. In particular, if the number of iterations kk is given a priori and η=(2(1−γ)log⁡∣A∣kσ2)1/2\eta=(\tfrac{2(1-\gamma)\log|{\cal A}|}{k\sigma^{2}})^{1/2}, then

By Lemma 13 and the fact that μ=0\mu=0, we have

Taking the telescopic sum of the above relations, we have

Dividing both sides by (1−γ)k(1-\gamma)k and using the definition of RR, we obtain the result in (4.10).

We add some remarks about the results in Theorem 4.2. In comparison with the convergence results of SPMD for the case μ>0\mu>0, there exist some possible shortcomings for the case when μ=0\mu=0. Firstly, one needs to output a randomly selected πR\pi_{R} from the trajectory. Secondly, since the first term in (4.11) converges sublinearly, one has to update πk+1\pi_{k+1} at least O(1/ϵ){\cal O}(1/\epsilon) times, which may also impact the gradient complexity of computing ∇hπ\nabla h^{\pi} if πk+1\pi_{k+1} cannot be computed explicitly. We will address these issues by developing the stochastic APMD method in next subsection.

2 Stochastic approximate policy mirror descent

The stochastic approximate policy mirror descent (SAPMD) method is obtained by replacing QτkπkQ_{\tau_{k}}^{\pi_{k}} in (3.20) with its stochastic estimator Qτkπk,ξk{\cal Q}_{\tau_{k}}^{\pi_{k},\xi_{k}}. As such, its updating formula is given by

With a little abuse of notation, we still denote δk:=Qτkπk,ξk−Qτkπk\delta_{k}:={\cal Q}_{\tau_{k}}^{\pi_{k},\xi_{k}}-Q_{\tau_{k}}^{\pi_{k}} and assume that

for some σk≥\sigma_{k}\geq and ςk≥0\varsigma_{k}\geq 0. Similarly to (4.6) we have

Lemma 14 and Lemma 15 below show the improvement for each SAPMD iteration.

The proof is similar to the one for Lemma 12 except that we will apply Lemma 2 to the perturbed value functions VτkπV_{\tau_{k}}^{\pi} instead of VπV^{\pi}.

If 1+ηkτk=1/γ1+\eta_{k}\tau_{k}=1/\gamma and τk≥τk+1\tau_{k}\geq\tau_{k+1} in the SAPMD method, then for any k≥0k\geq 0,

By Lemma 8 with p=π∗p=\pi^{*} and QτkπkQ_{\tau_{k}}^{\pi_{k}} replaced by Qτkπk,ξk{\cal Q}_{\tau_{k}}^{\pi_{k},\xi_{k}}, we have

Taking expectation w.r.t. ξ⌈k⌉\xi_{\lceil k\rceil} and ν∗\nu^{*} on both sides of the above inequality, and using Lemma 7 and the relation in (4.16), we arrive at

Noting Vτkπk+1(s)−Vτkπk(s)=Vτkπk+1(s)−Vτkπ∗(s)−[Vτkπk(s)−Vτkπ∗(s)]V_{\tau_{k}}^{\pi_{k+1}}(s)-V_{\tau_{k}}^{\pi_{k}}(s)=V_{\tau_{k}}^{\pi_{k+1}}(s)-V_{\tau_{k}}^{\pi^{*}}(s)-[V_{\tau_{k}}^{\pi_{k}}(s)-V_{\tau_{k}}^{\pi^{*}}(s)] and rearranging the terms in the above inequality, we have

which, in view of the assumption τk≥τk+1\tau_{k}\geq\tau_{k+1} and (3.19), then implies that

The result then immediately follows from the assumption that 1+ηkτk=1/γ1+\eta_{k}\tau_{k}=1/\gamma.

We are now ready to establish the convergence of the SAPMD method.

Suppose that ηk=1−γγτk\eta_{k}=\tfrac{1-\gamma}{\gamma\tau_{k}} in the SAPMD method. If τk=1γlog⁡∣A∣2−(⌊k/l⌋+1)\tau_{k}=\tfrac{1}{\sqrt{\gamma\log|{\cal A}|}}2^{-(\lfloor k/l\rfloor+1)}, ςk=2−(⌊k/l⌋+2)\varsigma_{k}=2^{-(\lfloor k/l\rfloor+2)}, and σk2=4−(⌊k/l⌋+2)\sigma_{k}^{2}=4^{-(\lfloor k/l\rfloor+2)} with l:=⌈log⁡γ(1/4)⌉l:=\left\lceil\log_{\gamma}(1/4)\right\rceil, then

By Lemma 15 and the selection of τk,ςk\tau_{k},\varsigma_{k} and σk\sigma_{k}, we have

Noting that Vτkπk(s)≥Vπk(s)V_{\tau_{k}}^{\pi_{k}}(s)\geq V^{\pi_{k}}(s), Vτkπ∗(s)≤Vπ∗(s)+τk1−γlog⁡∣A∣V_{\tau_{k}}^{\pi^{*}}(s)\leq V^{\pi^{*}}(s)+\tfrac{\tau_{k}}{1-\gamma}\log|{\cal A}|, Vτ0π∗(s)≥Vπ∗(s)V_{\tau_{0}}^{\pi^{*}}(s)\geq V^{\pi^{*}}(s) due to (3.18), and that Vτ0π0(s)=Vπ0(s)V_{\tau_{0}}^{\pi_{0}}(s)=V^{\pi_{0}}(s) due to Dπ0π0(s)=0D_{\pi_{0}}^{\pi_{0}}(s)=0, we conclude from the previous inequality and the definition of τk\tau_{k} that

from which the result immediately follows.

A few remarks about the convergence of the SAPMD method are in place.

First, in view of Theorem 4.3, the SAPMD method does not need to randomly output a solution as most existing nonconvex stochastic gradient descent methods did. Instead, the linear rate of convergence in (4.20) has been established for the last iterate πk\pi_{k} generated by this algorithm. The convergence for the last iterate indicates that the SAMPD method will continuously improve the policy deployed by the system for implementation and evaluation. This is not the case for the convergence of the average or random iterate, since the average iterate will not be implemented and evaluated, and the convergence of the random iterate does not warrant continuous improvement of the generated policies.

Second, both Theorems 4.1 and 4.3 allow us to establish some strong large-deviation properties associated with the convergence of SPMD and SAPMD. Let us focus on the SAPMD method. For a given confidence level λ∈(0,1)\lambda\in(0,1) and accuracy level ϵ>0\epsilon>0, if the number of iterations kk satisfies

then by (4.20) and Markov’s inequality, we have

In other words, with probability greater than 1−λ1-\lambda, we have f(πk)−f(π∗)≤ϵf(\pi_{k})-f(\pi^{*})\leq\epsilon. On the other hand, it is more difficult to derive a similar large deviation result for SPMD directly applied to unregularized problems (c.f. Theorem 4.2). Due to the sublinear rate of convergence and random selection of output, we need to run the algorithm for a few times to general several candidate solutions and apply a post-optimization procedure to choose from these candidate solutions in order to improve the the reliability of the algorithm (see Chapter 6 of LanBook2020 for more discussions).

Stochastic Estimation for Action-value Functions

In this section, we discuss the estimation of the action-value functions QπQ^{\pi} or QτπQ^{\pi}_{\tau} through two different approaches. In Subsection 5.1, we assume the existence of a generative model for the Markov Chains so that we can estimate value functions by generating multiple independent trajectories starting from an arbitrary pair of state and action. In Subsection 5.2, we consider a more challenging setting where we only have access to a single trajectory observed when the dynamic system runs online. In this case, we employ and enhance the conditional temporal difference (CTD) method recently developed in KotsalisLanLi2020PartII to estimate value functions. Throughout the section we assume that

In the multiple trajectory setting, starting from state-action pair (s,a)(s,a) and following policy πk\pi_{k}, we can generate MkM_{k} independent trajectories of length TkT_{k}, denoted by

Let ξk:={ζki(s,a),i=1,…,Mk,s∈S,a∈A}\xi_{k}:=\{\zeta_{k}^{i}(s,a),i=1,\ldots,M_{k},s\in{\cal S},a\in{\cal A}\} denote all these random variables. We can estimate QπkQ^{\pi_{k}} in the SPMD method by

We can show that Qπk,ξk{\cal Q}^{\pi_{k},\xi_{k}} satisfy (4.1)-(4.3) with

for some absolute constant κ>0\kappa>0 (see Proposition 7 in the Appendix). By choosing TkT_{k} and MkM_{k} properly, we can show the convergence of the SPMD method employed with different stepsize rules as stated in Theorems 4.1 and 4.2.

Suppose that ηk=1−γγμ\eta_{k}=\tfrac{1-\gamma}{\gamma\mu} in the SPMD method. If TkT_{k} and MkM_{k} are chosen such that

Using the fact that γl≤1/4\gamma^{l}\leq 1/4, we can easily check from (5.3) and the selection of TkT_{k} and MkM_{k} that (4.1)-(4.3) hold with ςk=2−(⌊k/l⌋+2)\varsigma_{k}=2^{-(\lfloor k/l\rfloor+2)} and σk2=2−(⌊k/l⌋+2)\sigma_{k}^{2}=2^{-(\lfloor k/l\rfloor+2)}. Suppose that an ϵ\epsilon-solution πˉ\bar{\pi} will be found at the kˉ\bar{k} iteration. By (4.9), we have

which implies that the number of iterations is bounded by O(l⌊kˉ/l⌋)=O(log⁡γϵ){\cal O}(l\lfloor\bar{k}/l\rfloor)={\cal O}(\log_{\gamma}\epsilon). Moreover by the definition of TkT_{k} and MkM_{k}, the total number of samples is bounded by

Below we discuss the sampling complexities of SPMD and SAPMD for solving RL problems with general convex regularizers.

We can easily check from (5.3) and the selection of TkT_{k} and MkM_{k} that (4.1)-(4.3) holds with ςk=ϵ/3\varsigma_{k}=\epsilon/3 and σk2=2(ϵ232+2(cˉ+hˉ)2(1−γ)2)\sigma_{k}^{2}=2(\tfrac{\epsilon^{2}}{3^{2}}+\tfrac{2(\bar{c}+\bar{h})^{2}}{(1-\gamma)^{2}}). Using these bounds in (4.10), we conclude that an ϵ\epsilon-solution will be found in at most

iterations. Moreover, the total number of samples is bounded by ∣S∣∣A∣Tkˉ|{\cal S}||{\cal A}|T\bar{k} and hence by (5.5).

We can also establish the iteration and sampling complexities of the SAPMD method, in which we estimate QτkπkQ_{\tau_{k}}^{\pi_{k}} by

Since τ0≥τk\tau_{0}\geq\tau_{k}, similar to (5.3), we can show that Qτkπk,ξk{\cal Q}_{\tau_{k}}^{\pi_{k},\xi_{k}} satisfy (4.13)-(4.15) with

Suppose that ηk=1−γγτk\eta_{k}=\tfrac{1-\gamma}{\gamma\tau_{k}} and τk=1γlog⁡∣A∣2−(⌊k/l⌋+1)\tau_{k}=\tfrac{1}{\sqrt{\gamma\log|{\cal A}|}}2^{-(\lfloor k/l\rfloor+1)} in the SAPMD method. If TkT_{k} and MkM_{k} are chosen such that

Using the fact that γl≤1/4\gamma^{l}\leq 1/4, we can easily check from (5.7) and the selection of TkT_{k} and MkM_{k} that (4.13)-(4.15) hold with ςk=2−(⌊k/l⌋+2)\varsigma_{k}=2^{-(\lfloor k/l\rfloor+2)} and σk2=4−(⌊k/l⌋+2)\sigma_{k}^{2}=4^{-(\lfloor k/l\rfloor+2)}. Suppose that an ϵ\epsilon-solution πˉ\bar{\pi} will be found at the kˉ\bar{k} iteration. By (4.20), we have

which implies that the number of iterations is bounded by O(l⌊kˉ/l⌋)=O(log⁡γϵ){\cal O}(l\lfloor\bar{k}/l\rfloor)={\cal O}(\log_{\gamma}\epsilon). Moreover by the definition of TkT_{k} and MkM_{k}, the number of samples is bounded by

2 Conditional temporal difference

In this subsection, we enhance a recently developed temporal different (TD) type method, i.e., conditional temporal difference (CTD) method, and use it to estimate the action-value functions in an online manner. We focus on estimating QπQ^{\pi} in SPMD since the estimation of QτπQ^{\pi}_{\tau} in SAPMD is similar.

For a given policy π\pi, we denote the Bellman operator

The action value function QπQ^{\pi} corresponding to policy π\pi satisfies the Bellman equation

We make the following assumptions about policy π\pi: (a) ν(π)(s)≥ν‾\nu(\pi)(s)\geq\underline{\nu} for some ν‾>0\underline{\nu}>0, which holds when the Markov chain employed with policy π\pi has a single ergodic class with unique stationary distribution, i.e., ν(π)=ν(π)Pπ\nu(\pi)=\nu(\pi){\cal P}^{\pi}; and (b) π\pi is sufficiently random, i.e., π(s,a)≥π‾\pi(s,a)\geq\underline{\pi} for some π‾>0\underline{\pi}>0, which can be enforced, for example, by adding some corresponding constraints through hπh^{\pi}.

Note that Assumption 1.a) is widely accepted for evaluating policies using TD type methods in the RL literature, and that Assumption 1.b) requires that π\pi assigns a non-zero probability to each action. We will discuss how to possibly relax these assumptions, especially Assumption 1.b) later in Remark 1.

In view of Assumption 1 we have Mπ≻0M^{\pi}\succ 0. With this weighting matrix MπM^{\pi}, we define the operator FπF^{\pi} as

where TπT^{\pi} is the Bellman operator defined in (5.9). Our goal is to find the root θ∗≡Qπ\theta^{*}\equiv Q^{\pi} of F(θ)F(\theta), i.e., F(θ∗)=0F(\theta^{*})=0. We can show that FF is strongly monotone with strong monotonicity modulus bounded from below by Λmin⁡:=(1−γ)λmin⁡(Mπ).\Lambda_{\min}:=(1-\gamma)\lambda_{\min}(M^{\pi}). Here λmin⁡(A)\lambda_{\min}(A) denotes the smallest eigenvalue of AA. It can also be easily seen that FπF^{\pi} is Lipschitz continuous with Lipschitz constant bounded by Λmax⁡:=(1−γ)λmax⁡(Mπ),\Lambda_{\max}:=(1-\gamma)\lambda_{\max}(M^{\pi}), where λmax⁡(A)\lambda_{\max}(A) denotes the largest eigenvalue of AA.

The following result can be shown similarly to Lemma 4.1 of KotsalisLanLi2020PartII.

The following result has been shown in Proposition 6.2 of KotsalisLanLi2020PartII.

If the algorithmic parameters in CTD are chosen such that

with t0=8max⁡{Λmax⁡2,8(1+γ)2}/Λmin⁡2t_{0}=8\max\{\Lambda_{\max}^{2},8(1+\gamma)^{2}\}/\Lambda_{\min}^{2}, then

Suppose that the algorithmic parameters in CTD are set according to Lemma 17. Then we have

We are now ready to establish the convergence of the SMPD method by using the CTD method to estimate the action-value functions. We focus on the case when μ>0\mu>0, and the case for μ=0\mu=0 can be shown similarly.

Suppose that ηk=1−γγμ\eta_{k}=\tfrac{1-\gamma}{\gamma\mu} in the SPMD method. If the initial point of CTD is set to θ1=0\theta_{1}=0 and the number of iterations TT and the parameter α\alpha in CTD are set to

Using the fact that γl≤1/4\gamma^{l}\leq 1/4, we can easily check from Lemma 17, Lemma 18, and the selection of TT and α\alpha that (4.1)-(4.3) hold with ςk=2−(⌊k/l⌋+2)\varsigma_{k}=2^{-(\lfloor k/l\rfloor+2)} and σk2=2−(⌊k/l⌋+2)\sigma_{k}^{2}=2^{-(\lfloor k/l\rfloor+2)}. Suppose that an ϵ\epsilon-solution πˉ\bar{\pi} will be found at the kˉ\bar{k} iteration. By (4.9), we have

which implies that the number of iterations is bounded by O(l⌊kˉ/l⌋)=O(log⁡γϵ){\cal O}(l\lfloor\bar{k}/l\rfloor)={\cal O}(\log_{\gamma}\epsilon). Moreover by the definition of TkT_{k} and αk\alpha_{k}, the number of samples is bounded by

The following result shows the convergence properties of the SAMPD method when the action-value function is estimated by using the CTD method.

Suppose that ηk=1−γγτk\eta_{k}=\tfrac{1-\gamma}{\gamma\tau_{k}} and τk=1γlog⁡∣A∣2−(⌊k/l⌋+1)\tau_{k}=\tfrac{1}{\sqrt{\gamma\log|{\cal A}|}}2^{-(\lfloor k/l\rfloor+1)} in the SAPMD method. If the initial point of CTD is set to θ1=0\theta_{1}=0, the number of iterations TT is set to

The proof is similar to that of Proposition 4 except that we will show that (4.1)-(4.3) hold with ςk=2−(⌊k/l⌋+2)\varsigma_{k}=2^{-(\lfloor k/l\rfloor+2)} and σk2=4−(⌊k/l⌋+2)\sigma_{k}^{2}=4^{-(\lfloor k/l\rfloor+2)}. Moreover, we will use (4.20) instead of (4.9) to bound the number of iterations.

To the best of our knowledge, the complexity result in (5.16) is new in the RL literature, while the one in (5.18) is new for policy gradient type methods. It seems that this bound significantly improves the previously best-known O(1/ϵ3){\cal O}(1/\epsilon^{3}) sampling complexity result for stochastic policy gradient methods (see Xu2020ImprovingSC and Appendix C of Khodadadian2021 for more explanation).

In this subsection we focus on the more restrictive assumption Mπ≻0M^{\pi}\succ 0 in order to compare our results with the existing ones in the literature. Here we discuss how one can possibly relax this assumption.

An alternative approach that can relax Assumption 1.b), would be to first run the enhanced CTD method to the following equation

to evaluate the state-value function VπV^{\pi}. Then we estimate the action-value function QπQ^{\pi} by using (1.5), i.e.,

In order to use the above identity, we need to define an estimator of P(s′∣s,a){\cal P}(s^{\prime}|s,a) by using a uniform policy π0(⋅∣s):={1/∣A∣,…,1/∣A∣}\pi_{0}(\cdot|s):=\{1/|A|,\ldots,1/|A|\}. The sample size required to estimate the transition kernel from a single trajectory is an active research topic (see WolferKonttorovich20 and references therein). Current research has been focused only on bounding on the total error for estimating P(s′∣s,a){\cal P}(s^{\prime}|s,a) for a given sample size, and there do not exist separate and tighter bounds on the bias for these estimators. Therefore, it is still not evident whether the same sampling complexity bounds in Propositions 4 and 5 can be maintained using this alternative approach to relax the assumption of non-zero probability to each action.

For problems of high dimension (i.e., n≡∣S∣×∣A∣n\equiv|{\cal S}|\times|{\cal A}| is large), one often resorts to a parametric approximation of the value function. In this case it is possible to define a more general operator Fπ(θ):=ΦTMπ(Φθ−TπΦθ)F^{\pi}(\theta):=\Phi^{T}M^{\pi}\big(\Phi\theta-T^{\pi}\Phi\theta\big) for some feature matrix Φ\Phi to evaluate the value functions (see Section 4 of KotsalisLanLi2020PartII for a discussion about CTD with function approximation). Unless the column space of Φ\Phi spans the true value functions, an additional bias term will be introduced into the computation of gradients, resulting into an extra error term in the overall rate of convergence of PMD methods. In other words, these methods can only be guaranteed to converge to a neighborhood of the optimal solution. Nevertheless, the application of function approximation will significantly reduce the dependence of gradient computation on the problem dimension, i.e., from ∣S∣×∣A∣|{\cal S}|\times|{\cal A}| to the number of columns of Φ\Phi.

Efficient Solution for General Subproblems

In this section, we study the convergence properties of the PMD methods for the situation where we do not have exact solutions for prox-mapping subprobems. Throughout this section, we assume that hπh^{\pi} is differentiable and its gradients are Lipschitz continuous with Lipschitz constant LL. We will first review Nesterov’s accelerated gradient descent (AGD) method Nest83-1, and then discuss the overall gradient complexity of using this method for solving prox-mapping in the PMD methods. We will focus on the stochastic PMD methods since they cover deterministic methods as certain special cases.

Let us denote X≡Δ∣A∣X\equiv\Delta_{|{\cal A}|} and consider the problem of

for some μχ≥0\mu_{\chi}\geq 0. Given (xt−1,yt−1)∈X×X(x_{t-1},y_{t-1})\in X\times X, the accelerated gradient method performs the following updates:

for some qt∈q_{t}\in, rt≥0r_{t}\geq 0, and ρt∈\rho_{t}\in .

Below we slightly generalize the convergence results for the AGD method so that they depend on the distance Dx0xD_{x_{0}}^{x} rather than Φ(y0)−Φ(x)\Phi(y_{0})-\Phi(x) for any x∈Xx\in X. This result better fits our need to analyze the convergence of inexact SPMD and SAPMD methods in the next two subsections.

Let us denote μΦ:=μϕ+μχ\mu_{\Phi}:=\mu_{\phi}+\mu_{\chi} and t0:=⌊2Lϕ/μΦ−1⌋t_{0}:=\lfloor 2\sqrt{L_{\phi}/\mu_{\Phi}}-1\rfloor. If

Using the discussions in Corollary 3.5 of LanBook2020 (and the possible strong convexity of χ\chi), we can check that the conclusions in Theorems 3.6 and 3.7 of LanBook2020 hold for the AGD method applied to problem (6.1). It then follows from Theorem 3.6 of LanBook2020 that

Moreover, it follows from Theorem 3.7 of LanBook2020 that for any t≥t0t\geq t_{0},

where the last inequality follows from (6.7) (with t=t0t=t_{0}) and the facts that

for any 2≤t≤t02\leq t\leq t_{0}. The result then follows by combining these observations.

2 Convergence of inexact SPMD

In this subsection, we study the convergence properties of the SPMD method when its subproblems are solved inexactly by using the AGD method (see Algorithm 4). Observe that we use the same initial point π0\pi_{0} whenever calling the AGD method. To use a dynamic initial point (e.g., vkv_{k}) will make the analysis more complicated since we do not have a uniform bound on the KL divergence DvkπD_{v_{k}}^{\pi} for an arbitrary vkv_{k}. To do so probably will require us to use other distance generating functions than the entropy function.

In the sequel, we will denote εk≡ε(Tk)\varepsilon_{k}\equiv\varepsilon(T_{k}) to simplify notations. The following result will take place of Lemma 4 in our convergence analysis.

It follows from Lemma 19 (with μΦ=1+μηk\mu_{\Phi}=1+\mu\eta_{k} and Lϕ=LL_{\phi}=L) that

Using the definition of Φk\Phi_{k}, we have

which proves (6.9). Setting π=πk\pi=\pi_{k} and π=πk+1\pi=\pi_{k+1} respectively, in the above conclusion, we obtain

Then (6.10) follows by combining these two inequalities.

where the last inequality follows from the fact that dsπk+1(s)≥(1−γ)d_{s}^{\pi_{k+1}}(s)\geq(1-\gamma) due to the definition of dsπk+1d_{s}^{\pi_{k+1}} in (2.1). The result in (6.11) then follows immediately from (6.12) and the above inequality.

We now establish an important recursion about the inexact SPMD method in Algorithm 4.

Suppose that ηk=η=1−γγμ\eta_{k}=\eta=\tfrac{1-\gamma}{\gamma\mu} and εk≤εk−1\varepsilon_{k}\leq\varepsilon_{k-1} for any k≥0k\geq 0 in the inexact SPMD method, we have

which, in view of (4.7), then implies that

Taking expectation w.r.t. ξ⌈k⌉\xi_{\lceil k\rceil} and ν∗\nu^{*} on both sides of the above inequality, and using Lemma 3 and the relation in (4.6), we arrive at

Noting Vπk+1(s)−Vπk(s)=Vπk+1(s)−Vπ∗(s)−[Vπk(s)−Vπ∗(s)]V^{\pi_{k+1}}(s)-V^{\pi_{k}}(s)=V^{\pi_{k+1}}(s)-V^{\pi^{*}}(s)-[V^{\pi_{k}}(s)-V^{\pi^{*}}(s)], rearranging the terms in the above inequality, and using the definition of ff in (1.9), we arrive at

The result then follows immediately by the selection of η\eta and the assumption εk≤εk−1\varepsilon_{k}\leq\varepsilon_{k-1}.

We now are now ready to state the convergence rate of the SPMD method with inexact prox-mapping. We focus on the case when μ>0\mu>0.

Suppose that ηk=η=1−γγμ\eta_{k}=\eta=\tfrac{1-\gamma}{\gamma\mu} in the inexact SPMD method. If ςk=(1−γ)2−(⌊k/l⌋+2)\varsigma_{k}=(1-\gamma)2^{-(\lfloor k/l\rfloor+2)}, σk2=2−(⌊k/l⌋+2)\sigma_{k}^{2}=2^{-(\lfloor k/l\rfloor+2)} and εk=(1−γ)22−(⌊(k+1)/l⌋+2)\varepsilon_{k}=(1-\gamma)^{2}2^{-(\lfloor(k+1)/l\rfloor+2)} for any k≥0k\geq 0 with l:=⌈log⁡γ(1/4)⌉l:=\left\lceil\log_{\gamma}(1/4)\right\rceil, then

The result follows as an immediate consequence of Proposition 21 and Lemma 11.

Also observe that the condition number of the subproblem is given by

Combining these observations with Lemma 19, we conclude that the total number of gradient computations of hh can be bounded by

3 Convergence of inexact SAPMD

In this subsection, we study the convergence properties of the SAPMD method when its subproblems are solved inexactly by using the AGD method (see Algorithm 5).

In the sequel, we will still denote εk≡ε(Tk)\varepsilon_{k}\equiv\varepsilon(T_{k}) to simplify notations. The following result has the same role as Lemma 20 in our convergence analysis.

The proof is the same as that for Lemma 20 except that Lemma 19 will be applied to problem (6.15) (with μΦ=1+τkηk\mu_{\Phi}=1+\tau_{k}\eta_{k} and Lϕ=LL_{\phi}=L).

The proof is similar to that for Lemma 6 with the following two exceptions: (a) we will apply Lemma 2 (i.e., the performance difference lemma) to the perturbed value functions VτkπV_{\tau_{k}}^{\pi} instead of VπV^{\pi} to obtain a result similar to (6.12); and (b) we will use use (6.17) in place of (6.10) to derive a bound similar to (6.13).

Suppose that 1+ηkτk=1/γ1+\eta_{k}\tau_{k}=1/\gamma and εk≤εk−1\varepsilon_{k}\leq\varepsilon_{k-1} in the SAPMD method. Then for any k≥0k\geq 0, we have

Taking expectation w.r.t. ξ⌈k⌉\xi_{\lceil k\rceil} and ν∗\nu^{*} on both sides of the above inequality, and using Lemma 3 (with hπh^{\pi} replaced by hπ+τkDπ0π(st)h^{\pi}+\tau_{k}D_{\pi_{0}}^{\pi}(s_{t}) and QπQ^{\pi} replaced by QτπQ_{\tau}^{\pi}) and the relation in (4.6), we arrive at

Noting Vτkπk+1(s)−Vτkπk(s)=Vτkπk+1(s)−Vτkπ∗(s)−[Vτkπk(s)−Vτkπ∗(s)]V_{\tau_{k}}^{\pi_{k+1}}(s)-V_{\tau_{k}}^{\pi_{k}}(s)=V_{\tau_{k}}^{\pi_{k+1}}(s)-V_{\tau_{k}}^{\pi^{*}}(s)-[V_{\tau_{k}}^{\pi_{k}}(s)-V_{\tau_{k}}^{\pi^{*}}(s)] and rearranging the terms in the above inequality, we have

The result then follows from 1+ηkτk=1/γ1+\eta_{k}\tau_{k}=1/\gamma, the assumptions τk≥τk+1\tau_{k}\geq\tau_{k+1}, εk≤εk−1\varepsilon_{k}\leq\varepsilon_{k-1} and (3.19).

Suppose that ηk=1−γγτk\eta_{k}=\tfrac{1-\gamma}{\gamma\tau_{k}} in the SAPMD method. If τk=1γlog⁡∣A∣2−(⌊k/l⌋+1)\tau_{k}=\tfrac{1}{\sqrt{\gamma\log|{\cal A}|}}2^{-(\lfloor k/l\rfloor+1)}, ςk=2−(⌊k/l⌋+2)\varsigma_{k}=2^{-(\lfloor k/l\rfloor+2)}, σk2=4−(⌊k/l⌋+2)\sigma_{k}^{2}=4^{-(\lfloor k/l\rfloor+2)}, and εk=(1−γ)22γ2(1+γ)\varepsilon_{k}=\tfrac{(1-\gamma)^{2}}{2\gamma^{2}(1+\gamma)} with l:=⌈log⁡γ(1/4)⌉l:=\left\lceil\log_{\gamma}(1/4)\right\rceil, then

The result follows as an immediate consequence of Lemma 24, Lemma 11, and an argument similar to the one to prove Theorem 4.3.

Also observe that the condition number of the subproblem is given by

Combining these observations with Lemma 19, we conclude that the total number of gradient computations of hh can be bounded by

Concluding Remarks

In this paper, we present the policy mirror descent (PMD) method and show that it can achieve the linear and sublinear rate of convergence for RL problems with strongly convex or general convex regularizers, respectively. We then present a more general form of the PMD method, referred to as the approximate policy mirror descent (APMD) method, obtained by adding adaptive perturbations to the action-value functions and show that it can achieve the linear convergence rate for RL problems with general convex regularizers. We develop the stochastic PMD and APMD methods and derive general conditions on the bias and overall expected error to guarantee the convergence of these methods. Using these conditions, we establish new sampling complexity bounds of RL problems by using two different sampling schemes, i.e., either using a straightforward generative model or a more involved conditional temporal different method. The latter setting requires us to establish a bound on the bias for estimating action-value functions, which might be of independent interest. Finally, we establish the conditions on the accuracy required for the prox-mapping subproblems in these PMD type methods, as well as the overall complexity of computing the gradients of the regularizers. In the future, it will be interesting to study how to incorporate exploration into policy mirror descent to handle rarely visited states and actions. Moreover, since this paper focuses on the theoretical studies, it will be also rewarding to derive simplified PMD algorithms and conduct numerical experiments to demonstrate possible advantages of the proposed algorithms.

Acknowledgement: The author appreciates very much Caleb Ju, Sajad Khodaddadian, Tianjiao Li, Yan Li and two anonymous reviewers for their careful reading and a few suggested corrections for earlier versions of this paper.

Reference

Appendix A: Concentration Bounds for l∞l_{\infty}-bounded Noise

We first show how to bound the expectation of the maximum for a finite number of sub-exponential variables.

where κ>0\kappa>0 denotes an absolute constant.

To proceed, we denote δs,ak:=Qπk,ξk(s,a)−Qπk(s,a)\delta^{k}_{s,a}:=Q^{\pi_{k},\xi_{k}}(s,a)-Q^{\pi_{k}}(s,a), and hence

Note that by definition, for each (s,a)(s,a) pair, we have MkM_{k} independent trajectories of length TkT_{k} starting from (s,a)(s,a). Let us denote Zi:=∑t=0Tk−1γt[c(sti,ati)+hπk(sti)]Z_{i}:=\sum_{t=0}^{T_{k}-1}\gamma^{t}\left[c(s_{t}^{i},a_{t}^{i})+h^{\pi_{k}}(s_{t}^{i})\right], i=1,…,Mki=1,\ldots,M_{k}. Hence,

Since each Zi−Qπk(s,a)Z_{i}-Q^{\pi_{k}}(s,a) is independent of each other, it is immediate to see that Ys,a:=(δs,ak)2Y_{s,a}:=(\delta^{k}_{s,a})^{2} is a sub-exponential with ∥Ys,a∥ψ1≤(c‾+h‾)2(1−γ)2Mk\left\lVert Y_{s,a}\right\rVert_{\psi_{1}}\leq\frac{(\overline{c}+\overline{h})^{2}}{(1-\gamma)^{2}M_{k}}. Also note that

Thus in view of Lemma 25, with σ=(c‾+h‾)2(1−γ)2Mk\sigma=\tfrac{(\overline{c}+\overline{h})^{2}}{(1-\gamma)^{2}M_{k}}, and v=(c‾+h‾)2(1−γ)2Mk+(c‾+h‾)2(1−γ)2γ2Tkv=\tfrac{(\overline{c}+\overline{h})^{2}}{(1-\gamma)^{2}M_{k}}+\frac{(\overline{c}+\overline{h})^{2}}{(1-\gamma)^{2}}\gamma^{2T_{k}}, we conclude that

Appendix B: Bias for Conditional Temporal Difference Methods

Also by Jensen’s inequality, Lemma 16 and Lemma 17, we have

The above inequality, together with (7.1), (7.2) and the facts that

due to the selection of βt\beta_{t} in (5.13). Now let us denote Γt:={1t=0,(1−3t+t0−1)Γt−1t≥1,\Gamma_{t}:=\begin{cases}1&t=0,\\ (1-\tfrac{3}{t+t_{0}-1})\Gamma_{t-1}&t\geq 1,\end{cases} or equivalently, Γt:=(t0−1)(t0−2)(t0−3)(t+t0−1)(t+t0−2)(t+t0−3))\Gamma_{t}:=\tfrac{(t_{0}-1)(t_{0}-2)(t_{0}-3)}{(t+t_{0}-1)(t+t_{0}-2)(t+t_{0}-3))}. Dividing both sides of (7.3) by Γt\Gamma_{t} and taking the telescopic sum, we have

from which the result holds since θˉ1=θ1\bar{\theta}_{1}=\theta_{1}.