Optimistic Natural Policy Gradient: a Simple Efficient Policy Optimization Framework for Online RL

Qinghua Liu, Gellért Weisz, András György, Chi Jin, Csaba Szepesvari

Abstract

Policy optimization (PO) methods, such as Proximal Policy Optimization (PPO) and Trust Region Policy Optimization (TRPO), are widely used in practice due to their stability and compatibility with neural networks. However, proving their sample efficiency in the "online" setting—where an agent must explore an unknown environment without a simulator—has remained a significant theoretical challenge. This paper introduces Optimistic Natural Policy Gradient (Optimistic NPG), a framework that combines classic policy gradients with optimistic value estimation. This approach achieves the first optimal dimension dependence ($d^2$) for linear Markov Decision Processes (MDPs) and provides the first polynomial sample complexity guarantees for policy optimization with general function approximation.

Introduction

In reinforcement learning (RL), a persistent gap exists between empirical success and theoretical understanding. While practitioners favor policy optimization for its robustness, theoretical guarantees for these methods often rely on restrictive assumptions, such as the availability of a simulator or tabular state spaces. In the online setting, where an agent must learn purely through interaction, the primary difficulty lies in balancing exploration and exploitation.

Existing proofs for PO methods typically suffer from one of three issues: they are restricted to tabular settings, they ignore the exploration challenge by assuming all states are easily reachable, or they exhibit suboptimal sample complexity. Optimistic NPG addresses these gaps by providing a computationally efficient and provably sample-efficient algorithm for online RL.

The Optimistic NPG Framework

Optimistic NPG is a "meta-algorithmic" framework built on three modular components that can be adapted to various environment types:

  1. Periodic On-Policy Data Collection: To mimic practical algorithms like PPO, the agent periodically collects a fresh batch of data using its current policy. This avoids the complexities of managing massive, correlated datasets common in off-policy methods.
  2. Optimistic Policy Evaluation (OPE): This is the core innovation. Instead of a standard value estimate, the agent calculates an optimistic upper bound on the value functions. This "optimism in the face of uncertainty" encourages the agent to explore actions and states with high potential but unknown rewards.
  3. Policy Update (Mirror Ascent): The policy is updated using a standard Natural Policy Gradient step, specifically a softmax update. The algorithm's structure allows it to reuse data from several recent iterations, significantly improving sample efficiency.

Theoretical Foundations

The paper evaluates the framework across three distinct classes of environments:

  • Tabular MDPs: Discrete state and action spaces.
  • Linear MDPs: High-dimensional environments where transitions and rewards are linear functions of features.
  • General Function Approximation: Environments with "low eluder dimension," a technical condition allowing for complex, non-linear function classes like neural networks.

Key Insights

Simplicity and Efficiency

The authors demonstrate that complex data-reuse mechanisms or specialized exploratory policies are not strictly necessary for theoretical guarantees. A straightforward combination of NPG and optimism is sufficient to achieve state-of-the-art results.

The On-Policy Advantage

By collecting fresh data periodically, the algorithm avoids the "messy" correlations that often plague off-policy theoretical analysis. This allows for a "bonus" term (for optimism) that is $\sqrt{d}$ times smaller than in previous works, leading to sharper, more efficient results.

Policy Lipschitzness

A critical technical insight is that because the policy changes slowly under the NPG update rule, data collected by a policy from a few iterations ago remains a valid proxy for evaluating the current policy. This justifies the periodic data collection strategy and enhances computational efficiency.

Results and Impact

Optimistic NPG establishes several new benchmarks in RL theory:

  • Optimal Dimension Dependence: For $d$-dimensional linear MDPs, the algorithm achieves a sample complexity of $\tilde{O}(d^2/\epsilon^3)$. This is the first computationally efficient algorithm to reach the $d^2$ mark, improving upon the previous state-of-the-art ($d^3$) by a factor of $d$.
  • General Approximation Breakthrough: It is the first policy optimization algorithm shown to have polynomial sample complexity for general function approximation.
  • On-Policy Landmark: Even in a purely on-policy configuration (where data is never reused), the algorithm achieves a polynomial rate of $\tilde{O}(d^2/\epsilon^4)$, a landmark result for on-policy methods in exploration-focused settings.

Limitations and Future Work

The primary limitation of the current work is the dependence on the accuracy parameter $\epsilon$. While the $d^2$ dependence is optimal, the $\epsilon^{-3}$ dependence is slightly higher than the theoretically optimal $\epsilon^{-2}$ achieved by some computationally inefficient value-based methods. Shaving off this $1/\epsilon$ factor remains a key direction for future research. Additionally, while the framework supports general function approximation, the practical computational cost of the OPE subroutine depends heavily on the specific function class employed.

Summary updated

BibTeX
@inproceedings{liu2023optimistic,
  author = {Qinghua Liu and Gellért Weisz and András György and Chi Jin and Csaba Szepesvari},
  title = {{Optimistic Natural Policy Gradient: a Simple Efficient Policy Optimization Framework for Online RL}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=zaQ7wV9NOg},
}
Figure