Most Reinforcement Learning (RL) agents are "specialists"—they spend millions of steps mastering one specific task. Meta-RL aims to create "generalists" that can see a new task and adapt almost instantly through few-shot learning.
However, current Meta-RL usually struggles with complex, hierarchical tasks where strict prerequisites exist (e.g., you must do A and B before you can do C). Imagine trying to make breakfast: you cannot fry an egg until you have picked up the egg and turned on the stove. In many environments, these "subtask dependencies" are invisible to the agent, and rewards are sparse, only granted at the very end of a long sequence. While standard agents wander aimlessly, existing hierarchical RL often assumes the "recipe" (the subtask graph) is already provided by a human.
This paper tackles the challenge of building agents that must autonomously infer these dependencies through exploration, introducing a framework that learns to map out the hidden hierarchical structure of a task.
The MSGI Framework
The authors propose MSGI (Meta-learner with Subtask Graph Inference). By explicitly separating learning the structure from executing the task, the agent can handle much more complex hierarchies than an agent trying to learn everything implicitly in a "black-box" neural network.
The system consists of three main components:
- Adaptation Policy (The Explorer): During an initial "adaptation phase," the agent explores the environment. To make this efficient, the authors use an intrinsic reward inspired by Upper Confidence Bound (UCB). This encourages the agent to try subtasks it hasn't seen much or visit "novel" states, ensuring it gathers the best data for the next step.
- Subtask Graph Inference (The Scientist): Using the data gathered by the explorer, MSGI uses Inductive Logic Programming (ILP)—specifically Decision Trees (CART)—to figure out the rules of the world. It looks at which subtasks were completed and which ones subsequently became "eligible" to build a logical graph of preconditions.
- Test Policy (The Executor): Once the graph is inferred, the agent switches to a "test phase." It uses an algorithm called GRProp (Graph Reward Propagation) to calculate the best path through the inferred graph to maximize the final reward.
Key Insights and Ideas
- Structure as an Inductive Bias: Instead of hoping a Recurrent Neural Network (RNN) implicitly remembers task structure, MSGI treats the task as a Factored MDP. This allows the agent to use a compact, logical representation (the graph) that is much easier to reason about.
- The Power of Logic: Using Decision Trees to infer preconditions is a "symbolic" approach that works surprisingly well alongside deep learning. It allows the agent to reach "Aha!" moments—realizing exactly which building is required for which unit in a strategy game.
- Active Exploration: The UCB-based intrinsic reward is crucial. Without it, the agent might never try the specific sequence of actions needed to uncover a deep dependency, leaving the inferred graph incomplete.
Experimental Domains and Key Results
The researchers evaluated MSGI on increasingly difficult domains, including grid-world environments (Mining & Playground), a custom StarCraft II "Build Unit" scenario managing a complex technology tree, and AI2-THOR, a realistic 3D kitchen environment requiring multi-step cooking tasks.
- Superior Adaptation: In the Playground domain, MSGI achieved significantly higher rewards after just 10-20 episodes of adaptation compared to RL² (a popular Meta-RL baseline) and standard Hierarchical RL.
- High Accuracy: In StarCraft II, MSGI inferred the complex technology tree with over 94% precision and 96% recall after only 20 episodes of exploration.
- Generalization: MSGI showed a remarkable ability to generalize. An agent trained on small subtask graphs (depth 4) could successfully adapt to much larger, deeper graphs (depth 6) at test time—a feat that standard Meta-RL agents failed to achieve.
Limitations and Future Work
The authors acknowledge a few key constraints in the current framework. First, the model assumes that the low-level "options" (e.g., the actual motor skills to "pick up an egg") are already learned, allowing MSGI to focus purely on high-level strategy. Second, the environment must act as an oracle, telling the agent when a subtask is completed.
In a truly "raw" environment, the agent would need to perceive these completions from pixels alone. Future directions include extending this framework to settings where the subtask structure itself must be discovered from pure visual observations without any predefined subtask labels.
Summary updated