META LEARNING SHARED HIERARCHIES

Kevin Frans, Jonathan Ho, Xi Chen, Pieter Abbeel, John Schulman

Introduction

Meta Learning Shared Hierarchies (MLSH) is a framework designed to enable reinforcement learning agents to master new tasks quickly. It achieves this by learning a library of shared "skills" (sub-policies) across a distribution of related environments. By decoupling high-level strategy from low-level motor control, MLSH allows a master policy to solve complex, sparse-reward tasks simply by switching between these learned primitives.

The Challenge of Sample Inefficiency

Reinforcement Learning (RL) is notoriously sample-inefficient. Agents typically start every new task from scratch, requiring millions of interactions to learn basic movements. While Hierarchical RL (HRL) aims to solve this by using "options" or sub-routines, these are often difficult to discover automatically. Meanwhile, Meta-Learning usually focuses on "few-shot" adaptation (learning in 1-5 steps), which doesn't always scale to complex environments requiring long-term exploration.

The MLSH framework addresses this gap by automatically discovering a set of reusable, temporally extended motor primitives that facilitate fast learning across a broad distribution of tasks.

Methodology: A Two-Level Hierarchy

The core of MLSH is a two-level hierarchical architecture:

MLSH Architecture
  1. Sub-policies ($\phi$): A set of $K$ shared neural networks that act as "motor primitives." These are shared across all tasks in a given distribution.
  2. Master Policy ($\theta$): A task-specific network that selects which sub-policy to execute. Crucially, the master policy operates at a slower timescale, picking a sub-policy every $N$ timesteps (e.g., every 200 steps).

The Training Algorithm

The training loop involves sampling a task and then alternating between two distinct phases, using Proximal Policy Optimization (PPO) as the underlying RL engine:

  • Warmup Period: The sub-policies are frozen. Only the master policy ($\theta$) is trained from scratch for the current task. This allows the master policy to "figure out" how to use the existing skills to maximize rewards without destabilizing the sub-policies.
  • Joint Update Period: Both the master policy and the sub-policies are updated. Because the master policy has already "warmed up," the gradients flowing to the sub-policies are more stable and directed toward useful, coherent behaviors.

Key Insights and Results

The researchers evaluated MLSH on a variety of increasingly complex simulations, including 2D Moving Bandits, Four Rooms, and MuJoCo Physics tasks (such as Ant navigation and Humanoid walking/crawling).

Training Performance on Movement Bandits

Several key insights emerged from these experiments:

  • Temporal Abstraction as a Prior: By forcing the master policy to act only every $N$ steps, the authors effectively shorten the "horizon" of the problem. A task that takes 2,000 steps for a flat policy looks like a 10-step task to the MLSH master policy.
  • The Critical Role of Warmup: As demonstrated in the training curves, without the warmup phase, sub-policies often collapse or fail to differentiate. The warmup ensures that sub-policies are only updated once the master policy has a coherent strategy for utilizing them.
  • Automatic Discovery: Unlike many HRL methods that require manual reward shaping for sub-tasks, MLSH discovers primitives (like "walking right" or "crawling") solely from the global reward signal across a distribution of tasks.
  • Solving Sparse-Reward Environments: In sparse-reward environments like the Ant Obstacle Course, standard RL fails because it never accidentally reaches the goal. MLSH succeeds because it explores using high-level skills (e.g., "move right for 200 steps") rather than random low-level jitters. MLSH achieved a reward of 193 on the obstacle course, whereas a single policy trained from scratch achieved 0.
  • Versatility: MLSH successfully trained a single policy that could both walk and crawl for a Humanoid robot. On a combination task, MLSH achieved a reward of 14,333, while a standard shared policy managed only 6,055.

Limitations and Future Work

While powerful, MLSH has a few limitations:

  • Hard Communication: The master policy communicates with sub-policies via a "one-hot" index. This means no gradients flow directly from the sub-policy to the master, which might limit the complexity of coordination.
  • Fixed Timescale: The parameter $N$ (how long a sub-policy runs) is a fixed hyperparameter. In reality, different skills (e.g., "jumping" vs. "walking") might naturally require different durations.
  • Task Distribution Dependency: The quality of the learned primitives is highly dependent on the variety of the task distribution. If the tasks are too similar, the primitives will not generalize well.

Future directions could include exploring continuous vector communication between levels or integrating different RL algorithms, such as Q-learning or Evolution Strategies, within the MLSH framework.

Summary updated

BibTeX
@inproceedings{frans2018meta,
  author = {Kevin Frans and Jonathan Ho and Xi Chen and Pieter Abbeel and John Schulman},
  title = {{META LEARNING SHARED HIERARCHIES}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=SyX0IeWAW},
}
Figure