Confident Approximate Policy Iteration for Efficient Local Planning in qπ-realizable MDPs

Gellért Weisz, András György, Tadashi Kozuno, Csaba Szepesvári

Abstract

We consider approximate dynamic programming in $\gamma$-discounted Markov decision processes and apply it to approximate planning with linear value-function approximation. Our first contribution is a new variant of Approximate Policy Iteration (API), called Confident Approximate Policy Iteration (CAPI), which computes a deterministic stationary policy with an optimal error bound scaling linearly with the product of the effective horizon $H$ and the worst-case approximation error $\epsilon$ of the action-value functions of stationary policies. This improvement over API (whose error scales with $H^2$) comes at the price of an $H$-fold increase in memory cost. Unlike Scherrer and Lesner [2012], who recommended computing a non-stationary policy to achieve a similar improvement (with the same memory overhead), we are able to stick to stationary policies. This allows for our second contribution, the application of CAPI to planning with local access to a simulator and $d$-dimensional linear function approximation. As such, we design a planning algorithm that applies CAPI to obtain a sequence of policies with successively refined accuracies on a dynamically evolving set of states. The algorithm outputs an $\tilde O(\sqrt{d}H\epsilon)$-optimal policy after issuing $\tilde O(dH^4/\epsilon^2)$ queries to the simulator, simultaneously achieving the optimal accuracy bound and the best known query complexity bound, while earlier algorithms in the literature achieve only one of them. This query complexity is shown to be tight in all parameters except $H$. These improvements come at the expense of a mild (polynomial) increase in memory and computational costs of both the algorithm and its output policy.

Introduction

In reinforcement learning (RL) for large-scale environments, linear function approximation is a standard tool used to handle high-dimensional state spaces. However, classical algorithms like Approximate Policy Iteration (API) face a significant challenge: the "compounding error" problem. In a $\gamma$-discounted Markov Decision Process (MDP) with an effective horizon $H = 1/(1-\gamma)$, the approximation errors at each iteration can inflate the final policy suboptimality by a factor of $H^2$.

This paper introduces Confident Approximate Policy Iteration (CAPI), a new algorithmic framework that reduces this error inflation from quadratic to linear ($H$). Crucially, CAPI achieves this while maintaining the use of stationary policies and operating within a "local access" simulator model, where the agent can only query states reachable from the start rather than teleporting to arbitrary states.

The CAPI Framework

The core innovation of CAPI is its conservative update rule. Standard API typically updates a policy greedily based on the most recent value estimates. This aggressive approach is sensitive to estimation noise, leading to the $H^2$ error growth.

CAPI introduces a "confidence" mechanism: it only updates the policy for a given state if it is statistically certain that the new action is significantly better than the current one. By refusing to update when evidence is weak, CAPI acts as a stabilizer, preventing small approximation errors from snowballing. While previous literature suggested that achieving linear error scaling required the complexity of non-stationary policies (different rules for every time step), CAPI proves that stationary policies are sufficient, provided the update logic is sufficiently robust.

Local Planning with CAPI-QPI-PLAN

The authors extend the CAPI framework to a practical planner called CAPI-QPI-PLAN. This algorithm is designed for $d$-dimensional linear function approximation under the assumption of $q^\pi$-realizability—where the action-value function of any stationary policy can be approximated with a maximum error of $\epsilon$.

CAPI-QPI-PLAN operates through several key mechanisms:

  1. Core Set Construction: It identifies a set of informative state-action pairs to represent the MDP's structure.
  2. Recursive Refinement: The algorithm maintains a sequence of policies across different "levels," gradually refining accuracy on a dynamically evolving set of states encountered during simulation.
  3. Measurement via Rollouts: A specialized subroutine performs rollouts to estimate values, ensuring the confidence thresholds required by CAPI are met.

Key Results and Complexity

The theoretical analysis of CAPI-QPI-PLAN yields several state-of-the-art results:

  • Optimal Error Scaling: The algorithm achieves a suboptimality bound of $\tilde{O}(\epsilon \sqrt{d} H)$. This is a major improvement over the $\tilde{O}(\epsilon \sqrt{d} H^2)$ bounds found in earlier local planners.
  • Query Efficiency: It identifies a near-optimal policy using $\tilde{O}(dH^4/\epsilon^2)$ simulator queries. This matches the best-known query complexity in the field while offering superior accuracy guarantees.
  • Tight Bounds: The authors provide a lower bound proof demonstrating that their query complexity is nearly optimal regarding dimension ($d$), error ($\epsilon$), and suboptimality.

Discussion and Limitations

While CAPI-QPI-PLAN optimizes query complexity and error scaling, it introduces a mild increase in computational and memory overhead. The internal bookkeeping required to manage the recursive policy structure and the core sets scales polynomially with $d$ and $H$. Furthermore, the final output policy is defined recursively, which may be more computationally expensive to evaluate than a simple greedy policy.

Future work may explore "policy compression" to simplify these recursive outputs or investigate whether the $H^4$ dependence in query complexity can be further reduced to match the theoretical lower bounds more closely.

Conclusion

CAPI represents a significant step forward in approximate dynamic programming. By demonstrating that stationary policies can achieve optimal linear error scaling in the local planning setting, the paper provides a more practical and theoretically sound foundation for RL in $q^\pi$-realizable environments.

Summary updated

BibTeX
@inproceedings{weisz2022confident,
  author = {Gellért Weisz and András György and Tadashi Kozuno and Csaba Szepesvári},
  title = {{Confident Approximate Policy Iteration for Efficient Local Planning in qπ-realizable MDPs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=Q_WPshXgGI9},
}
Figure