On the benefits of pixel-based hierarchical policies for task generalization

Tudor Cristea-Platon, Bogdan Mazoure, Joshua M. Susskind, Walter Talbott · Submission to ICLR 2024 · Withdrawn

TL;DR

While hierarchical reinforcement learning (HRL) from pixels often seems unnecessarily complex for single-task benchmarks, this paper demonstrates that its true superpower lies in task generalization. By pairing hierarchical world-model architectures with task conditioning, agents can compose reusable lower-level motor skills to achieve superior zero-shot transfer on out-of-distribution tasks and adapt to novel environments up to $3\times$ faster during fine-tuning.

What Problem Does This Paper Address?

Reinforcement learning practitioners frequently shy away from hierarchical architectures—especially when learning directly from high-dimensional visual inputs (pixels). Standard flat policies (such as DreamerV2 or DreamerV3) usually match or beat hierarchical policies on isolated benchmark tasks without the architectural headaches.

However, the authors argue that evaluating HRL on isolated, single-task benchmarks misses the point. The core promise of hierarchy is temporal abstraction and skill composition: learning low-level motor primitives (like walking) that can be recombined by a high-level policy to solve diverse, unseen problems (like navigating novel mazes). This paper explores whether pixel-based HRL, when equipped with task conditioning, meaningfully outperforms flat policies in multi-task training, zero-shot out-of-distribution (OOD) generalization, and few-shot adaptation.

Methods

The authors compare two pixel-based, world-model actor-critic architectures sharing identical world-model foundations:

  • Hierarchical Agent (Director): Uses a learned world model and a categorical Variational Autoencoder (VAE). A high-level Manager sets abstract sub-goals in the latent space every $k$ steps (shortening the effective task horizon), while a low-level Worker executes primitive joint controls to reach those sub-goals.
  • Flat Baseline (DreamerV3): Directly maps latent world-model states to primitive joint actions.

Both agents incorporate task conditioning:

  • In locomotion tasks, the extrinsic reward is fed into the world model (inspired by MELD) to help infer task parameters (e.g., target speed).
  • In navigation tasks, goal information is inferred implicitly from visual inputs (egocentric RGB camera views of a target).

Datasets

The authors evaluated agents across simulated continuous control and navigation environments:

  • DeepMind Control (DMC) Locomotion:
  • Bipedal Walker: Trained on target velocities sampled uniformly from $[1.0, 3.0]$; evaluated on $[0.0, 8.0]$.
  • Quadruped Walker: Trained on target velocities from $[0.5, 1.5]$; evaluated on $[0.0, 5.0]$.
  • Quadruped Visual Maze Navigation:
  • Training: A $5 \times 5$ square arena with colored walls and a randomly re-spawning green sphere target.
  • Zero-Shot Evaluation: A larger $9 \times 9$ box, an L-maze (one corner, additional wall colors), and an S-maze (two corners, further wall color variations).
  • Fine-Tuning Benchmark: Few-shot adaptation on the complex S-maze.

Key Insights and Ideas

  • Hierarchy acts as a modular regularizer: Learning a separate worker decouples low-level balance and locomotion from high-level navigation and speed tracking. When tasks shift OOD, the worker still knows how to move, leaving only the high-level policy to adapt.
  • Temporal abstraction sweet spot: Ablating the Manager’s goal horizon length ($k$) shows an inverted U-shape performance curve. When $k$ is too small (e.g., $k=1$) or too large ($k \to \infty$), the hierarchy collapses into a flat policy. A goal horizon of $k=8$ steps was empirically optimal.
  • Modular fine-tuning drastically cuts sample complexity: Because low-level motor skills transfer across environments, the Worker policy can be completely frozen during downstream adaptation.

Key Results

  • Faster In-Domain Training: In quadruped locomotion, the hierarchical agent converged twice as fast as the flat policy (bipedal learning rates were comparable).
  • Out-of-Distribution Reward Generalization: When prompted to move at speeds well outside the training distribution (up to $8.0$ for bipedal and $5.0$ for quadruped), the hierarchical agent tracked target velocities closely, whereas the flat policy drastically degraded.
  • Zero-Shot State-Space Generalization:
  • In the larger $9 \times 9$ box, the hierarchical policy collected an average of 14 targets per episode vs. only 3 targets for the flat policy.
  • In the L-maze, the hierarchical agent achieved 100% success in 800 steps, while the flat agent achieved 90% success but required nearly twice as many steps (1,500).
  • In the complex S-maze, the hierarchical agent achieved a 60% zero-shot success rate, while the flat policy failed completely (0%).
  • Few-Shot Fine-Tuning Efficiency: In the S-maze, fine-tuning only the World Model and Manager required just 220k steps to reach the success threshold. In comparison, fine-tuning the flat policy took 660k steps, fine-tuning the entire hierarchy end-to-end took 960k steps, and training from scratch took 1,560k to 1,920k steps.

Limitations and Future Work

  • Model Scope: The evaluation is restricted to comparisons between two specific world-model architectures (Director vs. DreamerV3) on simulated locomotion/navigation benchmarks.
  • Visual Overfitting in Latent Goals: Because the Worker is conditioned on latent state encodings rather than symbolic goals, changes in basic environment textures (e.g., floor colors) could confuse goal reaching.
  • Future Directions: The authors suggest pairing hierarchical policies with Large Language Models (LLMs) to condition the worker on abstract semantic primitives (e.g., "turn left", "move forward") rather than raw latent states, further improving visual invariance and cross-environment transfer.

Summary updated

BibTeX
@misc{cristeaplaton2024benefits,
  author = {Tudor Cristea-Platon and Bogdan Mazoure and Joshua M. Susskind and Walter Talbott},
  title = {{On the benefits of pixel-based hierarchical policies for task generalization}},
  year = {2024},
  eprint = {2407.19142},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.19142},
}
Figure