Hierarchical Reinforcement Learning for Zero-shot Generalization with Subtask Dependencies

Sungryull Sohn, Junhyuk Oh, Honglak Lee

Introduction: The Challenge of Complex Subtasks

Most hierarchical reinforcement learning (HRL) agents are trained to follow explicit, high-level instructions (e.g., "Go to A, then pick up B"). However, real-world tasks are rarely that straightforward. Often, an agent is given a set of goals with complex dependencies: "To make an omelet, you need eggs and a pan; but if you only have one egg left, you can't make both an omelet and a sandwich."

This paper introduces a framework for training RL agents to execute complex tasks defined by "subtask graphs"—logical structures that describe how different goals depend on one another. The core challenge addressed is Zero-shot Generalization. Can an agent look at a brand-new "recipe" (subtask graph) it has never seen before and immediately figure out the most efficient sequence of actions?

Example of a subtask graph and observation in the Mining domain.

To succeed, the agent must reason about:

  1. Dependencies: What must be done before what? (AND/OR logic).
  2. Rewards vs. Costs: Is it worth spending time on a low-reward subtask if it's a prerequisite for a high-reward one?
  3. Visual Context: How far away are the required items in the current environment?

Methods: Neural Subtask Graph Solver (NSGS)

To solve this, the authors propose the Neural Subtask Graph Solver (NSGS), which consists of two main components that process the environment and the task logic simultaneously.

The NSGS architecture combining a CNN for observations and an R3NN for the subtask graph.
  • The Task Module: This uses a Recursive-Reverse-Recursive Neural Network (R3NN). It processes the subtask graph in two passes: a "bottom-up" pass to understand which subtasks are currently eligible, and a "top-down" pass to propagate information about future rewards back to the current options.
  • The Observation Module: A standard Convolutional Neural Network (CNN) that looks at the 2D environment to estimate the "cost" (time/distance) of reaching specific items.

The most innovative part of the training is Graph Reward Propagation (GRProp). Training a complex graph-reasoning agent from scratch using only sparse RL rewards is notoriously difficult. To solve this, the authors created a "smoothed," differentiable version of the subtask graph. By replacing discrete logic (AND/OR) with continuous functions (Sigmoid/Tanh), they can calculate a gradient that "flows" reward information from the final goals back to the starting subtasks. They use this to pre-train the agent via policy distillation before fine-tuning it with standard Actor-Critic RL.

Evaluation Domains

The agents were evaluated on two 2D visual domains built on MazeBase:

  1. Mining: Inspired by Minecraft, where agents must collect raw materials (wood, stone) and use craft stations to build tools (pickaxes) to mine higher-value minerals. It included 640 unique subtask graphs.
  2. Playground: A more abstract and challenging domain where subtask graphs are randomly generated with complex logical expressions, including "distractor" subtasks that provide immediate reward but block future progress.

Key Insights and Results

  • Differentiable Logic: The breakthrough insight is realizing that a task graph doesn't have to be treated as a black box. By making the graph's logical structure differentiable (GRProp), the agent can "see" the path to future rewards through the gradient, even before it has successfully completed the task.
  • Zero-Shot Success: The NSGS agent successfully generalized to unseen subtask graphs that were much larger (more layers and more subtasks) than those seen during training.
  • Efficiency vs. Search: Unlike search-based methods like Monte-Carlo Tree Search (MCTS), the NSGS learns to perform "reasoning" implicitly through its neural embeddings. On the Playground domain, the NSGS agent performed as well as an MCTS using 32,000 simulations, despite the NSGS requiring zero simulations at test time.
  • Search Augmentation: While the neural agent is fast and effective on its own, it can be made even better by using it as a "rollout policy" for MCTS. When combined, the agent achieved 97% of the optimal reward using only 0.005% of the simulations required by a pure search-based approach.
  • Avoiding Traps: In the Playground domain, the agent learned to ignore "distractor" subtasks (which give small immediate rewards but prevent the completion of high-reward tasks), whereas a "Greedy" baseline agent consistently fell for them.

Limitations and Future Work

While highly effective, the current model assumes the subtask graph is provided to the agent upfront. In many real-world scenarios, an agent would have to discover these dependencies through experience. Furthermore, the dependencies are fixed at the start of the episode; future work could explore dynamic graphs where dependencies change based on the agent's actions or environmental shifts. Finally, the framework relies on a pre-trained "subtask executor," meaning integrating the learning of low-level motor skills with high-level graph reasoning remains an open challenge for end-to-end robotics.

Summary updated

BibTeX
@inproceedings{sohn2018hierarchical,
  author = {Sungryull Sohn and Junhyuk Oh and Honglak Lee},
  title = {{Hierarchical Reinforcement Learning for Zero-shot Generalization with Subtask Dependencies}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=Bk4ALw-ubB},
}
Figure