Active Imitation Learning of Hierarchical Policies

Mandana Hamidi, Prasad Tadepalli, Robby Goetschalckx, Alan FernIJCAI 2015

Abstract

In this paper, we study the problem of imitation learning of hierarchical policies from demonstrations. The main difficulty in learning hierarchical policies by imitation is that the high level intention structure of the policy, which is often critical for understanding the demonstration, is unobserved. We formulate this problem as active learning of Probabilistic State-Dependent Grammars (PSDGs) from demonstrations. Given a set of expert demonstrations, our approach learns a hierarchical policy by actively selecting demonstrations and using queries to explicate their intentional structure at selected points. Our contributions include a new algorithm for imitation learning of hierarchical policies and principled heuristics for the selection of demonstrations and queries. Experimental results in five different domains exhibit successful learning using fewer queries than a variety of alternatives.

Introduction

Imitation learning—where an agent learns by watching an expert—is a powerful tool, but it struggles with complex, long-horizon tasks. Humans naturally organize these tasks into hierarchies; for example, "making a sandwich" involves subtasks like "getting bread" and "spreading jam."

The core challenge is that while we can see the expert's raw actions (the "what"), the hierarchical "intent" (the "why") is unobserved. We don't know exactly when a subtask starts, when it ends, or which high-level goal the expert is currently pursuing. Inferring this structure from raw data is computationally NP-hard and often results in "unnatural" hierarchies that humans can't easily understand or correct.

Methodology

The authors propose a framework that treats hierarchical policies as Probabilistic State-Dependent Grammars (PSDGs). This is a novel way to represent task hierarchies that generalizes existing models like MAXQ.

Example of a hierarchical task structure in the Kitchen domain.

To learn these grammars efficiently, they use a two-level active learning approach:

  1. Trajectory Selection (Top Level): The agent looks at a pool of expert demonstrations and decides which one is most "informative" to analyze. They introduce a new heuristic called Cost-Normalized Information (CNI). Unlike standard "uncertainty sampling," CNI selects trajectories that are surprising to the current model but won't require an excessive number of questions to figure out.
  2. Query Selection (Bottom Level): Once a trajectory is chosen, the agent asks the teacher specific questions (e.g., "At this step, were you trying to perform subtask X?"). They use Bayesian Active Learning (BAL) to pick the questions that most quickly narrow down the possible "parse trees" (the structural explanation) of the demonstration.

Once the structure is clarified, the agent uses TILDE (a relational decision tree learner) to generalize the rules, allowing it to apply what it learned to new, unseen states.

Experimental Setup

The authors evaluated their approach across five diverse simulated domains:

  • Subtraction: Learning the "pencil and paper" algorithm for multi-digit subtraction.
  • Kitchen: A stochastic domain involving preparing meals with main and side dishes.
  • Assembly: A furniture assembly task (building cabinets with doors and drawers).
  • Taxi: A classic reinforcement learning benchmark where a taxi must pick up and drop off passengers, modified here to include refueling.
  • RTS (Real-Time Strategy): A simplified game environment where an agent collects resources and attacks enemies.

Analysis of Heuristics

A common active learning strategy is to pick the most "uncertain" example (highest Tree Entropy). However, the authors found this actually performs worse than random selection. High entropy usually correlates with very long, complex trajectories that require a massive number of queries to disambiguate, overwhelming the learning process.

The CNI heuristic balances the "surprise" of a trajectory (Shannon information) against the "cost" of disambiguating it (the expected number of queries). This allows the agent to learn from "bite-sized" chunks of new information, avoiding the "Tree Entropy trap."

Key Results

Experimental results demonstrate the efficiency of the active hierarchical learning approach:

  • Query Efficiency: In all five domains, the CNI heuristic reached high accuracy (often 90-100%) using significantly fewer queries than random selection or standard entropy-based methods.
  • Success Rate: In the Taxi and RTS domains, the active hierarchical learner achieved a near 100% goal-success rate with just 20-40 training trajectories, while the "flat" learner struggled below 60% success even after 100+ trajectories.
  • Interpretability: Because the agent learns using the teacher's vocabulary of subtasks, the resulting policy is inherently more aligned with human intuition.
Comprehensive results across all domains showing accuracy vs. queries and goal-success rates.

Conclusion and Future Work

This research highlights that hierarchical learning is far more sample-efficient than "flat" imitation learning for complex tasks. While the method significantly reduces the number of queries, it currently assumes that subtask definitions (names and termination conditions) are known beforehand. Future work could involve extending this to incremental settings or learning to discover subtask definitions autonomously through interaction.

Summary updated

BibTeX
@inproceedings{hamidi2015active,
  author = {Mandana Hamidi and Prasad Tadepalli and Robby Goetschalckx and Alan Fern},
  title = {{Active Imitation Learning of Hierarchical Policies}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2015},
  url = {https://openreview.net/forum?id=SyZ3CfG_br},
}
Figure