ICML 2025

Hierarchical Reinforcement Learning with Uncertainty-Guided Diffusional Subgoals

Vivienne Huiling Wang1 Tinghuai Wang2 Joni Pajarinen1

1Department of Electrical Engineering and Automation, Aalto University  ·  2Huawei Helsinki Research Center

Abstract

Hierarchical reinforcement learning (HRL) learns to make decisions on multiple levels of temporal abstraction. A key challenge in HRL is that the low-level policy changes over time, making it difficult for the high-level policy to generate effective subgoals. To address this issue, the high-level policy must capture a complex subgoal distribution while also accounting for uncertainty in its estimates. We propose an approach that trains a conditional diffusion model regularized by a Gaussian Process (GP) prior to generate a complex variety of subgoals while leveraging principled GP uncertainty quantification. Building on this framework, we develop a strategy that selects subgoals from both the diffusion policy and GP's predictive mean. Our approach outperforms prior HRL methods in both sample efficiency and performance on challenging continuous control benchmarks.

A high-level policy on top of a changing low-level policy

In goal-conditioned HRL, a high-level policy breaks a long task into subgoals and a low-level policy acts to reach each one. Every k environment steps the high-level policy proposes a subgoal g for the current state s and the final goal; in between, the low-level policy receives an intrinsic reward for reaching it.

Both levels are trained off-policy at the same time, so the low-level policy keeps changing. A subgoal stored in the replay buffer may no longer lead where it once led, and old high-level experience becomes invalid. HIRO relabels each stored high-level transition with the subgoal that makes the observed low-level actions most probable under the current low-level policy. The relabeled subgoals form the data that the high-level policy should fit.

HIDI at a glance

HIDI (HIerarchical RL subgoal generation with DIffusion model) models the state-conditional distribution of subgoals at the high level. It makes three contributions:

  1. Conditional diffusion model for subgoals. The high-level policy is the reverse process of a diffusion model that directly models a state-conditioned distribution of subgoals.
  2. Gaussian process prior. A GP prior regularizes the diffusion model and explicitly quantifies uncertainty, promoting more efficient learning and reliable subgoal generation.
  3. Subgoal selection. Subgoals are selected from the GP's predictive mean and from the diffusion model, combining feasibility under past experience with the expressiveness of the diffusion model.
The HIDI framework: environment, low-level policy, diffusion high-level policy, replay buffer with relabeling, critic, GP prior and subgoal selection.
Framework. The diffusion policy πh proposes subgoals every k steps. It is trained with the diffusion loss on relabeled subgoals, the critic's policy gradient through the denoising chain, and the GP loss. The GP prior is fitted to the same replay buffer, and each decision selects between its predictive mean and a diffusion sample.

1 Diffusional subgoals

The high-level policy is the reverse process of a conditional diffusion model. Starting from Gaussian noise gN, it removes noise in N steps, each predicted by a network εθ that sees the current sample, the state s and the step index; the last sample g0 is the subgoal:

gi−1= 1αi (gi− βi1−α‾i ϵθ(gi,s,i)) +βiϵ(3)

Training combines three terms, L = Ldm + ψ Lgp + η Ldpg (Eq. 4):

A reverse diffusion chain in the maze: Gaussian noise becomes a set of subgoals over five steps.
Reverse process of the trained policy. Samples of πh for one state of the U-shaped maze, from Gaussian noise (left) to subgoals (right), computed with the released implementation.

2 A Gaussian process prior

Diffusion models need a lot of training data and have no built-in notion of uncertainty. HIDI places a zero-mean GP prior on the state-conditional distribution of subgoals, with an RBF kernel whose hyperparameters are learned. The negative log marginal likelihood of the GP is the regularizer Lgp, so the GP summarizes the state-subgoal pairs of the replay buffer and gives, for a new state s*, a predictive distribution

p(g*|s*,Dh,s‾)= N(g*|μ*,σ*2)(12)

with predictive mean μ* and variance σ*2. To keep this tractable for a large buffer, the GP is a sparse GP with M learnable inducing states that summarize the buffer; they also mark regions of the state space that the data supports.

The gradient of the GP loss with respect to the policy parameters shows how the regularizer acts (Proposition 3.2):

∇θhLgp= E[(g−μ*(s)σ*2(s))⊤ ∇θhg]

The generated subgoal g is pulled toward the predictive mean μ*, and the pull is divided by the predictive variance: it is stronger in regions where the GP is confident and weaker where it is not. Theorem 3.1 states that, under mild regularity assumptions, the regularizer encourages the diffusion policy to align with μ* in regions of low predictive variance.

A Gaussian process over states with predictive mean, variance band and inducing states, and the pull on diffusion samples.
GP regularization. Predictive mean μ*, 2σ* band and inducing states of a sparse GP fitted to state-subgoal pairs. Both generated subgoals lie at the same distance from μ*; the pull (g − μ*) / σ*2 is 48.2 where σ*2 = 0.011 and 6.1 where σ*2 = 0.090.

3 Selecting subgoals with the GP mean and the diffusion model

At every high-level decision, HIDI selects the subgoal from the GP's predictive mean with probability ε and otherwise samples the diffusion policy:

g*= { μ*,with probability ε g∼πθh(g|s*),with probability 1−ε (15)

The GP mean is informed by state-subgoal pairs in the replay buffer. It anchors the selection in regions supported by past experience, while the diffusion model keeps the choice flexible. Under the assumption of a near-optimal diffusion policy, the strategy has a bounded single-step regret (Theorem 3.3), and, under certain conditions, selecting the GP mean with a certain probability does not degrade performance in a single-step sense (Proposition 3.4).

Subgoal selection: with probability epsilon the GP mean, otherwise a diffusion sample.
Subgoal selection. Each decision draws the GP mean μ* with probability ε and a sample of πh otherwise.

Interactive demo

The demo runs the trained high-level policy, its critic and its GP in your browser, with the networks exported from the released implementation. Four steps show how the diffusion policy proposes subgoals, what the GP prior says about them, how the GP loss pulls the policy's subgoals toward the GP's suggestion, and how the final subgoal is selected. Click the maze to move the robot and see how each answer changes with the state.

All dimensions of the state other than the robot position are held at a reference posture of the robot.

Video

    Code

    PyTorch implementation: github.com/vi2enne/HIDI-HRL. It covers Point Maze, Ant Maze (U-shape, W-shape and a stochastic U-shape), Reacher and Pusher.

    BibTeX

    @inproceedings{wang2025hidi,
      title     = {Hierarchical Reinforcement Learning with Uncertainty-Guided Diffusional Subgoals},
      author    = {Wang, Vivienne Huiling and Wang, Tinghuai and Pajarinen, Joni},
      booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
      series    = {Proceedings of Machine Learning Research},
      volume    = {267},
      year      = {2025}
    }