Compatible natural gradient policy search

Joni Pajarinen, Hong Linh Thai, Riad Akrour, Jan Peters, Gerhard Neumann

Abstract

Reinforcement learning (RL) agents often struggle with premature convergence, where a policy becomes deterministic too quickly, halting exploration. This paper introduces Compatible Policy Search (COPOS), an algorithm that leverages natural parameterizations and compatible value functions to provide exact solutions to trust-region optimization problems. By incorporating an explicit entropy bound alongside standard KL-divergence constraints, COPOS prevents the "entropy trap" and demonstrates superior performance across complex continuous and discrete control tasks compared to state-of-the-art methods like TRPO.

Introduction

Policy search in reinforcement learning faces two primary challenges: maintaining stability during updates and ensuring sufficient exploration. Trust-region methods, such as Trust Region Policy Optimization (TRPO), address stability by bounding the Kullback–Leibler (KL) divergence between successive policies. However, natural gradient methods—often used as approximations for these trust regions—frequently suffer from premature convergence. As the policy's entropy drops, the agent's "willingness to explore" diminishes, leading to sub-optimal behaviors.

This research identifies that while natural gradients are typically viewed as first-order approximations, they can be the exact solution to trust-region problems under specific conditions. Furthermore, the authors address the mathematical root of slow convergence in standard natural gradients and propose a principled way to control entropy loss.

Methodology: Compatible Policy Search (COPOS)

The proposed COPOS algorithm integrates several key theoretical components to optimize policy updates:

Natural Parameterization and Compatible Features

Instead of standard mean and variance parameterizations for Gaussian policies, COPOS utilizes natural parameters (the precision matrix and a linear vector). Combined with compatible value function approximation—where features are defined as the log-gradients of the policy—the resulting gradient updates are unbiased and exhibit lower variance.

Dual Constraint Optimization

Standard trust-region methods typically only bound the KL-divergence. COPOS introduces a dual constraint approach:

  1. KL-Divergence Bound: Ensures the new policy remains close to the old one for stability.
  2. Entropy Bound: Explicitly prevents the policy from becoming deterministic too quickly, maintaining exploration throughout the learning process.

The authors prove that for log-linear models, this natural gradient update is the exact solution to the trust-region problem, bypassing the need for computationally intensive line searches required by algorithms like TRPO.

Experimental Evaluation

The effectiveness of COPOS was tested on two distinct benchmarks:

  1. Roboschool (Continuous Control): A suite of physics-based tasks ranging from InvertedDoublePendulum to high-dimensional challenges like Humanoid-v1 and AtlasForwardWalk.
  2. Field Vision Rock Sample (FVRS): A discrete, partially observable Markov decision process (POMDP) that tests an agent's ability to explore a grid with limited vision and noisy observations.

Key Insights and Results

Solving the Entropy Trap

The "Entropy Trap" occurs when the precision of a Gaussian policy increases at every step, effectively reducing the natural gradient's step size and slowing convergence to a crawl. COPOS addresses this by showing that while standard natural gradients converge at a rate of $O(1/n)$, adding entropy regularization enables an exponential convergence rate ($O(1/c^n)$).

Performance Benchmarks

In Roboschool environments, COPOS consistently outperformed TRPO, TNPG, and VPG. The performance gap was most evident in complex tasks like Humanoid-v1, where COPOS achieved higher average returns and more stable learning curves. In the FVRS discrete tasks, the explicit entropy control allowed COPOS to maintain exploration longer than competitors, leading to better policy discovery in sparse-reward environments.

Conclusion and Future Work

COPOS bridges the gap between natural gradient methods and trust-region optimization, providing a theoretically grounded approach to entropy management. While the current implementation provides exact updates for log-linear parameters, it serves as a robust first-order approximation for deep neural networks. Future research aims to apply these insights to safety-critical domains like autonomous driving (e.g., the CARLA simulator) and to develop more efficient Fisher Information Matrix approximations for larger-scale models.

Summary updated

BibTeX
@article{pajarinen2019compatible,
  author = {Joni Pajarinen and Hong Linh Thai and Riad Akrour and Jan Peters and Gerhard Neumann},
  title = {{Compatible natural gradient policy search}},
  journal = {Machine Learning},
  year = {2019},
  doi = {10.1007/s10994-019-05807-0},
}
Figure