arXiv(opens in a new tab)cs.LGFeb 2015Cited by 17 papers on PaperVantageClassic Paper

Manuscript Offprint

arXiv:1502.05477

Trust Region Policy Optimization

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

Abstract

We describe an iterative procedure for optimizing policies, with guaranteed monotonic improvement. By making several approximations to the theoretically-justified procedure, we develop a practical algorithm, called Trust Region Policy Optimization (TRPO). This algorithm is similar to natural policy gradient methods and is effective for optimizing large nonlinear policies such as neural networks. Our experiments demonstrate its robust performance on a wide variety of tasks: learning simulated robotic swimming, hopping, and walking gaits; and playing Atari games using images of the screen as input. Despite its approximations that deviate from the theory, TRPO tends to give monotonic improvement, with little tuning of hyperparameters.

1 Introduction

Most algorithms for policy optimization can be classified into three broad categories: (1) policy iteration methods, which alternate between estimating the value function under the current policy and improving the policy (Bertsekas, 2005); (2) policy gradient methods, which use an estimator of the gradient of the expected return (total reward) obtained from sample trajectories (Peters & Schaal, 2008a) (and which, as we later discuss, have a close connection to policy iteration); and (3) derivative-free optimization methods, such as the cross-entropy method (CEM) and covariance matrix adaptation (CMA), which treat the return as a black box function to be optimized in terms of the policy parameters (Szita & Lörincz, 2006).

General derivative-free stochastic optimization methods such as CEM and CMA are preferred on many problems, because they achieve good results while being simple to understand and implement. For example, while Tetris is a classic benchmark problem for approximate dynamic programming (ADP) methods, stochastic optimization methods are difficult to beat on this task (Gabillon et al., 2013). For continuous control problems, methods like CMA have been successful at learning control policies for challenging tasks like locomotion when provided with hand-engineered policy classes with low-dimensional parameterizations (Wampler & Popović, 2009). The inability of ADP and gradient-based methods to consistently beat gradient-free random search is unsatisfying, since gradient-based optimization algorithms enjoy much better sample complexity guarantees than gradient-free methods (Nemirovski, 2005). Continuous gradient-based optimization has been very successful at learning function approximators for supervised learning tasks with huge numbers of parameters, and extending their success to reinforcement learning would allow for efficient training of complex and powerful policies.

In this article, we first prove that minimizing a certain surrogate objective function guarantees policy improvement with non-trivial step sizes. Then we make a series of approximations to the theoretically-justified algorithm, yielding a practical algorithm, which we call trust region policy optimization (TRPO). We describe two variants of this algorithm: first, the single-path method, which can be applied in the model-free setting; second, the vine method, which requires the system to be restored to particular states, which is typically only possible in simulation. These algorithms are scalable and can optimize nonlinear policies with tens of thousands of parameters, which have previously posed a major challenge for model-free policy search (Deisenroth et al., 2013). In our experiments, we show that the same TRPO methods can learn complex policies for swimming, hopping, and walking, as well as playing Atari games directly from raw images.

References (37)

  • IJCAI, 2003
  • Bartlett, P. L. and Baxter, J. Infinite-horizon policy-gradient estimation. arXiv preprint arXiv:1106.0665, 2011. (opens arXiv in a new tab)
  • IEEE Transactions on Systems, Man and Cybernetics, (5):834–846, 1983
  • An evaluation platform for general agents
  • Foundations and Trends in Robotics, 2(1-2):1–142, 2013
  • Approximate dynamic programming finally performs well in the game of Tetris
  • Adapting arbitrary normal mutation distributions in evolution strategies: The covariance matrix adaptation
  • A tutorial on MM algorithms
  • A natural policy gradient
  • Approximately optimal approximate reinforcement learning
  • Reinforcement learning as classification: Leveraging modern classifiers
  • American Mathematical Society, 2009
  • Learning neural network policies with guided policy search under unknown dynamics
  • Mnih, V., Kavukcuoglu, K., Silver, D., Graves, A., Antonoglou, I., Wierstra, D., and Riedmiller, M. Playing Atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013. (opens arXiv in a new tab)
  • Efficient methods in convex programming
  • A policy search method for large mdps and pomdps
  • Revisiting natural gradient for deep networks (opens arXiv in a new tab)
  • Neural Networks, 21(4):682–697, 2008a
  • Natural actor-critic
  • Safe policy iteration
  • Asymptopia: an exposition of statistical asymptotic theory
  • Learning tetris using the noisy cross-entropy method
  • MuJoCo: A physics engine for model-based control
  • Optimal gait and form for animal locomotion
  • Numerical optimization, volume 2
  • An informal overview is as follows
  • Subtracting Equations (33) and (34), we get
  • Then there exists a joint distribution $(X, Y)$ whose marginals are $p_X, p_Y$, for which $X = Y$ with probability $1 - \alpha$
  • $\overline{D}_{\mathrm{KL}}(\theta_{\mathrm{old}}, \theta) \approx \frac{1}{2}(\theta - \theta_{\mathrm{old}})^T A(\theta - \theta_{\mathrm{old}})$, where $A_{ij} = \frac{\partial}{\partial \theta_i} \frac{\partial}{\partial \theta_j} \overline{D}_{\mathrm{KL}}(\theta_{\mathrm{old}}, \theta)$
  • To do this, let $\delta = \overline{D}_{\mathrm{KL}} \approx \frac{1}{2}(\beta s)^T A(\beta s) = \frac{1}{2}\beta^2 s^T A s$
  • We perform the line search on the objective $L_{\theta_{\text{old}}}(\theta) - \mathcal{X}[\overline{D}_{\text{KL}}(\theta_{\text{old}}, \theta) \leq \delta]$, where $\mathcal{X}[\ldots]$ equals zero when its argument is true and $+ \infty$ when it is false
  • The second term vanishes, leaving just the first term
  • This method would be slightly less efficient as it does not exploit the fact that the second derivatives of $\mu(x)$ (i.e., the second term in Equation (57)) can be ignored, but may be substantially easier to implement
  • Computing the Fisher-vector product is typically about as expensive as computing the gradient of an objective that depends on $\mu(x)$ (Wright & Nocedal, 1999)
  • We found $k = 10$ to be quite effective, and using higher $k$ did not result in faster policy improvement
  • A neural network with several fully-connected (dense) layers maps from the input features to the mean of a Gaussian distribution
  • That is, the action consists of a tuple $(a_1, a_2, \dots, a_K)$ of integers $a_k \in \{1, 2, \dots, N_k\}$, and each of these components is assumed to have a categorical distribution, which is specified by a vector $\mu_k = [p_1, p_2, \dots, p_{N_k}]$