Confident Natural Policy Gradient for Local Planning in $q_\pi$-realizable Constrained MDPs
摘要
评审与讨论
This is the first work which addresses and achieves polynomial sample complexity for the learning problem of CMDPs in the more general setting of linear function approximation with realizability. The authors propose a primal-dual algorithm and utilize a local access model (can be viewed to in between online learning and a generative model ). The algorithm reliably produces a policy that strictly adheres to the constraints while closely optimizing the reward function's value.
优点
- The paper is mostly well written with good summarization of the main ideas and theorem statements.
- It is the first work achieving polynomial sample complexity for CMDPs in the more general realizability setting.
缺点
- Lack of experimental results.
- The paper seems an extension of earlier work i.e., (Weisz et al., 2022).
- Despite general good writing, the main algorithm description in section 4.2-4.3 is very dense and difficult to parse.
问题
-
Since the paper claims that realizability is more general than the linear MDP setting, does it mean that linear MDP setting implies realizability ? Is this result known or trivial ? Could this point be included in the paper?
-
The paper seems an extension of earlier work i.e., (Weisz et al., 2022). Can the authors elaborate on what were the main technical challenges overcome on extending this work to the CMDP setting ?
局限性
There are no potential negative societal impact of their work
Yes, you are correct that linear MDP implies realizability. However, realizability DOES NOT imply linear MDP, and one can show this via a counterexample. To name a few references that discuss this, please refer to Proposition 4 of Andrea Zanette et al., Learning near optimal policies with low inherent Bellman error, 2020a. (https://arxiv.org/pdf/2003.00153) and Hao, B et al., Confident least square value iteration with local access to a simulator (2022) (https://proceedings.mlr.press/v151/hao22a/hao22a.pdf).
This paper studied constrained Markov decision processes (CMDP) and proposed a confident policy gradient algorithm for realizable MDPs. Here, a realizable MDP assumes that the Q function can be approximated by a linear function w.r.t. some feature of state-action pairs. By using primal-dual methods, the proposed algorithm can find an -optimal policy satisfying the constraint or with small constraint violation. The proposed approach can also be applied to the misspecification case.
优点
- The paper is technically sound.
- The studied problem is important and well-motivated.
缺点
-
The major weakness is the presentation of contribution. According to the paper's presentation, it feels like the proposed method is a straightforward extension of Weisz et al., 2022 applying to the Lagrangian objective function. It would be better to highlight the difficulties of handling CMDP or this Lagrangian function.
-
The presentation of the two learning goals is also confusing. In my understanding, the proposed algorithm can already achieve the stringent constraint, i.e. zero violation, and the relaxed feasibility is satisfied naturally. It seems redundant to spend a whole section to describe the result of relaxed feasibility. Some papers split the two results (Liu et al., 2021) because they need different assumptions. Perhaps the authors can explain or organize the presentation more clear.
-
Another presentation issue: There is no introduction or justification of the terminology natural policy gradient in this paper.
[1]. Weisz et al., Confident Approximate Policy Iteration for Efficient Local Planning in -realizable MDPs, 2022.
[2]. Liu et al., Learning policies with zero or bounded constraint violation for constrained mdps, 2021
问题
Please see the weaknesses part.
局限性
No further limitations need to be addressed.
Please note that our algorithm is NOT a straightforward extension of CAPI-QPI-Plan. Moreover, our paper distinguishes between the relaxed-feasibility and strict-feasibility problem settings. Treating each setting uniquely is a key strength of our work. In the relaxed-feasibility problem, the returned policy is allowed to have some constraint violations, specifically where . This contrasts with the strict-feasibility setting, where no constraint violations are permitted, meaning . To address the strict-feasibility problem, the algorithm must solve a more conservative CMDP, as discussed in Section 6 of our paper. However, solving this more conservative CMDP incurs a higher sample complexity cost, necessitating that the relaxed-feasibility setting be treated separately. Additionally, in the presence of a misspecification error , the strict-feasibility setting requires additional assumptions on , whereas the relaxed-feasibility setting does not. The sample complexity of the relaxed-feasibility setting can be independent of Slater's constant, whereas for strict feasibility, the returned policy must strictly adhere to constraints, and we cannot simply set Slater's constant to and disregard its impact.
I thank the authors for the response, which largely addresses my concerns such as the separation of relaxed and strict constraint cases and differences from previous works. However, I believe that these discussions are necessary and the current version would benefit from a careful revision. I decide to slightly change my score and lower my confidence.
We are pleased to have addressed your concerns, and we sincerely thank the reviewer for their response.
Problem setup
The authors consider the task of global planning in large Constrained Discounted MDPs. They assume local access to a simulator which can be queried at previously encountered state-action pairs to obtain a next state sample and immediate reward, and that the -value of any policy is linearly realizable by a given feature map. Under this more general assumption on the MDP, they aim to develop an efficient method which learns a policy that maximizes return with minimal constraint violations.
Approach
In the above context, the authors propose a primal-dual approach to solve a constrained return optimization problem. Under the weaker assumption of -realizability and local access to a simulator, their method combines existing techniques on -value estimation in large MDPs and off-policy evaluation to nicely approximate the gradients of the primal-dual objective while conserving samples. Precisely, they apply the -values estimation sub-routine of CAPI-QPI-PLAN in [1] to construct least squares estimates which are guaranteed to closely approximate the true value at a subset of important (namely core) state-action pairs. Furthermore, contrary to the fully on-policy evaluation routine of CAPI-QPI-PLAN, their method Confident-NPG-CMDP reuses the core set and trajectory data for value estimation and policy improvement across a number of steps in each learning phase.
Result
The authors derive performance guarantees for their method in terms of the value error and constraint violation of the output mixture policy. Precisely, they prove that w.h.p their method learns a near-optimal policy with minimal constraint violation with at most queries to the simulator and iterations.
[1] Weisz, G., György, A., Kozuno, T., & Szepesvári, C. (2022). Confident Approximate Policy Iteration for Efficient Local Planning in -realizable MDPs. Advances in Neural Information Processing Systems, 35, 25547-25559.
Update: I also updated my score for contribution.
优点
-
This paper addresses the task of planning in large Constrained Discounted MDPs under the weakest possible assumptions in the RL literature. This is achieved with a unique combination of existing techniques. Their value estimation scheme makes use of techniques from CAPI-QPI-PLAN to create a core set in addition to off-policy evaluation via importance sampling for value estimation at core state-action pairs. The authors also adequately cite related works.
-
The submission is well written and, to the best of my knowledge, technically sound.
-
In terms of the target accuracy and feature dimension, the results are significant especially in restrictive the setting of approximate policy completeness and local access to the simulator that they consider.
缺点
-
The relevance and impact on the theoretical analysis of the off-policy evaluation scheme is not fully accessible. It would help if the authors could clarify (with pointers in the main text), how this routine helps conserve samples in theory. Precisely, does the sample complexity get worse if the authors simply apply CAPI-QPI-PLAN?
-
In Line 268, it should be not in the definition of .
问题
-
The nature of the output policy in Line 268 is a bit ambiguous and I spent a considerable amount of time trying to understand the meaning of the notation means.
On one hand, the authors refer to the said notation as a mixture policy, which to my knowledge means that at deployment, the agent flips a coin at the beginning of each episode to decide which of the policies to use. In this case, it is unclear how you define , and more importantly, such policies are not suitable for constrained MDPs, especially with safety constraints as they are only required to perform well on average.
On the other hand, the notation seems to mean that is an element-wise average for all state-action pairs. In this case, the policy is stochastic and well defined.
-
The complexity guarantees has worse dependence on the effective horizon e.g. in Theorem 1 and in Theorem 2. Is this a consequence of the method or an artefact of the analysis? Can this be improved?
-
In Remark 3, the authors mention that the Slater's constant, which is required by their algorithm, can be approximated by another algorithm. Is this approximation trivial? How will the approximation error influence the current results?
-
In appendix A, the authors provide Confident-NPG, a version of Confident-NPG-CMDP for the single-reward (or unconstrained MDP) case. Furthermore, their performance guarantees for the latter algorithm appear to be based on first relating the former to CAPI-QPI-PLAN. Therefore, to better understand the contributions of this paper in the constrained case, the following questions are based on Confident-NPG. Can the authors kindly clarify the following:
-
Why is interesting to study?
-
What is a suitable choice of and how does tuning this parameter show up in the performance guarantees?
-
Can the authors comment on the memory requirement of Confident-NPG?
-
局限性
This is a purely theory paper so there are no direct
societal impacts. However, I would recommend that the authors highlight the
dependence on the effective horizon in their discussion. More
importantly, I recommend that the authors elaborate on the memory and
computational complexity as these contribute to the efficiency of their method.
You are correct that the mixture policy randomly selects an index with probability at deployment and then follows the policy for all subsequent steps. The value function of the mixture policy, , is defined as the expected return when the mixture policy is initiated in state : . This averaging of the value functions is used in our analysis to demonstrate that the returned mixture policy achieves the two feasibility objectives stated in sections 5 and 6.
It's important to note that the mixture policy is a history-dependent policy. The notation is defined with respect to trajectories. Specifically, this means that the probability of a trajectory is the weighted average of the probabilities of that trajectory under each of the component policies. We will also clarify this in the paper.
I thank the authors for their clarification on the differences between CAPI-QPI-PLAN and Confident-NPG-CMDP and the nature of . Can the authors kindly comment on questions 2, 3, 4.2 and 4.3 as well?
Question 2: The complexity guarantees has worse dependence on the effective horizon e.g. in Theorem 1 and in Theorem 2. Is this a consequence of the method or an artefact of the analysis? Can this be improved?
To address the strict-feasibility problem, the algorithm must solve a more conservative CMDP, as discussed in Section 6 of our paper. However, solving this conservative CMDP incurs a higher sample complexity cost, necessitating a separate treatment for the relaxed-feasibility setting. The worse dependence on the effective horizon is a consequence of the method. Improving the effective horizon terms in both settings remains an area of ongoing research.
Question 3: In Remark 3, the authors mention that the Slater's constant, which is required by their algorithm, can be approximated by another algorithm. Is this approximation trivial? How will the approximation error influence the current results?
Recall that Slater's constant is defined as . To approximate , one can run CAPI-QPI-Plan against the local-access simulator with constraint function , treating it as an unconstrained problem optimizing with respect to only . This algorithm yields an approximation of , which can then be used to calculate . We can run CAPI-QPI-Plan to obtain an approximate before executing Confident-NPG-CMDP, and the sample complexity of CAPI-QPI-Plan is only additive to that of Confident-NPG-CMDP.
We will include the aforementioned elaboration on this remark in the paper.
Question 4.2: What is a suitable choice of and how does tuning this parameter show up in the performance guarantees?
We realized that the term was used in two different contexts, which may have caused some confusion. We used to denote both the constraint function and a user-defined parameter that bounds the importance sampling ratio in off-policy estimation, thereby determining the value of . This overlap was an oversight on our part, and we will use two different notations to make the distinction in our paper. For the explanations that follow, we will refer to as the user-defined parameter that sets the value of .
By setting to a value greater than 0 adjusts the resampling window, controlled by the quantity , to ensure that the off-policy value estimators are well-controlled. As a result, appears in , where is the total number of data sampling phases. Additionally, appears in , the number of roll-outs for each state-action pair in a core set. In the proof of Theorem 1 in Appendix C (page 29), we show that the algorithm will make queries to the simulator.
If , we see . All in all, we have showing up in the sample complexity. Since is a constant, we have omitted it from the tilde-big-O notation in the final sample complexity. In terms of , with a factor of contributed by and a factor of contributed by , we see that the total sample complexity is .
If is set to 0, then and , reducing to . In this case, the algorithm reverts to a purely on-policy approach and results in a sample complexity . This motivated us to adopt the natural policy gradient and the off-policy approach to reduce the sample complexity from to .
A similar analysis for the strict-feasibility setting can be found in Theorem 2 in Appendix D (page 31).
The overall memory requirement is . The term comes from maintaining copies of the core set , each containing no more than state-action pairs. For each state-action pair in for , the algorithm stores trajectories consisting of tuples , requiring memory. The additional accounts for the elements stored in , which has no more than elements. In phase , the algorithm terminates, so no roll-outs are required.
The term arises from storing the least-squares weights of the estimator when a core set is extended. When a core set is extended (i.e., when discovered = true), the least-squares weights for the corresponding iterations are recalculated for the extended set on line 20 and stored for that extension. With a maximum of extensions per core set and corresponding iterations for each core set, and core sets in total, each weight vector of dimension , this results in the memory bound for storing the least-squares weights.
By substituting , , , and , we obtain a total memory requirement of .
Below, we provide a formal discussion on why and how we store the least-squares weights.
To return a mixture policy, the algorithm must access all policies . Instead of storing the values for across the entire state-action space, we store only the necessary information to reconstruct the policies when needed.
For a phase , the policies for depend on the core set . Since can be extended multiple times during the algorithm, we track newly added states in each extension and store the corresponding least-squares weights. can only be extended via line 12, and any other (for ) only via line 27, when the running phase . Newly added elements are marked at lines 12 and 27. After lines 17-23 are executed, we store the least-squares weights associated with these newly added state-action pairs.
Using the tuples stored in , along with the marking of which state-action pairs are newly added in each extension and their associated least-squares weights, we can reconstruct the policy . For example, let , and denote all state-action pairs added to in extension . Let represent the least-squares weights computed using for the -th iteration. When is extended for the -th time, let be the newly added pairs, making the latest . The least-squares weight is then computed using . When line 25 of algorithm 2 (pg 12) is executed, remains unchanged for states already in , equivalent to in line 25, because line 27 would have been executed in the previous extension making . For states in (equivalent to in line 25), makes an NPG update using . For all other states not in , the policy remains as .
A subroutine can perform these computations and return for any and . By tracking newly added elements and the corresponding least-squares weights, the algorithm can reconstruct policies throughout its execution. From the stored data, the algorithm will have access to the constructed policies and return the value of a mixture policy when required.
We plan to add this discussion to the appendix in the final version of our paper.
Dear Authors,
I appreciate the detailed responses to my questions, particularly those addressing the nature of , the relevance of the off-policy evaluation scheme, the choice of (the user-defined parameter that sets the value of ), and the memory requirements of CAPI-NPG-CMDP. After carefully considering your response, I am convinced that CAPI-NPG-CMDP is a non-trivial extension of CAPI-QPI-PLAN, which to my knowledge addresses the task of planning in Constrained Markov Decision Processes (CMDPs) under the weakest possible assumptions so far. On this note, I will revise my evaluation of your work.
I strongly agree with including this discussion into the final version of the paper. I believe that doing so will enhance the readability of the paper and enable readers to better understand and appreciate the contribution of CAPI-NPG-CMDP in relation to CAPI-QPI-PLAN.
Regarding future directions, while mixture policies have been generally accepted in the CMDP literature, I still believe they are not well-suited for the constrained MDP setting due to their nature of only ensuring good performance on average. On this note, I propose that the authors highlight this limitation in the discussion.
Thank you again for your efforts in addressing my concerns.
We are pleased to have addressed your concerns, and we sincerely thank the reviewer for their thoughtful questions.
We would like to begin by thanking all the reviewers for their time and dedication in evaluating our work. We start our rebuttal by emphasizing that our algorithm is not a straightforward extension of the work by Weisz et al. (2022).
First, we want to point out that the algorithm CAPI-QPI-Plan by Weisz et al. (2022) is designed for the unconstrained MDP setting, where it returns a deterministic policy. However, in the constrained MDP setting, an optimal deterministic policy for the unconstrained MDP may not be feasible. Thus, CAPI-QPI-Plan is not applicable to the constrained MDP setting. In contrast, our algorithm, Confident-NPG-CMDP, returns a soft mixture policy , ensuring that for all . The soft policy returned by Confident-NPG-CMDP can solve the relaxed-feasibility problem in section 5 and the strict-feasibility problem in section 6.
The main algorithmic differences between Confident-NPG-CMDP and CAPI-QPI-Plan are as follows:
- Data Sampling: Confident-NPG-CMDP does not sample data in every iteration, unlike CAPI-QPI-Plan.
- Dual Variable Computation: Confident-NPG-CMDP requires computing the dual variable present in a primal-dual algorithm.
- Policy Improvement Step: Confident-NPG-CMDP utilizes a softmax over the estimated action-values, whereas CAPI-QPI-Plan is greedy with respect to the estimated action-values.
These are critical changes to ensure a feasible mixture policy for the CMDP. Moreover, it also makes the analysis considerably more challenging.
We will now explain the motivation behind the changes to the policy improvement step and why we do not sample data in every iteration. In the constrained MDP setting using a primal-dual approach, it is also crucial to control the dual variable. The dual variable is obtained using a mirror descent algorithm, introducing an additional factor to the sample complexity. Simply applying CAPI-QPI-Plan and returning a mixture policy at the end would yield an overall sample complexity , with the additional factor arising from controlling the dual variable in addition to having to control for the estimation error. This complexity led us to adopt the natural policy gradient approach.
By using the natural policy gradient as a policy improvement step instead of CAPI-QPI-Plan's greedy policy improvement step, Confident-NPG-CMDP reduces the sample complexity from to . This reduction is achieved by leveraging the softmax policy structure within the natural policy gradient, enabling effective use of off-policy estimation to conserve data. By employing a per-trajectory importance sampling ratio, we can weigh the Monte Carlo returns generated from data collected in an earlier on-policy phase, resulting in unbiased estimates of action values with respect to the target policy. However, this ratio can become large if there is a substantial difference between the on-policy and target policy. To address this, the algorithm collects data at intervals of , effectively determining when to collect new data as the policy significantly diverges from the earlier on-policy data. By setting , we can bound the per-trajectory importance sampling ratio, thus controlling the interval for resampling on-policy data to produce well-controlled estimators.
The paper proposes a new algorithm to solve constrained MDPs in the online infinite horizon setting under the q^pi-realizable and local access assumptions. There is general consensus among the reviewers of the interest of the results. Nonetheless, there was a concern about the technical novelty, since the algorithmic structure and the theoretical analysis heavily rely on existing results, in particular from the CMDP literature and on recent works such as CAPI-QPI-Plan. The authors have addressed these concerns in the rebuttal and explained how a direct application of CAPI-QPI-Plan would result in worse complexity and which ingredients of Confident-NPG-CMDP are key to achieve the desired results. Based on this, I believe the paper is significant and novel enough for the theoretical community working on CMDP as it pushes forward the limits of how we can solve this challenging problem. Hence, I recommend acceptance.
I strongly encourage the authors to improve the current manuscript as follows:
- Include a thorough discussion on the algorithmic and theoretical differences between CAPI-QPI-Plan and Confident-NPG-CMDP. This would greatly help in understanding the novel contributions of the paper.
- Highlight the limitations of the current work, notably the dependency on the horizon.
- Add a more comprehensive comparison and discussion with results in the linear MDP case and explain how moving to less restrictive assumptions makes the problem more challenging.
- Include the clarifications provided during the rebuttal.