Learning World Graphs to Accelerate Hierarchical Reinforcement Learning

Wenling Shang, Alexander Trott, Stephan Zheng, Caiming Xiong, Richard SocherarXiv 2019

Abstract

In many real-world scenarios, an autonomous agent often encounters various tasks within a single complex environment. We propose to build a graph abstraction over the environment structure to accelerate the learning of these tasks. Here, nodes are important points of interest (pivotal states) and edges represent feasible traversals between them. Our approach has two stages. First, we jointly train a latent pivotal state model and a curiosity-driven goal-conditioned policy in a task-agnostic manner. Second, provided with the information from the world graph, a high-level Manager quickly finds solution to new tasks and expresses subgoals in reference to pivotal states to a low-level Worker. The Worker can then also leverage the graph to easily traverse to the pivotal states of interest, even across long distance, and explore non-locally. We perform a thorough ablation study to evaluate our approach on a suite of challenging maze tasks, demonstrating significant advantages from the proposed framework over baselines that lack world graph knowledge in terms of performance and efficiency.

Introduction

Autonomous agents, ranging from household robots to planetary rovers, must often navigate complex environments to perform diverse tasks. While Hierarchical Reinforcement Learning (HRL) aims to solve long-horizon problems by decomposing them into subgoals, it frequently struggles in large-scale or sparse-reward settings. A primary bottleneck is the lack of structural environment knowledge: a high-level "Manager" may assign unreachable subgoals, while a low-level "Worker" lacks the navigational capacity to traverse long distances efficiently.

This paper introduces a two-stage framework that autonomously discovers a "world graph"—a mental map of pivotal states and their connections—to bridge this gap. By leveraging this graph, the agent can offload long-range navigation to classic planning and focus its learning capacity on local, task-specific behaviors.

Methodology

The proposed framework operates in two distinct phases: unsupervised discovery and task-specific learning.

The proposed framework consists of world graph discovery followed by hierarchical reinforcement learning using "Wide-then-Narrow" instructions.

Stage 1: Unsupervised World Graph Discovery

The agent first explores the environment in a task-agnostic manner to identify "pivotal states"—structural landmarks like doorways or intersections. This is achieved through a novel recurrent Variational Auto-Encoder (VAE) architecture.

The pivotal state inference model uses BiLSTMs and a Hard Kumaraswamy (HK) bottleneck to identify critical states in a trajectory.

The VAE processes trajectories and uses a continuous relaxation of binary latent variables (the HardKuma distribution) to create a differentiable bottleneck. By forcing the model to reconstruct an entire action sequence using only a few key states, the system naturally identifies the most structurally significant locations. Once these nodes are established, the agent uses curiosity-driven exploration to find feasible paths between them, forming the edges of the world graph.

Stage 2: Accelerated Hierarchical Reinforcement Learning

In the second stage, the learned world graph is integrated into a Feudal Network (FN) architecture. The framework introduces two key innovations:

  1. Wide-then-Narrow (WN) Instructions: The Manager first selects a distant pivotal state (a "wide" goal) and then specifies a local target (a "narrow" goal) relative to that landmark.
  2. Graph-Aided Traversal: Instead of relying on RL for long-distance movement, the Worker uses dynamic programming to plan a route across the graph's edges. This allows the agent to traverse the environment reliably and explore non-locally.

Experimental Results

The framework was evaluated on a series of challenging 2D gridworld mazes (gym-minigrid), including tasks with sparse rewards, stochastic obstacles (lava), and logical dependencies (keys and doors).

  • Scalability: In large MultiGoal tasks, standard HRL baselines failed to achieve any reward. In contrast, the world graph approach successfully solved the tasks, demonstrating the necessity of structural knowledge for long horizons.
  • Complex Logic: On the Door-Key task, which requires sequential sub-tasks, the proposed method maintained a 56% success rate in medium-sized mazes where all baselines completely failed (0-1% success).
  • Discovery Quality: Ablation studies confirmed that pivotal states discovered via the VAE bottleneck are significantly more effective for HRL than randomly sampled landmarks, leading to higher stability and performance.

Discussion and Conclusion

The core insight of this work is that compression reveals structure. By forcing an agent to summarize its experiences through a sparse set of states, we can autonomously extract a topological map of the environment. This map transforms the HRL problem: the Manager no longer guesses subgoals in a vacuum, and the Worker no longer wanders aimlessly across long distances.

While currently demonstrated in discrete 2D environments, future work will explore extending these world graphs to high-dimensional, partially observable spaces and dynamic environments. This framework represents a significant step toward agents that can truly "understand" their surroundings to solve complex, multi-stage tasks.

Summary updated

BibTeX
@misc{shang2019learning,
  author = {Wenling Shang and Alexander Trott and Stephan Zheng and Caiming Xiong and Richard Socher},
  title = {{Learning World Graphs to Accelerate Hierarchical Reinforcement Learning}},
  year = {2019},
  eprint = {1907.00664},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.00664},
}
Figure