Reusable Options through Gradient-based Meta Learning

David Kuric, Herke van Hoof

Introduction

Hierarchical Reinforcement Learning (HRL) offers a promising path toward solving complex, long-horizon tasks by decomposing them into a hierarchy of "options"—sub-policies that represent distinct behaviors. However, a persistent challenge in HRL is ensuring these options are truly reusable across different tasks. Many current end-to-end methods produce options that are overly specialized to a single training task or rely on fixed temporal abstractions (e.g., options that always last exactly 10 steps), which limits their flexibility in stochastic environments.

This paper introduces Fast Adaptation of Modular Policies (FAMP), a framework that treats the discovery of reusable options as a gradient-based meta-learning problem. By optimizing sub-policies and termination functions specifically for how quickly a high-level agent can learn to utilize them, FAMP produces agents that adapt to novel tasks significantly faster than previous state-of-the-art hierarchical methods.

The FAMP Framework

The core philosophy of FAMP is that the high-level policy (the "manager") should be capable of rapid adaptation, while the low-level options (the "workers") should be meta-learned to be globally useful across a distribution of tasks.

Key Methodological Components

  • Meta-Learning for Adaptation: FAMP utilizes the Model-Agnostic Meta-Learning (MAML) framework. The objective is to find option parameters such that a few gradient steps of the high-level policy on a new task result in high performance.
  • Inferred Option Policy Gradient (IOPG): To improve data efficiency, FAMP employs IOPG. This approach treats the active option as a latent variable, allowing the agent to update all options based on their "responsibility" for the observed actions, rather than just updating the single active option.
  • Learned Terminations: Unlike prior work using fixed-length options, FAMP meta-learns a termination function $\xi(s)$ for each option. This allows sub-behaviors to end dynamically based on the state, which is crucial for complex navigation.
  • Differentiable Objectives: To handle the second-order gradients required by MAML in an RL context without bias, the authors use the DiCE (Differentiable Monte Carlo Estimator) objective.

Experimental Evaluation

The authors evaluated FAMP on two distinct domains: a discrete Modified Taxi Domain and a continuous AntMaze environment using MuJoCo. In the Taxi domain, the agent must navigate a grid to pick up and drop off passengers. In AntMaze, a quadrupedal robot must navigate a complex maze to reach a goal, involving a 29-dimensional state space.

Visualization of learned options in a grid-world. The agent learns to terminate options at key decision points (yellow) to reach multiple goals.

Analysis of Learned Options

A key insight from the study is the relationship between option count and termination frequency. As the number of available options decreases, the agent must learn more frequent terminations to "stitch together" sub-behaviors effectively. As illustrated in Figure 1, the meta-learning objective encourages the agent to terminate options at strategic bottlenecks (the yellow squares), allowing the high-level policy to transition between sub-policies to reach diverse goals ($G_1$ through $G_4$). This prevents "option collapse," where only a single option is utilized, because a variety of sub-behaviors are required for fast adaptation across the task distribution.

The Modified Taxi Domain. Left: Environment layout with start (blue), passenger (yellow), and goal (green). Middle/Right: Visualizations of learned trajectories.

Results and Discussion

FAMP demonstrated superior adaptation performance across both domains. In the Taxi domain (Figure 5), FAMP outperformed both Meta-Learning Shared Hierarchies (MLSH) and standard "flat" MAML, achieving significantly higher final rewards. In the continuous AntMaze task, FAMP showed lower variance and higher asymptotic returns compared to MLSH.

Ablation studies further highlighted the importance of learned terminations. Versions of FAMP with fixed-length options performed markedly worse, confirming that state-dependent ending points are critical for navigating complex environments where sub-tasks may take varying amounts of time.

Conclusion and Future Work

FAMP demonstrates that framing option discovery as a meta-learning problem naturally leads to the emergence of reusable, modular behaviors. By optimizing for fast adaptation, the method avoids common pitfalls like task-specificity and option collapse. While the computational complexity of calculating responsibilities in IOPG remains a challenge for very long trajectories, FAMP represents a significant step toward more flexible and generalizable hierarchical agents.

Summary updated

BibTeX
@article{kuric2023reusable,
  author = {David Kuric and Herke van Hoof},
  title = {{Reusable Options through Gradient-based Meta Learning}},
  journal = {TMLR},
  year = {2023},
}
Figure