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:
- 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.
- Gaussian process prior. A GP prior regularizes the diffusion model and explicitly quantifies uncertainty, promoting more efficient learning and reliable subgoal generation.
- 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.
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:
Training combines three terms, L = Ldm + ψ Lgp + η Ldpg (Eq. 4):
- Diffusion loss Ldm: the usual noise-prediction loss, on the relabeled subgoals of the high-level replay buffer. It aligns the policy with the distribution of subgoals that are compatible with the current low-level policy.
- Policy-gradient loss Ldpg = −E[Qh(s, g0)]: the high level is trained with TD3, as in HIRO, HRAC and HIGL. Because the subgoal is reparameterized by the denoising chain, the gradient of the critic flows through the entire diffusion process.
- GP loss Lgp, described next.
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
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):
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.
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:
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).
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}
}