Unsupervised Hierarchical Skill Discovery

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

TL;DR

The paper introduces Hierarchical Skill Discovery (HiSD), a fully unsupervised framework that extracts multi-level skill hierarchies from raw, unlabelled observational data without requiring action labels or reward signals. By combining temporal action segmentation with grammar-based sequence compression, HiSD builds meaningful behavioral trees that significantly accelerate and stabilize learning in downstream reinforcement learning tasks.

What Problem Does This Paper Address?

To solve complex, long-horizon tasks, reinforcement learning (RL) agents benefit immensely from hierarchical planning—breaking down a massive goal (like "build a house in Minecraft") into sub-tasks ("gather wood," "craft tools"). However, discovering these hierarchies automatically remains a major bottleneck.

Most existing hierarchical RL methods rely on strong assumptions: they require explicit action labels, reward functions, or handcrafted annotations. Furthermore, they often produce "flat" skill sets rather than deep, compositional structures. This paper tackles the challenge of discovering multi-level skill hierarchies purely from passive, unlabelled observations (such as video data), removing the need for active environment interaction or action logs during the discovery phase.

Methods

HiSD decouples structure discovery from policy execution using a elegant two-stage pipeline:

  1. Unsupervised Skill Identification (Segmentation): Continuous observation trajectories are first sliced into discrete, temporally consistent behavioral units. The authors achieve this using an unsupervised Temporal Action Segmentation (TAS) method based on Adversarial Sequence Optimal Transport (ASOT). This step clusters frames based on visual coherence and applies a temporal regularity penalty to prevent rapid flickering of labels, effectively mapping continuous video frames to discrete "atomic" skill indices.
  2. Symbolic Abstraction and Grammar Induction (Compression): Once the trajectories are converted into sequences of atomic skill symbols, HiSD applies a modified version of Sequitur, a linear-time grammar induction algorithm. Sequitur compresses the sequence by maintaining two invariants: Digram Uniqueness (no pair of adjacent symbols appears more than once) and Rule Utility (every rule must be used at least twice).

To make Sequitur work across multiple independent episodes, the authors introduce a unique boundary token ($\phi$) between trajectories and explicitly prevent the algorithm from forming rules that cross this boundary. The resulting Context-Free Grammar (CFG) naturally forms a hierarchical tree where the root is the full trajectory, internal nodes are discovered multi-level subroutines, and leaves are the atomic skills.

Figure 2. Overview of the HiSD pipeline. Demonstration trajecto- ries are first segmented into skills. These skill sequences are then compressed and structured using a modified Sequitur algorithm, which identifies recurring mid-level subroutines across the dataset. The resulting grammar defines a hierarchical task decomposition.

Datasets

The authors evaluated HiSD on two highly challenging, pixel-based sequential decision-making environments:

  • Craftax: A 2D top-down benchmark inspired by Minecraft. The authors modified it to be fully observable and deterministic to test HiSD against expert trajectories generated by an $A^*$ planner across various static and randomized tasks.
  • Minecraft: The full, unmodified game. To test robustness against noisy, sub-optimal data, the authors used trajectories collected from OpenAI's pre-trained Video PreTraining (VPT) model. Visual features were extracted using MineCLIP embeddings. Two variations were tested: an "All" dataset with 44 fine-grained skills and a "Mapped" dataset with 14 high-level categories.

Key Insights and Ideas

  • Observation-Only Scalability: Because HiSD operates entirely on observational features (pixels/embeddings) without needing action labels, it can theoretically scale to abundant, unlabelled internet video data (like YouTube gameplay).
  • Overcoming Perceptual Aliasing via Time: In first-person games like Minecraft, walking toward a tree looks visually identical to walking toward a stone wall if the background is uniform. HiSD's temporal consistency prior allows it to resolve this ambiguity by leveraging the surrounding context of the trajectory.
  • Grammar as a Natural Hierarchy Builder: Using text compression algorithms (like Sequitur) on behavioral strings provides a mathematically clean way to discover hierarchical structure. Reusable subroutines are found simply because they are efficient ways to compress the "story" of the demonstration.

Key Results

HiSD consistently outperformed strong baselines like CompILE and OMPN in both segmentation accuracy and hierarchy quality.

  • Superior Segmentation: On complex tasks like Craftax's Stone Pickaxe (Static), baselines struggled to achieve even a 50% average mean Intersection-over-Union (mIoU), whereas HiSD achieved 66% mIoU and accurately identified skill boundaries without being provided with the sub-task order at inference time.
  • Parsimonious and Consistent Trees: In structural evaluations, HiSD generated significantly fewer unique trees across similar episodes compared to OMPN (which frequently generated a completely different tree for every single episode), demonstrating that HiSD finds genuinely reusable and stable abstractions.
  • Downstream RL Acceleration: As a proof of concept, the discovered hierarchies were turned into executable options using Behavioral Cloning for low-level control. When training a high-level PPO agent on a sparse-reward task, the HiSD Hierarchy agent reached near-optimal rewards within ~30k steps, drastically outperforming flat skills and primitive action baselines.
Downstream RL performance on the Craftax Make Wooden Pickaxe task, showing HiSD matching the ground truth hierarchy efficiency.

Limitations and Future Work

While powerful, HiSD has a few limitations that pave the way for future research:

  • Fixed Skill Budget ($K$): The maximum number of atomic skills $K$ must be provided as a hyperparameter. The authors suggest that future iterations could infer $K$ adaptively based on convergence metrics.
  • Sensitivity to Noise: Sequitur is a deterministic algorithm. If the initial segmentation stage introduces noise or near-duplicate skill sequences, Sequitur treats them as entirely distinct, which inflates tree sizes in highly stochastic environments (like the Minecraft "All" task). Integrating probabilistic grammars (like PCFGs) could help marginalize over this noise.
  • Single-Skill Assumption: HiSD assumes an agent executes exactly one skill per timestep, making it unsuited for concurrent behaviors (e.g., moving and manipulating an object simultaneously).

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