Learning Complex Neural Network Policies with Trajectory Optimization

Sergey Levine, Vladlen Koltun

Introduction

This paper introduces a "constrained guided policy search" (GPS) algorithm that allows high-dimensional neural networks to learn complex robotic behaviors, such as walking and push recovery. By using trajectory optimization to "guide" the neural network, the method bridges the gap between efficient planning and generalizable learning, outperforming prior reinforcement learning techniques on challenging locomotion tasks.

In robotics, developing controllers (policies) that can handle high-dimensional inputs and complex environments is a persistent challenge. Traditionally, researchers have relied on two main approaches:

  1. Trajectory Optimization: Highly efficient at finding a specific path for a specific task, but lacks generalization. If the robot is pushed or the terrain changes, the planned trajectory fails.
  2. Policy Search (Reinforcement Learning): Learns a general rule (e.g., a neural network) capable of handling new situations. However, model-free policy search struggles to scale to high-dimensional neural networks because it relies on "trial and error" exploration, which is slow and prone to getting stuck in poor local optima.

The authors tackle this exploration problem by using trajectory optimization to provide a roadmap for the neural network, ensuring the network learns from high-quality data rather than stumbling blindly.

The core contribution is formulating policy learning as a constrained optimization problem.

  • The Objective: Minimize the cost of the trajectories while maximizing the "agreement" between the trajectory distribution ($q$) and the neural network policy ($\pi_\theta$).
  • The Mechanism: The authors use Dual Gradient Descent to solve this, alternating between three steps:
  • Trajectory Optimization: Optimize a set of trajectories to minimize cost while staying close to what the current neural network can actually execute. This utilizes a modified version of iterative Linear-Quadratic-Gaussian (iLQG) control.
  • Policy Optimization: Treat the optimized trajectories as "supervised" training data. The neural network is trained to predict the actions taken in those trajectories.
  • Dual Update: Update Lagrange multipliers (dual variables) that gradually increase the "pressure" for the trajectories and the policy to match perfectly.

By starting with loose constraints and progressively tightening them, the algorithm allows the trajectories to explore high-reward regions first, gradually pulling the neural network toward those successful behaviors.

Evaluated Tasks

The researchers evaluated their method using the MuJoCo physics simulator on several simulated robotic tasks, which serve as benchmarks for testing a policy's ability to handle non-linear dynamics and high-dimensional state spaces:

  • Planar Swimmer: A multi-link robot swimming in a 2D fluid.
  • Bipedal Walker: A two-legged robot learning to walk.
  • Uneven Terrain: The walker traversing random slopes of up to 10 degrees.
  • Push Recovery: The walker maintaining balance after being hit by lateral forces ranging from 250 to 500 Newtons.
Simulated robotic tasks: planar swimmer and bipedal walker.

Key Insights

  • I-Projection vs. M-Projection: The authors argue that their approach (an I-projection) is superior to their previous "variational GPS" (an M-projection). While M-projections tend to be "risk-seeking" (averaging over all possible good outcomes), the I-projection forces the policy to avoid high-cost regions, making the resulting behavior much more stable and robust.
  • Breaking the Curse of Dimensionality: By using a model-based trajectory optimizer to guide the search, they successfully trained neural networks with over 1,200 parameters—a feat that was extremely difficult for standard model-free RL at the time.
  • Supervised Learning as RL: The method effectively transforms a difficult reinforcement learning problem into a sequence of more manageable supervised learning problems.

Key Results

  • Success Where Others Failed: Constrained GPS successfully learned walking gaits with as few as 5 hidden units. In contrast, prior methods like ISGPS and DAGGER failed to find stable solutions for these configurations.
Performance comparison on the walker task showing constrained GPS outperforming other methods.
  • Generalization: Policies trained on just three types of uneven terrain were able to successfully navigate entirely new, unseen random terrains.
  • Complex Strategy Selection: In the push recovery task, the neural network learned to choose between different recovery strategies (like taking a step or bracing) depending on the magnitude and timing of the push.
  • Overall Performance: The method outperformed "cost-weighted regression" and other standard policy gradient methods, which were unable to handle the complexity of the bipedal walking tasks.

Limitations and Future Work

  • Known Dynamics: The current method assumes the robot has a known model of the world's physics. Future work could involve learning the dynamics model from data simultaneously.
  • Markovian Assumption: The policy is "Markovian," meaning it only considers the current state. It cannot handle tasks that require long-term memory unless those hidden states are explicitly added to the input.
  • Local Optima: While more robust than model-free methods, the algorithm remains a local optimizer and can get stuck if the initial trajectory demonstrations are poor.

Summary updated

BibTeX
@inproceedings{levine2014learning,
  author = {Sergey Levine and Vladlen Koltun},
  title = {{Learning Complex Neural Network Policies with Trajectory Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2014},
}
Figure