Manuscript Offprint

arXiv:2610.12135

Q-Shaped Options for Hierarchical Reinforcement Learning

Clarisse Wibault, Antoine Gorceix, Antonio Léon Villares, Alexey Zakharov, Evangelos Chatzaroulas, Michael Matthews, Eduardo Pignatelli, Jakob Foerster

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Learning to tackle long-horizon, goal-conditioned tasks requires an agent to reason over extended timescales and act across a broad range of states. In principle, Hierarchical Reinforcement Learning (HRL) addresses both challenges through the interaction between action (temporal) and state (spatial) abstraction. First, using an action abstraction to represent temporally extended behaviour as options reduces the effective decision horizon. Second, enabling different state abstractions at each level of the decision process permits greater data aggregation for learning. However, realising these two benefits of a hierarchical policy depends on learning an appropriate action abstraction. Current HRL algorithms fail in one of two ways. Some discard distinctions between options needed for optimal control, undermining hierarchy altogether. Others retain unnecessary distinctions, preserving horizon reduction, but forfeiting coarser state abstraction. In this work, we characterise three desiderata for an action abstraction. We introduce Q-Shaped Options (QSO) to address all three. QSO builds on an architecture with distinct state-value functions, Q functions and policies at each level of the hierarchy. It learns the action abstraction between consecutive levels as a shared encoder shaped by their respective Q functions. The low-level Q function uses the option as a goal, encouraging the abstraction to retain distinctions necessary for optimal control. The high-level Q function uses it as an action, encouraging unnecessary distinctions to be discarded. Across offline goal-conditioned locomotion and manipulation environments, QSO learns semantically meaningful option spaces and outperforms baselines, achieving non-zero performance in tasks where all other evaluated algorithms fail. Our code is open sourced at https://github.com/CWibault/QSO.

1 INTRODUCTION

Learning to tackle long-horizon, goal-conditioned (Kaelbling, 1993; Schaul et al., 2015) tasks requires an agent to reason over extended timescales and act across a broad range of states (Sutton et al., 1999; Park et al., 2026). In goal-conditioned two-tiered Hierarchical Reinforcement Learning (HRL) a high-level policy outputs a high-level action or option (Sutton et al., 1999) conditioned on the current state and goal; a low-level policy then conditions on this option as well as the current state to output a primitive action (Figure 1a). In maze navigation, for example, the option might be to reach “a point two metres down”, while the primitive action could be applying torques to an individual joint.

In principle, HRL (Barto and Mahadevan, 2003) addresses both challenges of long-horizon, goal-conditioned tasks through the interaction between action (temporal) and state (spatial) abstraction (Konidaris, 2019). First, by using an action abstraction to represent temporally extended behaviour as options, a hierarchical policy reduces the effective decision horizon (Park et al., 2026). The high-level policy reasons over options instead of primitive actions, while the low-level policy reasons to pursue the option rather than the distant goal. Second, by enabling different state abstractions at each level of the hierarchy (Figure 1a), a hierarchical policy can achieve coarser state abstraction than a non-hierarchical policy if each level discards different information irrelevant to its part of the decision process (Konidaris, 2019; Konidaris et al., 2018). Intuitively, this permits greater data aggregation for

Figure

Figure 1: (a) HRL permits different state abstractions ϕh(st,g)\phi_h(s_t, g) and ϕl(st,ωt)\phi_l(s_t, \omega_t) at each level of the decision process. (b) Decoupled policy training. (c) Different methods for learning the action abstraction ϕω(τt:t+k)\phi_\omega(\tau_{t:t+k}).

learning. For example, the high-level can aggregate all examples at a certain coordinate irrespective of pose, which is too fine-grained for high-level control, while the low-level can aggregate all examples with a certain pose irrespective of coordinates, since reaching “a point two metres down” requires the same actions wherever the agent is.

However, realising these two benefits of a hierarchical policy depends on learning an appropriate action abstraction. To improve stability and avoid collapsing to degenerate solutions (Bacon et al., 2017), decoupled approaches (Ajay et al., 2020; Park et al., 2023; 2026) train each policy separately (Figure 1b) using fixed-length trajectory segments. The action abstraction maps these segments to the option space, serving as actions for the high-level policy and goals for the low-level policy during training. The issue is that current HRL algorithms learn abstractions that fail in one of two ways. Some discard distinctions between options that are needed for optimal control (Park et al., 2023; Li et al., 2006). This limits the quality of the recoverable policy and undermines hierarchy altogether. Others retain distinctions between options that are irrelevant for control (Park et al., 2026; Ajay et al., 2020; Ravindran and Barto, 2002). This preserves horizon reduction but forfeits coarser state abstraction, as functionally equivalent behaviours remain distinct outputs of the high-level policy and distinct inputs to the low-level one.

