TL;DR
CDHRL (Causality-Driven Hierarchical Reinforcement Learning) replaces inefficient, randomness-based exploration with a structured approach that discovers causal relationships between environment variables. By understanding that certain subgoals are prerequisites for others (e.g., you need a pickaxe to get iron), the agent builds a high-quality hierarchy that significantly boosts learning speed and success rates in complex, sparse-reward tasks.
The Challenge: Sparse Rewards and Subgoal Discovery
Reinforcement Learning (RL) often struggles in environments with "sparse rewards"—where an agent might need to execute thousands of precise actions before receiving any positive feedback, such as crafting a diamond in Minecraft. Hierarchical RL (HRL) attempts to solve this by breaking overarching tasks into manageable subgoals.
However, a major bottleneck in HRL is subgoal discovery. Most current methods rely on "randomness-driven exploration," where the agent essentially flails around with high-entropy policies until it accidentally hits a meaningful state. In complex environments with many variables, the odds of accidentally executing a deep sequence of actions (like crafting a tool) are near zero. A more intentional way to discover the structure of the world is required.
The CDHRL Framework
To address this, the authors introduce CDHRL, a framework that utilizes an iterative "boosting" loop to uncover the environment's underlying structure.
The framework operates across three main phases:
- Causality Discovery: The agent learns a Structural Causal Model (SCM) to identify how environment variables (EVs) affect one another, representing these relationships as a Directed Acyclic Graph (DAG). For example, it might discover that possessing a
StonePickaxeis a causal parent of obtainingIronOre. - Subgoal Hierarchy Construction: These causal links are transformed into a hierarchy of subgoals. If variable $A$ causes variable $B$, then "increasing $A$" becomes a prerequisite subgoal for "increasing $B$."
- Intervention Sampling: Instead of observing random transitions, the agent uses its currently learned subgoal policies to "intervene" in the environment. By purposefully changing the value of a variable (like acquiring a pickaxe) and observing the downstream effects, it collects much higher-quality data to refine the causal discovery model in the next round.
The system employs a multi-level DQN architecture with Hindsight Experience Replay (HER) to train the policies once the hierarchy is established.
Experimental Setup
The researchers evaluated CDHRL in two complex, discrete-action environments characterized by extremely sparse rewards and complex dependencies:
- 2D-Minecraft: A simplified version of the game where agents navigate, collect materials, and craft increasingly complex tools to eventually obtain a diamond.
- Eden: A survival sandbox game where the agent must manage satiety and thirst by hunting and finding water, while collecting materials to survive the night.
Key Insights
- Causality as a Natural Hierarchy: The causal structure of a world naturally forms its subgoal hierarchy. If $X$ causes $Y$, then $X$ is a logical stepping stone to $Y$.
- The Virtuous Cycle: Causality discovery and policy training are interdependent. Better causal models lead to better subgoals; better subgoal policies allow for more precise "interventions," which in turn make the causal model even more accurate.
- Filtering the Noise: By focusing on controllable environment variables, CDHRL ignores "unreachable" or "useless" subgoals that often plague other HRL methods, effectively shrinking the search space.
Key Results
CDHRL demonstrated massive improvements in both exploration efficiency and overall learning speed.
- Exploration Efficiency: In 2D-Minecraft, CDHRL reached "hard" milestones (like getting iron or diamonds) thousands of times more often than baselines like HAC or MEGA within the same training budget.
- Learning Speed: As shown in the success ratio trajectories, CDHRL agents achieved high success rates much faster than competitors. While baselines like HAC and LESSON struggled to move past zero success in the first million steps, CDHRL showed a clear, steady upward trajectory.
- Causal Accuracy: Using metrics like Structure Hamming Distance (SHD), the authors proved that using hierarchical policies to collect data results in a significantly more accurate causal graph than relying on random actions.
Limitations and Future Work
Currently, the method is designed for environments with discrete environment variables (e.g., integer counts of items). Extending this to continuous variables remains a noted challenge. Furthermore, the model assumes that Environment Variables are already disentangled from raw observations. For purely image-based games, an additional disentangled encoder would be necessary to extract these variables first. Future work will investigate applying this causality-driven approach to more diverse and open-ended environments.
Summary updated