Learning Task Decomposition with Ordered Memory Policy Network

Yuchen Lu, Yikang Shen, Siyuan Zhou, Aaron C. Courville, Joshua B. Tenenbaum, Chuang Gan

Many complex real-world tasks are composed of several levels of subtasks. Humans leverage these hierarchical structures to accelerate the learning process and achieve better generalization. This paper, published at ICLR 2021, introduces a novel neural architecture designed to solve a fundamental challenge in robotics and AI: how can an agent learn to break down a complex task into a hierarchy of simpler sub-tasks just by watching an expert?

TL;DR

The Ordered Memory Policy Network (OMPN) discovers sub-task hierarchies from unstructured demonstrations without requiring manual labels. By using a specialized memory architecture and a differentiable "stick-breaking" process, the model naturally reveals sub-task boundaries through its internal state, outperforming existing baselines in both unsupervised and weakly supervised settings.

What Problem Does This Paper Address?

Learning from Demonstration (LfD) is a powerful way to train agents, but simply imitating an expert's raw actions often leads to brittle policies that cannot easily generalize. To be truly intelligent, an agent needs to understand the structure of a task—decomposing a long-term goal (like "make a bridge") into modular skills (like "get wood" then "go to factory").

Hierarchical task decomposition in the Craft environment

While hierarchical imitation learning exists, most methods rely on complex latent variable models or expensive manual labeling of sub-task boundaries. The authors identify a critical gap: can we design a neural network with an inductive bias such that hierarchical structure emerges naturally during training, making task decomposition a byproduct of the learning process?

Methods

The core innovation is the Ordered Memory Module. Instead of a flat memory state, OMPN maintains a bank of memory slots $[M_1, M_2, ..., M_n]$, where each slot represents a different level of the sub-task hierarchy.

The Ordered Memory Policy Network architecture showing bottom-up and top-down recurrence

Key technical components include:

  • Horizontal Updates & Vertical Expansion: Inspired by Hierarchical Abstract Machines, the model performs "horizontal" updates (updating the current sub-task state) and "vertical" expansions (calling a lower-level sub-task).
  • Differentiable Stick-Breaking: To decide which level of the hierarchy is currently active, the model uses a stick-breaking process to produce an "expansion position" ($\pi$). This makes the discrete-looking choice of "which sub-task am I doing?" fully differentiable and trainable via backpropagation.
  • Bottom-Up/Top-Down Recurrence: Information flows up from observations to update sub-tasks, and then down from high-level goals to produce specific actions.
  • The done Regularization: The authors augment the action space with a special done token. Forcing the model to predict when a full demonstration ends provides a crucial signal that helps it learn to "raise" its expansion position, effectively discovering boundaries.

Datasets

The authors evaluated OMPN on three distinct environments:

  1. Craft: A grid-world environment where agents must collect materials and use tools to complete tasks like makeaxe or makebed. It includes both full and partial observability settings.
  2. Dial: A continuous control robotic task where a JACO arm must press a sequence of numbers on a keypad.
  3. Kitchen: A complex, high-dimensional robotic environment involving interacting with various kitchen objects (microwave, kettle, cabinets) to provide qualitative proof of the model's scalability.

Key Insights and Ideas

  • Architecture as Inference: Instead of an explicit "inference stage" to find sub-tasks, the hierarchy is baked into the memory trace. You can find sub-task boundaries simply by looking at where the "expansion position" peaks.
  • Robustness to Partial Observability: One of the most striking findings is that OMPN handles partially observable environments much better than baselines. Because it maintains a hierarchy, the higher-level memories can act as a "stable anchor" when the immediate observation is noisy or incomplete.
  • Emergent Multi-level Hierarchy: Even if the ground truth only has two levels, OMPN can discover deeper structures if given more memory slots, often grouping related sub-tasks together logically.

Key Results

OMPN consistently outperformed the primary baseline, compILE, in task decomposition:

  • Craft (Full Observation): OMPN achieved 93% Alignment Accuracy, compared to 86% for compILE.
  • Craft (Partial Observation): The gap widened significantly, with OMPN maintaining 84% accuracy while compILE dropped to 54%.
  • Dial: In the robotic keypad task, OMPN achieved 87% alignment accuracy unsupervised, nearly matching the performance of TACO (98%), which requires "sketches" (the sequence of sub-tasks) as extra supervision.
  • Behavior Cloning: Beyond just finding boundaries, OMPN matched or exceeded the success rates of standard LSTMs and MLPs in actually performing the tasks.

Limitations and Future Work

The authors note that while OMPN is excellent at discovering structure, it doesn't yet fully exploit "sketches" (when the sub-task sequence is known). Their current method of simply concatenating the sketch to the observation is likely too trivial; they suggest that using attention mechanisms over the sketch sequence could be a more fruitful path.

Additionally, while the model discovers the hierarchy, the next logical step is to use these discovered sub-tasks for Hierarchical Reinforcement Learning (HRL), allowing an agent to solve entirely new, unseen tasks by recombining the skills it has decomposed.

Summary updated

BibTeX
@inproceedings{lu2021learning,
  author = {Yuchen Lu and Yikang Shen and Siyuan Zhou and Aaron C. Courville and Joshua B. Tenenbaum and Chuang Gan},
  title = {{Learning Task Decomposition with Ordered Memory Policy Network}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=hak2VPPKOAA},
}
Figure