Policy Mirror Descent for Reinforcement Learning: Linear Convergence, New Sampling Complexity, and Generalized Problem Classes
Guanghui Lan
Introduction
Here is a closed convex function w.r.t. the policy , i.e., there exist some s.t.
where denotes the inner product over the action space , denotes a subgradient of at , and is the Bregman’s distance or Kullback–Leibler (KL) divergence between and (see Subsection 1.1 for more discussion).
Clearly, if , then becomes the classic action-value function. If for some , then reduces to the so-called entropy regularized action-value function. The incorporation of a more general convex regularizer 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, can model the set of constraints that an optimal policy should satisfy. It can describe the correlation among different actions for different states. can also model some risk or utility function associated with the policy . Throughout this paper, we say that is a strongly convex regularizer if . Otherwise, we call a general convex regularizer. Clearly the latter class of problems covers the regular case with .
It can be easily seen from the definitions of and that
for any . Here 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 which satisfies (1.6) simultaneously for all . Hence, we can formulate (1.6) as an optimization problem with a single objective by taking the weighted sum of over (with weights and ):
While the weights can be arbitrarily chosen, a reasonable selection of would be the stationary state distribution induced by the optimal policy , denoted by . 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 to . As we will also see later, even though the definition of the objective in (1.9) depends on and hence the unknown optimal policy , the algorithms for solving (1.6) and (1.9) do not really require the input of .
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 (i.e., 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 as a general (strongly) convex function of 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 and 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 and sampling complexity bounds can be achieved in the single trajectory setting with Markovian noise under certain regularity assumptions.
Fourthly, observe that unless is relatively simple (e.g., 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 is a smooth convex function, by employing an accelerated gradient descent method for solving these subproblems, the overall gradient computations for can be bounded by and , respectively, for the case when 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 is shown in Section 6. Some concluding remarks are made in Section 7.
For any two points , 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 It is worth noting that we do not enforce when defining as all the search points generated by our algorithms will satisfy this assumption.. The Bregman’s distance associated with is given by
where the last equation follows from the fact that . Therefore, we will use the KL divergence and Bregman’s distance interchangeably throughout this paper. It should be noted that our algorithmic framework allows us to use other distance generating functions, such as for some , which, different from the KL divergence, has a bounded prox-function over .
Optimality Conditions and Generalized Monotonicity
It is well-known that the value function in (1.3) is highly nonconvex w.r.t. , because the components of 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 in (1.3). For simplicity, we assume for now that is differentiable and will relax this assumption later. For a given policy , we define the discounted state visitation distribution by
where denotes the state visitation probability of after we follow the policy starting at state . Let denote the transition probability matrix associated with policy , i.e., , and be the -th unit vector. Then and
For any , we have
where denotes the gradient of w.r.t. .
Combining the above two relations, we obtain
where the second equality follows by expanding recursively, and the third equality follows from the definition of in (2.1), and the last identity follows from for or , and for .
In view of Lemma 1, the gradient of the objective in (1.9) at the optimal policy is given by
where the third identity follows from (2.2) and the last one follows from the fact that for any since is the steady state distribution of . Therefore, the optimality condition of (1.9) suggests us to solve the following variational inequality
However, the above VI requires to be differentiable. In order to handle the possible non-smoothness of , 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 and , we have
For simplicity, let us denote the random process , , generated by following the policy starting with the initial state . It then follows from the definition of that
We are now ready to prove the generalized monotonicity for the variational inequality in (2.5).
It follows from Lemma 2 (with ) that
Let denote the vector of all ’s. Then, we have
where the first identity follows from the definition of in (2.6), the second equality follows from the fact that , and the third equality follows from the definition of in (1.3). Combining the above two relations and taking expectation w.r.t. , we obtain
where the second identity follows similarly to (2.3) since is the steady state distribution induced by . The result then follows by rearranging the terms.
Since for any feasible policity , 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 to through the following proximal mapping:
Here denotes a certain stepsize (or learning rate), and can be the operator for the VI formulation, e.g., or its approximation.
It is well-known that one can solve (3.1) explicitly for some interesting special cases, e.g., when or for some and given . For both these cases, the solution of (3.1) boils down to solving a problem of the form
For more general convex functions , 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 . It involves the stepsize parameter and requires the selection of an initial point . For the sake of simplicity, we will assume throughout the paper that
Observe also that we can replace in (3.5) with defined in (2.6) without impacting the updating of , 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 , we have
where denotes the subgradient of at and denotes the gradient of at . 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 , and ) that
Combining the above two identities, we then obtain
Now we conclude from Lemma 4 applied to (3.5) with 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 due to the definition of 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., ).
Suppose that for any in the PMD method with
By Lemma 4 applied to (3.5) (with and ), we have
which, in view of (3.8), then implies that
Taking expectation w.r.t. on both sides of the above inequality and using Lemma 3, we arrive at
Noting and rearranging the terms in the above inequality, we have
which, in view of the assumption (3.13) and the definition of 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 .
Suppose that in the PMD method. Then we have
Taking the telescopic sum of the above inequalities and using the fact that due to (3.7) , we obtain
which clearly implies the result in view of the definition of in (1.9) and the bound on in (3.4).
The result in Theorem 3.2 shows that the PMD method requires iterations to find an -solution for general RL problems. This bound already matches, in terms of its dependence on and , 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 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 and a given initial policy , , we define the perturbed action-value and state-value functions, respectively, by
Clearly, if , then the perturbed value functions reduce to the usual value functions, i.e.,
The following result relates the value functions with different .
For any given , we have
As a consequence, if then
By the definitions of and , we have
which together with the bound on in (3.4) then imply (3.19).
As shown in Algorithm 2, the approximate policy mirror descent (APMD) method is obtained by replacing with its approximation and adding the perturbation for the updating of 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 . In fact, the perturbation parameter used to define the action-value function is not necessarily the same as the one used in the regularization term , 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 , 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., . However, this relation will be approximately satisfied if 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 .
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 be defined in (3.20). For any , we have
Lemma 9 below is similar to Lemma 5 for the PMD method.
By applying Lemma 2 to the perturbed value function and using an argument similar to (3.10), we can show that
Now we conclude from Lemma 8 with that
where the last inequality follows from the fact that due to the definition of 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 and in the APMD method. Then for any , we have
Combining the above two relations, we obtain
Taking expectation w.r.t. on both sides of the above inequality and using Lemma 7, we arrive at
Noting and rearranging the terms in the above inequality, we have
Using the above inequality, the assumption and (3.19), we have
which implies the result by the assumption .
We are now ready to establish the rate of convergence of the APMD method with dynamic stepsize rules to select and for solving general RL problems.
Suppose that for some and that for any in the APMD method. Then for any , we have
Applying the result in Lemma 10 recursively, we have
Noting that , , and due to (3.18), and that due to , we conclude from the previous inequality that
The result in (3.29) immediately follows from the above relation, the definition of in (1.9), and the selection of .
According to (3.29), if is a constant, then the rate of convergence of the APMD method is . If the total number of iterations is given a priori, we can improve the rate of convergence to by setting . Below we propose a different way to specify for the APMD method so that it can achieve this rate of convergence without fixing 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 and satisfy
Let us denote . If and for some and , then
Let us group the indices into epochs with each of the first epochs consisting of iterations. Let be the epoch indices. We first show that for any ,
This relation holds obviously for . Let us assume that (3.33) holds at the beginning of epoch ad examine the progress made in epoch . Note that for any indices in epoch , we have and . By applying (3.31) recursively, we have
where the second inequality follows from the definition of and , the third one follows from , the fourth one follows by induction hypothesis, and the last one follows by regrouping the terms. Since , we have
We are now ready to present a more convenient selection of and for the APMD method.
Let us denote If and , then
Noting that , , due to (3.18), and that due to , we conclude from the previous inequality and the definition of that
In view of Theorem 3.4, a policy s.t. will be found in at most epochs and hence at most 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 since its coefficient 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 . This requirement can hardly be satisfied in practice even for the case when is given explicitly, since is defined as an infinite sum. In addition, in RL one does not know the transition dynamics 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 , there exists a stochastic estimator s.t.
for some and , where denotes the random vector used to generate the stochastic estimator . Clearly, if , then we have exact information about . One key insight we have for the stochastic PMD methods is to handle separately the bias term from the overall expected error term , 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 in (3.5) with its stochastic estimator , i.e.,
In the sequel, we denote the sequence of random vectors 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 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 w.r.t. to . Moreover, we conclude from Lemma 4 applied to (4.4) with replaced by and that
where the last inequality follows from the fact that due to the definition of 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 replaced by and ), we have
which, in view of (4.7), then implies that
Taking expectation w.r.t. and on both sides of the above inequality, and using Lemma 3 and the relation in (4.6), we arrive at
Noting , rearranging the terms in the above inequality, and using the definition of 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 and state a constant stepsize rule which requires both and , , to be small enough to guarantee the convergence of the SPMD method.
Suppose that in the SPMD method. If and for any with , then
By Lemma 13 and the selection of , we have
We now turn our attention to the convergence properties of the SPMD method for the case when .
Suppose that for any in the SPMD method. If and for any , then we have
where denotes a random number uniformly distributed between and . In particular, if the number of iterations is given a priori and , then
By Lemma 13 and the fact that , we have
Taking the telescopic sum of the above relations, we have
Dividing both sides by and using the definition of , 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 , there exist some possible shortcomings for the case when . Firstly, one needs to output a randomly selected from the trajectory. Secondly, since the first term in (4.11) converges sublinearly, one has to update at least times, which may also impact the gradient complexity of computing if 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 in (3.20) with its stochastic estimator . As such, its updating formula is given by
With a little abuse of notation, we still denote and assume that
for some and . 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 instead of .
If and in the SAPMD method, then for any ,
By Lemma 8 with and replaced by , we have
Taking expectation w.r.t. and on both sides of the above inequality, and using Lemma 7 and the relation in (4.16), we arrive at
Noting and rearranging the terms in the above inequality, we have
which, in view of the assumption and (3.19), then implies that
The result then immediately follows from the assumption that .
We are now ready to establish the convergence of the SAPMD method.
Suppose that in the SAPMD method. If , , and with , then
By Lemma 15 and the selection of and , we have
Noting that , , due to (3.18), and that due to , we conclude from the previous inequality and the definition of 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 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 and accuracy level , if the number of iterations satisfies
then by (4.20) and Markov’s inequality, we have
In other words, with probability greater than , we have . 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 or 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 and following policy , we can generate independent trajectories of length , denoted by
Let denote all these random variables. We can estimate in the SPMD method by
We can show that satisfy (4.1)-(4.3) with
for some absolute constant (see Proposition 7 in the Appendix). By choosing and 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 in the SPMD method. If and are chosen such that
Using the fact that , we can easily check from (5.3) and the selection of and that (4.1)-(4.3) hold with and . Suppose that an -solution will be found at the iteration. By (4.9), we have
which implies that the number of iterations is bounded by . Moreover by the definition of and , 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 and that (4.1)-(4.3) holds with and . Using these bounds in (4.10), we conclude that an -solution will be found in at most
iterations. Moreover, the total number of samples is bounded by and hence by (5.5).
We can also establish the iteration and sampling complexities of the SAPMD method, in which we estimate by
Since , similar to (5.3), we can show that satisfy (4.13)-(4.15) with
Suppose that and in the SAPMD method. If and are chosen such that
Using the fact that , we can easily check from (5.7) and the selection of and that (4.13)-(4.15) hold with and . Suppose that an -solution will be found at the iteration. By (4.20), we have
which implies that the number of iterations is bounded by . Moreover by the definition of and , 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 in SPMD since the estimation of in SAPMD is similar.
For a given policy , we denote the Bellman operator
The action value function corresponding to policy satisfies the Bellman equation
We make the following assumptions about policy : (a) for some , which holds when the Markov chain employed with policy has a single ergodic class with unique stationary distribution, i.e., ; and (b) is sufficiently random, i.e., for some , which can be enforced, for example, by adding some corresponding constraints through .
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 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 . With this weighting matrix , we define the operator as
where is the Bellman operator defined in (5.9). Our goal is to find the root of , i.e., . We can show that is strongly monotone with strong monotonicity modulus bounded from below by Here denotes the smallest eigenvalue of . It can also be easily seen that is Lipschitz continuous with Lipschitz constant bounded by where denotes the largest eigenvalue of .
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 , 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 , and the case for can be shown similarly.
Suppose that in the SPMD method. If the initial point of CTD is set to and the number of iterations and the parameter in CTD are set to
Using the fact that , we can easily check from Lemma 17, Lemma 18, and the selection of and that (4.1)-(4.3) hold with and . Suppose that an -solution will be found at the iteration. By (4.9), we have
which implies that the number of iterations is bounded by . Moreover by the definition of and , 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 and in the SAPMD method. If the initial point of CTD is set to , the number of iterations is set to
The proof is similar to that of Proposition 4 except that we will show that (4.1)-(4.3) hold with and . 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 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 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 . Then we estimate the action-value function by using (1.5), i.e.,
In order to use the above identity, we need to define an estimator of by using a uniform policy . 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 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., 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 for some feature matrix to evaluate the value functions (see Section 4 of KotsalisLanLi2020PartII for a discussion about CTD with function approximation). Unless the column space of 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 to the number of columns of .
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 is differentiable and its gradients are Lipschitz continuous with Lipschitz constant . 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 and consider the problem of
for some . Given , the accelerated gradient method performs the following updates:
for some , , and .
Below we slightly generalize the convergence results for the AGD method so that they depend on the distance rather than for any . This result better fits our need to analyze the convergence of inexact SPMD and SAPMD methods in the next two subsections.
Let us denote and . If
Using the discussions in Corollary 3.5 of LanBook2020 (and the possible strong convexity of ), 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 ,
where the last inequality follows from (6.7) (with ) and the facts that
for any . 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 whenever calling the AGD method. To use a dynamic initial point (e.g., ) will make the analysis more complicated since we do not have a uniform bound on the KL divergence for an arbitrary . To do so probably will require us to use other distance generating functions than the entropy function.
In the sequel, we will denote to simplify notations. The following result will take place of Lemma 4 in our convergence analysis.
It follows from Lemma 19 (with and ) that
Using the definition of , we have
which proves (6.9). Setting and 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 due to the definition of 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 and for any in the inexact SPMD method, we have
which, in view of (4.7), then implies that
Taking expectation w.r.t. and on both sides of the above inequality, and using Lemma 3 and the relation in (4.6), we arrive at
Noting , rearranging the terms in the above inequality, and using the definition of in (1.9), we arrive at
The result then follows immediately by the selection of and the assumption .
We now are now ready to state the convergence rate of the SPMD method with inexact prox-mapping. We focus on the case when .
Suppose that in the inexact SPMD method. If , and for any with , 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 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 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 and ).
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 instead of 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 and in the SAPMD method. Then for any , we have
Taking expectation w.r.t. and on both sides of the above inequality, and using Lemma 3 (with replaced by and replaced by ) and the relation in (4.6), we arrive at
Noting and rearranging the terms in the above inequality, we have
The result then follows from , the assumptions , and (3.19).
Suppose that in the SAPMD method. If , , , and with , 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 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 denotes an absolute constant.
To proceed, we denote , and hence
Note that by definition, for each pair, we have independent trajectories of length starting from . Let us denote , . Hence,
Since each is independent of each other, it is immediate to see that is a sub-exponential with . Also note that
Thus in view of Lemma 25, with , and , 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 in (5.13). Now let us denote or equivalently, . Dividing both sides of (7.3) by and taking the telescopic sum, we have
from which the result holds since .