In this work, we characterise three desiderata for an action abstraction to enable horizon reduction and data aggregation. We introduce Q-Shaped Options (QSO) to address all three. QSO builds on an architecture (Park et al., 2026) with separate state-value functions, Q functions and policies at each level of the hierarchy. It learns the action abstraction between consecutive levels as an encoder shared between the two levels and shaped by their respective Q functions. To our knowledge, QSO is the first HRL algorithm to learn an action abstraction through a Q function. We encode only the current and target states to represent the outcome of a trajectory segment rather than the exact state-action sequence that produced it. We shape the abstraction via the low-level Q function to separate options with different low-level Q values (Li et al., 2006), retaining distinctions necessary for optimal control. Finally, we shape the abstraction via the high-level Q function to provide an inductive bias for discarding unnecessary distinctions between functionally equivalent behaviour. Across offline (Levine et al., 2020; Lange et al., 2012) goal-conditioned locomotion and manipulation environments, QSO learns semantically meaningful option spaces (Figures 2, 6 and 7) and outperforms baselines (Table 2), achieving non-zero performance in tasks where all other evaluated algorithms fail (Table 7). We summarise our contributions as follows.

  1. We provide a formal definition of a control-sufficient action abstraction and prove that exact low-level Q-shaping satisfies control sufficiency.

  2. We extend a Probably Approximately Correct bound on offline error in a finite-state and finite-action MDP to motivate discarding unnecessary distinctions between options.

  3. We develop Q-Shaped Options (QSO), to our knowledge the first HRL algorithm to learn the action abstraction through a Q function, yielding a control-sufficient action abstraction that also discards unnecessary distinctions between options.

