Unsupervised Hierarchical Skill Discovery

Damion Harvey, Geraud Nangue Tasse, Benjamin Rosman, Branden Ingram, Steven James

Introduction: The Challenge of Long-Horizon RL

Reinforcement Learning (RL) agents frequently struggle with "long-horizon" tasks—objectives that require executing a precise sequence of many small actions over extended periods, such as mining iron in Minecraft. Humans naturally approach these tasks hierarchically, breaking them down into high-level goals ("get wood," "craft a pickaxe") rather than focusing on low-level motor commands.

While Hierarchical RL (HRL) attempts to replicate this, existing methods face a significant bottleneck: they rely heavily on supervision. Most approaches require explicit action labels, dense reward signals, or human-annotated skill boundaries. This reliance prevents the use of vast amounts of unlabelled video data, such as internet gameplay footage. This paper introduces a novel approach to discover complex task hierarchies purely by observing visual changes, without requiring any action labels or rewards.

Introducing HiSD: A Two-Stage Unsupervised Framework

The authors propose Hierarchical Skill Discovery (HiSD), a two-stage pipeline that extracts multi-level skill hierarchies from raw, unlabelled video trajectories.

1. Unsupervised Skill Identification (Segmentation)

The model processes raw video frames using Action Segmentation via Optimal Transport (ASOT). Unlike standard clustering, ASOT incorporates a "temporal regularity" constraint. This prevents the model from flickering between skills, forcing it to group visually coherent frames into continuous, discrete "atomic" skills (e.g., a sequence of Skill 1, followed by Skill 5, followed by Skill 2).

2. Symbolic Abstraction (Hierarchy Induction)

Once the video is converted into a sequence of discrete skill IDs, HiSD applies Sequitur, a classic grammar-based compression algorithm. Sequitur identifies repeating patterns across episodes (e.g., "Skill A followed by Skill B") and creates new non-terminal rules. This recursive process builds a deep, branching tree representing the task's hierarchical structure.

Crucially, this method is entirely observation-based; it focuses solely on environmental changes rather than the specific actions taken to achieve them. It treats a complex task like a language, where "sentences" (tasks) are made of "phrases" (subroutines) which are made of "words" (atomic skills).

Experimental Setup

HiSD was evaluated on two challenging domains:

  • Craftax: A 2D top-down survival environment. The authors generated 500 expert trajectories using an A* planner to test the model's ability to recover known task structures.
  • Minecraft: The full, unmodified 3D game. The dataset comprised 500 episodes of an OpenAI Video PreTraining (VPT) agent collecting stone. This noisy, human-like dataset provided a rigorous test of the model's robustness.

Key Findings and Performance

  • Superior Segmentation: In the Minecraft "Mapped" task, HiSD achieved a 33% mean Intersection-over-Union (mIoU), significantly outperforming baselines like OMPN (8%) and CompILE (5%).
  • Structural Consistency: On the "WSWS Random" task, HiSD perfectly matched the ground truth by discovering exactly 9 unique trees. In contrast, the OMPN baseline produced 499 unique trees, essentially failing to identify reusable structures across episodes.
  • RL Acceleration: As a proof of concept, the discovered skills were used to train a downstream RL agent. On the "Craft Wooden Pickaxe" task, the HiSD-informed agent reached near-optimal performance in just 30,000 steps, whereas a standard PPO agent using primitive actions failed completely.
  • Computational Efficiency: HiSD proved remarkably lightweight, training successfully on consumer-grade hardware (RTX 3050/3080), whereas baselines required enterprise-grade setups (RTX 3090s with 128GB RAM).

Limitations and Future Directions

While HiSD represents a significant step forward for unsupervised HRL, it has a few limitations. First, the model currently requires a predefined budget ($K$) for the maximum number of atomic skills; future work could explore adaptively inferring this parameter. Second, because Sequitur is a deterministic algorithm, slight noise in the initial segmentation can disrupt pattern recognition. Transitioning to Probabilistic Context-Free Grammars (PCFGs) could improve resilience. Finally, HiSD assumes sequential, non-overlapping skills. Future iterations might utilize multi-label transport to model concurrent behaviors, such as moving while crafting.

Summary updated

BibTeX
@inproceedings{harvey2026unsupervised,
  author = {Damion Harvey and Geraud Nangue Tasse and Benjamin Rosman and Branden Ingram and Steven James},
  title = {{Unsupervised Hierarchical Skill Discovery}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Wrywrky3Fk},
}
Figure