Evolved Policy Gradients

Rein Houthooft, Yuhua Chen, Phillip Isola, Bradly C. Stadie, Filip Wolski, Jonathan Ho, Pieter Abbeel

TL;DR

Instead of manually designing reinforcement learning (RL) loss functions, Evolved Policy Gradients (EPG) uses evolution to "discover" them. By metalearning a differentiable loss function that accounts for an agent's history, EPG enables agents to learn new tasks significantly faster than standard algorithms—sometimes even without needing a reward signal at test time.

What Problem Does This Paper Address?

Reinforcement learning agents typically start every new task as a "blank slate." They have no prior knowledge of what "progress" looks like and must rely entirely on sparse external rewards to stumble upon the right behavior. This makes RL notoriously sample-inefficient compared to humans, who bring a lifetime of priors to any new challenge.

While previous metalearning research has tried to solve this by learning better policy initializations (like MAML) or using recurrent networks to "remember" tasks (like $RL^2$), EPG takes a different path. It asks: Can we metalearn the objective function itself? If we can evolve a loss function that implicitly encodes how to explore and identify a task, we can create agents that adapt to new environments with extreme efficiency.

Methods

EPG operates using two nested optimization loops to separate the learning of the objective from the learning of the policy.

EPG uses two nested optimization loops: an inner SGD loop for the policy and an outer ES loop for the loss function.
  1. The Inner Loop: An agent tries to solve a specific task (e.g., a robot learning to walk). However, instead of optimizing for the standard RL reward, it uses Stochastic Gradient Descent (SGD) to minimize a learned loss function provided by the outer loop.
  2. The Outer Loop: This loop uses Evolution Strategies (ES) to adjust the parameters of that loss function. The goal of the outer loop is to find a loss function that, when used by the inner loop agent, results in the highest possible final returns.

The Architecture

The learned loss function isn't just a simple scalar; it’s a neural network that uses temporal convolutions to look back at the agent's recent history (past states, actions, and rewards).

The learned loss function uses temporal convolutions over the agent's history to guide policy updates.

This architecture allows the loss function to perform "system identification"—essentially figuring out the hidden properties of the environment (like gravity or friction) and adjusting the gradient signals it sends to the policy accordingly. To help the process get started, the authors use a "bootstrapping" technique where the agent initially learns using a standard PPO loss, which is gradually annealed away as the evolved loss takes over.

Datasets

The researchers evaluated EPG on several randomized continuous control environments built on the MuJoCo physics engine:

  • RandomHopper / RandomWalker: Environments where physical properties like friction, mass, and gravity are randomized for every new trial.
  • DirectionalHopper / DirectionalHalfCheetah: The agent must figure out whether it is being rewarded for moving forward or backward.
  • GoalAnt / Fetch: Tasks requiring the agent to reach randomized target locations.

Key Insights and Ideas

  • Loss as a Prior: The evolved loss function acts as a repository for "what progress looks like" across a family of tasks. It can incentivize exploration or "warm up" a policy before a reward is even found.
  • Learning Without Rewards: One of the most striking findings is that once the loss function is trained, the agent can often learn to solve a task at test time without any reward signal. As long as the agent can identify the task through its observations, the evolved loss provides the necessary gradients to solve it.
  • Decoupling Policy and Learning Rule: Unlike methods that metalearn a specific policy, EPG metalearns a learning rule. This decoupling allows for better generalization. Because the loss function is "teaching" the policy from scratch via SGD, it is less likely to overfit to the specific behaviors seen during training.

Key Results

  • Speed: EPG agents consistently learned faster than PPO (a state-of-the-art policy gradient method) across all randomized MuJoCo environments.
  • Generalization: In the "GoalAnt" experiment, the authors trained the loss function on ants that only had to walk to the right. At test time, they asked the ant to walk to the left (an out-of-distribution task). EPG successfully adapted and learned to walk left, whereas direct policy metalearning methods like $RL^2$ and MAML struggled or failed completely because they had overfitted to the "right-walking" distribution.
  • Exploratory Behavior: Qualitative analysis showed that EPG-trained agents developed distinct exploratory phases—for example, a Hopper might try jumping in both directions to "probe" which one the evolved loss prefers.

Limitations and Future Work

  • Computational Cost: Using Evolution Strategies in the outer loop is computationally expensive, as it requires training thousands of "inner loop" agents to evaluate a single update to the loss function.
  • Task Specificity: While EPG generalizes well within a family of tasks (e.g., different types of walking), a loss function evolved for MuJoCo is unlikely to work for a completely different domain, like Atari games.
  • Scaling: The authors note that moving toward a truly "universal" RL loss function—one that could outperform hand-engineered ones across all domains—remains a significant long-term challenge.

Summary updated

BibTeX
@inproceedings{houthooft2018evolved,
  author = {Rein Houthooft and Yuhua Chen and Phillip Isola and Bradly C. Stadie and Filip Wolski and Jonathan Ho and Pieter Abbeel},
  title = {{Evolved Policy Gradients}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=rkVR_vZ_bH},
}
Figure