References (77)

  • Universal value function approximators
  • Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning
  • Horizon reduction makes rl scalable
  • Recent advances in hierarchical reinforcement learning
  • From skills to symbols: Learning symbolic representations for abstract high-level planning
  • The option-critic architecture
  • Opal: Offline primitive discovery for accelerating offline reinforcement learning (opens arXiv in a new tab)
  • Hiql: Offline goal-conditioned rl with latent states as actions
  • Towards a unified theory of state abstraction for mdps
  • Model minimization in hierarchical reinforcement learning
  • Offline reinforcement learning: Tutorial, review, and perspectives on open problems (opens arXiv in a new tab)
  • Batch reinforcement learning
  • Reinforcement learning with action chunking
  • Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware
  • Reinforcement learning: An introduction, volume 1
  • Hindsight experience replay
  • Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction
  • Scaling life-long off-policy learning
  • Ogbench: Benchmarking offline goal-conditioned rl
  • Offline reinforcement learning with implicit q-learning (opens arXiv in a new tab)
  • Advantage-weighted regression: Simple and scalable off-policy reinforcement learning (opens arXiv in a new tab)
  • Emaq: Expected-max q-learning operator for simple yet effective offline and online rl
  • A minimalist approach to offline reinforcement learning
  • Is value learning really the main bottleneck in offline rl? Advances in Neural Information Processing Systems, 37:79029–79056, 2024
  • Q-learning
  • nature, 518(7540):529–533, 2015
  • Deterministic policy gradient algorithms
  • Continuous control with deep reinforcement learning (opens arXiv in a new tab)
  • Addressing function approximation error in actor-critic methods
  • Near optimal behavior via approximate state abstraction
  • Metrics for finite markov decision processes (opens arXiv in a new tab)
  • Learning invariant representations for reinforcement learning without reconstruction (opens arXiv in a new tab)
  • Finite-time bounds for fitted value iteration
  • Information-theoretic considerations in batch reinforcement learning
  • Pac bounds for discounted mdps
  • Sample complexity of goal-conditioned hierarchical reinforcement learning
  • Adam: A Method for Stochastic Optimization
  • Gaussian Error Linear Units (GELUs)
  • This avoids querying the Q function on out-of-distribution actions, to which the Q function can assign erroneously high values (Levine et al., 2020)
  • As the name suggests, AWR does advantage-weighted behaviour cloning of dataset actions:
  • However, a non-hierarchical policy extracted with AWR or RS is bounded by the quality of the data at that state: where a region of the state space contains only low-quality actions, there is nothing “better” among the proposals to upweight
  • Taking $\pi_l(\cdot \mid s, \omega)$ to be any distribution supported on $\operatorname{argmax}_a Q_l(s, \omega, a)$ gives the policy required by Definition 1
  • Imagine three state-goal pairs:
  • Imagine that in all situations, the agent must move two metres down to reach its respective goal because the goals lie in the same direction from their respective coordinates
  • on the spot
  • a point two metres down
  • The low-level decision is then rescued by the third state-goal pair: conservative extraction has the good action $a_{3}$ available from the third pair, rather than only $a_{1}$ from the first:
  • Constants and logarithmic factors are suppressed and $\rho_h^{\mathrm{rep}}$ and $\rho_l^{\mathrm{rep}}$ are the concentrability coefficients at each level:
  • We build on the works of Kakade (2003); Munos and Szepesvári (2008); Lattimore and Hutter (2012); Robert et al. (2023); Li et al
  • Consider the case of a discrete, discounted horizon MDP with a finite state space S, action space A and discount factor $\gamma \in [0, 1)$
  • The minimax sample complexity to find an $\epsilon$ optimal policy reaching a unique goal-state optimally is given by:
  • Hence, the high-level policy becomes
  • Since the option just becomes a single primitive action, Equation 2 becomes:
  • Intuitively, if the dataset does not include the states required to learn the optimal policy, the algorithm may never learn that optimal policy
  • stationary distribution) of the policy $\pi$:
  • If the dataset is highly exploratory and covers the optimal paths well, $\rho$ will be small
  • The high-level value and critic losses are given by the following IQL loss:
  • For a two-level hierarchy, this means that the low-level decision process looks $1/(1-\gamma)$ actions ahead, and the higher-level decision process looks $1/(1-\gamma)$ options ahead
  • Since options are sampled as k-steps within a single trajectory, k must be small relative to the trajectory length H for the dataset to contain enough distinct options
  • At the high-level, we sample a broad mixture of local, trajectory, and random goals, encouraging it to generalise across a broad combinatorial coverage of state-goal pairs; at the low-level, we predominantly sample nearby trajectory target states, encouraging precise control over the option horizon
  • As usual, $k$ denotes the fixed option length
  • The low-level policy is defined using pure behaviour cloning:
  • Therefore, as a baseline, we introduce a new variant of SHARSA that, like QSO, uses AWR to train the high-level policy:
  • HIQL extracts high and low-level Gaussian policies using AWR-like objectives:
  • Using this learned option space to encode trajectory sequences, state-value and Q functions are trained using IQL:
  • Goals are sampled according to:
  • Default learning rate, batch size, target update rate, layer normalisation, non-linearities, and representation latent dimensions follow Park et al
  • L2 distances (bottom) in units of median distance between two random segments
  • L2 distances (bottom) for those groups in units of median distance between two random trajectory sequences
  • Figure 10 compares performance with absolute achievement $\phi_{\omega}(s_{t+k})$ with relative achievement encodings $\phi_{\omega}(s_t, s_{t+k})$
  • For ASO, this gain comes from the high-level critic: ranking samples from the environment-labelled high-level policy using the strict-labelled high-level critic recovers the full performance (of 70% rather than 20%), while the reverse swap results in a corresponding drop in performance
  • Downstream performance is most sensitive to using high-level reward labelling, which, like for ASO, we attribute to the high-level critic
  • Environment
  • As motivated, advantage weighting increases the high-level policy's dependence on the goal: compared with BC, the goal's share of output variance increases from 1% to 14% for QSO and 1% to 5% for ASO in antmaze-giant, and, respectively, from 0% to 1% and 1% to 3% in cube-double
  • Percentage share of the variance of the high-level policy's options explained by the state and goal
  • We use a fixed default of 10
  • For example, option horizons of 100 steps substantially degrades performance for both QSO and ASO in antmaze-giant; this is unsurprising, however, considering that the maximum number of steps in the antmaze-giant dataset is 200