Inexact GMRES Policy Iteration for Large-Scale Markov Decision Processes

Matilde Gargiani, Dominic Liao-McPherson, Andrea Zanelli, John Lygeros · DOI

Abstract

Policy iteration enjoys a local quadratic rate of contraction, but its iterations are computationally expensive for Markov decision processes (MDPs) with a large number of states. In light of the connection between policy iteration and the semismooth Newton method and taking inspiration from the inexact variants of the latter, we propose inexact policy iteration, a new class of methods for large-scale finite MDPs with local contraction guarantees. We then design an instance based on the deployment of GMRES for the approximate policy evaluation step, which we call inexact GMRES policy iteration. Finally, we demonstrate the superior practical performance of inexact GMRES policy iteration on an MDP with 10,000 states, where it achieves a $\times 5.8$ and $\times 2.2$ speedup with respect to policy iteration and optimistic policy iteration, respectively.

Introduction

Markov Decision Processes (MDPs) serve as the foundational framework for reinforcement learning and stochastic control. Solving large-scale MDPs typically relies on Policy Iteration (PI), which is renowned for its rapid "quadratic" convergence to an optimal policy. However, PI faces a significant scalability hurdle: each iteration requires an exact policy evaluation, necessitating the solution of a massive system of linear equations proportional to the state space size. For systems with tens of thousands of states, this exact solution becomes a computational bottleneck.

While variants like Optimistic Policy Iteration (OPI) attempt to mitigate this by solving these systems approximately using simple iterative methods, they often struggle with efficiency, particularly as the discount factor $\gamma$ approaches 1.

The Inexact Policy Iteration Framework

This research bridges the gap between classical dynamic programming and modern numerical optimization by introducing Inexact GMRES Policy Iteration (iGMRES-PI). The methodology rests on two primary pillars:

  1. The Semismooth Newton Connection: The authors demonstrate that Policy Iteration can be viewed as a specific instance of a semismooth Newton method. This theoretical link allows for the application of "inexact" techniques, where internal linear systems are solved only to the precision required to maintain overall algorithmic progress, governed by a "forcing sequence" ($\alpha_k$).
  2. GMRES for Policy Evaluation: Instead of standard Value Iteration (VI), the framework employs the Generalized Minimal Residual (GMRES) method. GMRES is a powerful Krylov subspace solver optimized for large, non-symmetric systems.

Why GMRES? The Power of Clustered Eigenvalues

The effectiveness of GMRES in this context is not accidental. A key theoretical insight of the paper is that the matrices involved in MDP policy evaluation exhibit eigenvalues clustered within a small circle in the complex plane.

Figure 1: Eigenvalue clustering in MDP matrices (bottom) and the resulting rapid residual decay (top).

As shown in Figure 1, this clustered structure is mathematically ideal for GMRES, leading to extremely fast convergence compared to standard iterative solvers. This property ensures that iGMRES-PI remains robust even for long-horizon problems where the discount factor is near unity.

Experimental Results

The authors evaluated iGMRES-PI on a synthetic MDP benchmark featuring 10,000 states and 40 actions. The performance was compared against standard PI and OPI across different discount factors ($\gamma = 0.95$ and $\gamma = 0.99$).

Superior Computational Efficiency

The primary advantage of iGMRES-PI is its wall-clock efficiency. While standard PI may require fewer "outer" iterations, the cost of its exact "inner" policy evaluation is prohibitive. iGMRES-PI optimizes this trade-off by using adaptive precision.

Figure 4: Convergence of the value function error over time for different algorithms on a 10,000-state MDP.

As illustrated in Figure 4, iGMRES-PI reaches the optimal solution in approximately 15 seconds. This represents a 5.8x speedup over standard PI (~87 seconds) and a 2.2x speedup over the best-tuned OPI (~33 seconds). Furthermore, the method demonstrates exceptional stability; while OPI's performance degrades significantly as $\gamma$ increases, iGMRES-PI maintains its high efficiency.

Conclusion and Future Directions

iGMRES-PI offers a significant advancement for solving large-scale MDPs by combining the theoretical strengths of Newton-type methods with the practical efficiency of Krylov subspace solvers. Future work aims to extend these results to provide global convergence guarantees and to explore the use of MDP-specific preconditioners to further accelerate the GMRES solver. Additionally, the inherent parallelizability of Krylov methods makes iGMRES-PI a strong candidate for deployment on high-performance distributed computing architectures.

Summary updated

Abstract

Policy iteration enjoys a local quadratic rate of contraction, but its iterations are computationally expensive for Markov decision processes (MDPs) with a large number of states. In light of the connection between policy iteration and the semismooth Newton method and taking inspiration from the inexact variants of the latter, we propose \textit{inexact policy iteration}, a new class of methods for large-scale finite MDPs with local contraction guarantees. We then design an instance based on the deployment of GMRES for the approximate policy evaluation step, which we call inexact GMRES policy iteration. Finally, we demonstrate the superior practical performance of inexact GMRES policy iteration on an MDP with 10000 states, where it achieves a $\times 5.8$ and $\times 2.2$ speedup with respect to policy iteration and optimistic policy iteration, respectively.
BibTeX
@inproceedings{gargiani2023inexact,
  author = {Matilde Gargiani and Dominic Liao-McPherson and Andrea Zanelli and John Lygeros},
  title = {{Inexact GMRES Policy Iteration for Large-Scale Markov Decision Processes}},
  booktitle = {IFAC-PapersOnLine},
  year = {2023},
  doi = {10.1016/j.ifacol.2023.10.316},
}
Figure