Trust Region Policy Optimization

John Schulman, Sergey Levine, Philipp Moritz, Michael I. Jordan, Pieter Abbeel

TL;DR

This paper introduces Trust Region Policy Optimization (TRPO), a novel algorithm for training reinforcement learning policies that guarantees monotonic improvement and is highly effective for complex, high-dimensional problems like robotic locomotion and Atari games. TRPO achieves this by optimizing a surrogate objective within a trust region, ensuring stable and robust policy updates, outperforming previous methods in challenging scenarios.

What Problem Does This Paper Address?

Training effective policies in reinforcement learning (RL) is notoriously difficult, especially when dealing with complex, high-dimensional state and action spaces, such as those encountered in robotics or when learning directly from raw visual input. Traditional policy gradient methods can be unstable, suffering from large, unpredictable updates that can lead to performance collapse. While policy iteration methods offer theoretical guarantees of improvement, they are often computationally expensive or impractical for large-scale problems. The challenge is to develop an algorithm that is both theoretically sound, guaranteeing improvement, and practically efficient, capable of handling complex function approximators like neural networks.

Methods

The core contribution is the Trust Region Policy Optimization (TRPO) algorithm. TRPO builds upon the theoretical foundation of policy improvement guarantees, specifically by ensuring that updates to the policy improve a surrogate objective function while staying within a "trust region" defined by a constraint on the Kullback-Leibler (KL) divergence between the old and new policies.

Key aspects of the method include:

  • Surrogate Objective: TRPO optimizes a surrogate objective function that is a lower bound on the true policy performance. This objective is designed to be easier to optimize than the true performance.
  • Trust Region Constraint: Instead of taking arbitrary steps, TRPO constrains the policy update to a region where the surrogate objective is a good approximation of the true objective. This is achieved by limiting the KL divergence between the current policy and the updated policy. This constraint prevents drastic policy changes that could lead to performance degradation.
  • Monotonic Improvement Guarantee: The theoretical framework proves that optimizing the surrogate objective within the trust region guarantees monotonic improvement of the true policy performance.
  • Practical Implementation: The paper details how to implement TRPO using Monte Carlo estimation for the objective and constraint functions. They propose two sampling schemes: "single path" (simulating individual trajectories) and "vine" (a more complex scheme involving "trunk" and "branch" rollouts for lower variance estimates).
  • Efficient Optimization: For large-scale problems with neural networks, TRPO uses a conjugate gradient algorithm to solve the constrained optimization problem efficiently, leveraging approximations of the Fisher Information Matrix.

Datasets

The paper evaluates TRPO on several benchmark tasks:

  • Simulated Robotic Locomotion: Three simulated robots (swimmer, hopper, walker) using the MuJoCo simulator. These tasks involve continuous state and action spaces and present challenges like underactuation and non-smooth dynamics.
  • Atari Games: Seven Atari games (Breakout, Enduro, Pong, Q*bert, Seaquest, Space Invaders, Beam Rider) using raw pixel inputs. This involves learning from high-dimensional visual data and dealing with delayed rewards and complex behaviors.
  • Cart-Pole Balancing: A classic control problem used for baseline comparisons, particularly for derivative-free methods.

No new benchmarks were introduced; existing simulators and standard Atari game environments were used.

Key Insights and Ideas

  • KL Divergence as a Trust Region is Crucial: The paper strongly suggests that constraining the KL divergence between policies is a more robust way to control step sizes and achieve consistent progress compared to using fixed penalty coefficients (as in natural policy gradient). This constraint prevents catastrophic performance drops.
  • Unified Perspective on Policy Optimization: TRPO provides a unifying framework that connects policy iteration and policy gradient methods, showing them as limiting cases of a trust region optimization approach.
  • Scalability to High Dimensions: TRPO demonstrates remarkable scalability, successfully optimizing policies with tens of thousands of parameters (e.g., in neural networks for Atari games), a significant challenge for many prior methods.
  • Learning from Raw Pixels is Feasible: The success in Atari games shows that TRPO can effectively learn complex behaviors directly from raw image inputs, a critical step towards more general AI agents.
  • Vine vs. Single Path Trade-off: The "vine" sampling method offers lower variance estimates but is more computationally expensive and requires resets, while "single path" is simpler and more suitable for real-world systems.

Key Results

  • Robotic Locomotion: TRPO successfully learned controllers for swimming, hopping, and walking from scratch, outperforming previous methods that often relied on hand-engineered policy classes. The learned policies achieved good performance and made consistent progress.
  • Atari Games: TRPO achieved competitive scores on Atari games, even outperforming some state-of-the-art methods on certain games, despite using a general-purpose algorithm without game-specific tuning. The vine method generally performed better than single path on these tasks.
  • Robustness: TRPO consistently achieved monotonic improvement across various tasks, requiring less hyperparameter tuning than other methods.
  • Efficiency: While computationally intensive, TRPO's approach to solving the constrained optimization problem (using conjugate gradient and Fisher Information Matrix approximations) made it practical for large-scale problems.

Limitations and Future Work

  • Sample Complexity: While TRPO is more sample-efficient than many derivative-free methods, it still requires a significant number of samples, especially for complex tasks. The authors suggest that combining TRPO with model learning could substantially reduce sample complexity.
  • Hyperparameter Sensitivity (Minor): While generally robust, the choice of the trust region size ($\delta$) can still influence performance.
  • Future Work: The authors envision applying TRPO to learn robotic controllers that integrate perception (vision) and control. They also suggest exploring recurrent policies with hidden states for partially-observed environments and combining TRPO with model learning to reduce sample requirements. The paper also notes that their analysis could be extended to handle estimation error in advantage functions more explicitly.

Summary updated

BibTeX
@inproceedings{schulman2015trust,
  author = {John Schulman and Sergey Levine and Philipp Moritz and Michael I. Jordan and Pieter Abbeel},
  title = {{Trust Region Policy Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2015},
  url = {https://openreview.net/forum?id=rJVX8jZdbS},
}
Figure