A large parametrized space of meta-reinforcement learning tasks

Thomas MiconiarXiv 2023 · OpenReview

Abstract

We describe a parametrized space for simple meta-reinforcement-learning (meta-RL) tasks with arbitrary stimuli. The parametrization allows us to randomly generate an arbitrary number of novel simple meta-learning tasks. The space of meta-RL tasks covered by this parametrization includes many well-known meta-RL tasks, such as bandit tasks, the Harlow task, T-mazes, the Daw two-step task and others. Simple extensions allow it to capture tasks based on two-dimensional topological spaces, such as find-the-spot or key-door tasks. We describe a number of randomly generated meta-RL tasks and discuss potential issues arising from random generation.

Introduction: The Scarcity of Meta-RL Environments

Meta-reinforcement learning focuses on agents that "learn to learn." Unlike standard RL, where an agent masters a single task, a meta-RL agent must adapt to new, unpredictable information within a family of tasks. For example, an agent might need to learn which door holds a reward in a novel maze layout.

The major bottleneck in this field is the scarcity of diverse environments. Most research relies on a small set of classic tasks like bandit problems or the Harlow task. This limited "meta-dataset" makes it difficult to evaluate the robustness of meta-learning algorithms. To achieve true open-endedness—where agents continuously encounter and master novel challenges—we need a way to generate a diverse, nearly infinite stream of meta-learning problems.

Methods: A Parametrized POMDP Framework

The proposed framework uses Partially Observable Markov Decision Processes (POMDPs) as a foundation, but introduces several key innovations to allow for procedural generation:

  • Variable Quantities: Elements like reward probabilities or specific stimuli (observations) are defined as variables. These are randomly resampled for every new instance of a meta-task.
  • Special States: The framework allows "special state" variables. For example, a "reward location" variable can be assigned to a different state ID in every new task instance, forcing the agent to explore.
  • Flag Variables: To handle tasks requiring memory (e.g., "pick up a key before opening a door"), the author introduces "flags." These are internal environment bits that can be set or checked by rules, allowing for stateful logic without exponentially increasing the number of POMDP states.
  • Ordered Reward Rules: Rewards are defined by a list of rules where later rules can override earlier ones, allowing for complex conditional logic.
Schematic of a state within the framework, showing how stimuli, actions, and reward rules are structured.

Replicating and Generating Benchmarks

The framework is not just for new tasks; it can reproduce existing benchmarks and generate entirely novel ones:

  • Classic Replications: Two-arm bandits, the Harlow task (object discrimination), T-mazes, and the Daw two-step task.
  • Topological Tasks: An extension for 2D grid worlds, such as "Dark Room" (finding a hidden spot in a grid).
  • Novel Generated Tasks: The paper showcases three randomly generated meta-tasks, including a "spontaneous key-door" task that emerged purely from the procedural generation process.

Key Insights: The "Iso-optimal" Trap

A significant finding is that not all randomly generated tasks are "true" meta-learning tasks. If a single fixed policy can solve every variation of a task (e.g., "always go left"), the task is iso-optimal and does not require learning-to-learn. The author proposes a computational method to detect and filter out these uninteresting tasks by solving individual task instances and checking if their optimal policies are interchangeable.

Furthermore, by using the same variable in multiple places (e.g., the same stimulus $S1$ appearing in different states), the framework ensures that the environment remains "logical" to the agent across different instances, providing coherent variation.

Key Results and Validation

The framework successfully encoded the Daw two-step task, a complex environment used to distinguish between model-based and model-free learning in humans and animals.

The Daw two-step task represented in the framework, showcasing the use of probabilistic transitions and state-dependent rewards.

Beyond replication, random generation produced a "key-door" environment where an agent must visit one specific state to set a "flag" before it can receive a reward at a second state. To facilitate research, the author provides a machine-readable JSON-based specification format for these tasks.

Limitations and Future Work

The current framework is primarily designed for discrete state and action spaces. Extending this to continuous control (like robotics) remains a future challenge. Additionally, while the 2D extension exists, purely random generation often creates "teleportation" transitions that don't mimic physical space. Adding more "topological" constraints could make generated tasks more intuitive. Finally, the controllable complexity of these tasks makes the framework ideal for training agents on an "automatic curriculum" that gets progressively harder as the agent improves.

Summary updated

Abstract

We describe a parametrized space for simple meta-reinforcement-learning (meta-RL) tasks with arbitrary stimuli. The parametrization allows us to randomly generate an arbitrary number of novel simple meta-learning tasks. The space of meta-RL tasks covered by this parametrization includes many well-known meta-RL tasks, such as bandit tasks, the Harlow task, T-mazes, the Daw two-step task and others. Simple extensions allow it to capture tasks based on two-dimensional topological spaces, such as find-the-spot or key-door tasks. We describe a number of randomly generated meta-RL tasks and discuss potential issues arising from random generation.
BibTeX
@misc{miconi2023large,
  author = {Thomas Miconi},
  title = {{A large parametrized space of meta-reinforcement learning tasks}},
  year = {2023},
  eprint = {2302.05583},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.05583},
}

Loading related content...

Figure