WorksComputer Science
Hyperspherical Contrastive Representations Unlock Planning and Exploration
Abstract
We develop a self-supervised reinforcement learning algorithm that learns to build towers of up to eight cubes from scratch, without prior data, rewards, demonstrations, or pretrained models. Our method, Contrastive Planning via Spherical Linear Interpolation (C-Slerp), uses contrastive representations as reusable building blocks and repeatedly composes them to infer a sequence of intermediate waypoints. Under our hyperspherical parameterization, the learned representations allow intermediate waypoints to be inferred in closed form through spherical linear interpolation, without training a separate high-level policy or performing graph search. Importantly, the representation geometry also tells us how to adjust the number of waypoints based on the difficulty of each goal-reaching problem. Experiments show that our method succeeds on long-horizon navigation and robotic manipulation tasks, including settings where strong baselines fail to achieve a single success. Ablations further show that using a fixed number of waypoints substantially degrades performance, highlighting the importance of adapting the plan to task difficulty.
Project page: https://jonghaepark.github.io/c-slerp
Figure 1. Our paper studies long-horizon, sparse-reward tasks, including eight-cube stacking. Given only the current and goal states, the agent aims to manipulate the eight cubes into the goal state without receiving any external reward along the way. Strong exploration methods ([21, 4]) fail to discover a single successful state in one billion environment steps.
Introduction
Consider a robot asked either to place a single cube or to build an eight-cube tower. The former can be solved directly, whereas the latter may benefit from a plan with several intermediate stages. Too many stages needlessly complicate the single-cube task, while too few would leave the tower-building task too difficult to solve. The number of planning stages should therefore match the difficulty of the problem.
In goal-conditioned reinforcement learning ([12]), these stages can be defined by subgoals, or waypoints, that divide long-horizon tasks into shorter subproblems. However, existing hierarchical approaches often use a fixed number of waypoints ([19, 31]) or generate waypoints that are a fixed number of steps into the future ([17, 20]), rather than explicitly selecting how many stages to plan for each problem.
A natural way to plan over arbitrary distances is to define a reusable component and compose it as many times as needed. Contrastive reinforcement learning (CRL) [7] offers a promising foundation for this approach. CRL learns contrastive representations that encode temporal relationships between states under a single geometric distribution, providing natural building blocks for multi-stage planning. While these representations are primarily used to train goal-conditioned policies, we ask whether they can also be leveraged to infer an adaptive number of waypoints.
To this end, we introduce Contrastive Planning via Spherical Linear Interpolation (C-Slerp), a hierarchical approach where a high-level planner provides waypoints for a low-level policy to follow. Our main idea is to make this hierarchy adaptive by using contrastive representations as building blocks for each stage of a plan. By repeatedly composing these building blocks, we can score how well the state and goal are connected through different numbers of stages. Using these scores, we select an appropriate number of stages and infer the corresponding intermediate waypoints.
A key advantage of our contrastive representations is that their spherical geometry enables intermediate waypoints to be inferred in closed form without training a separate high-level policy or performing graph search. Specifically, our high-level policy introduces no additional network parameters — it simply performs spherical linear interpolation in the learned representation space.
In this paper, we show how choosing the correct amount of planning can unlock new capabilities for reinforcement learning. We evaluate our approach on long-horizon navigation and robotic manipulation tasks, including settings in which strong exploration methods never achieve a single success in one billion environment steps (Figure 1, Appendix § 10). Notably, our method successfully solves challenging benchmark tasks without a goal curriculum or explicit dense rewards, even where all baselines fail completely. Our ablations further show that hierarchy alone is insufficient: fixing the number of planning stages substantially degrades performance. Together, these results suggest that a key benefit of hierarchy for goal-reaching may lie in selecting an appropriate amount of planning for each problem rather than in making the policy more expressive.
Related Work
Hierarchical goal-conditioned reinforcement learning. Goal-conditioned reinforcement learning (GCRL) trains a single policy to reach diverse goals [23, 1]. Despite recent progress, reaching temporally distant goals remains a challenging problem. Hierarchical approaches [24, 13] address this challenge by decomposing long-horizon tasks into shorter subproblems. Existing methods learn high-level policies that generate subgoals for low-level controllers [17, 32, 20] or infer waypoints to guide policy learning or exploration [5, 31]. However, many of these approaches use a fixed number of waypoints or a fixed temporal horizon for subgoals, rather than explicitly selecting how many waypoints to plan for each state-goal pair. Graph-based methods offer an alternative by searching over observed states or learned landmarks to construct waypoint sequences [6, 30]. Although these methods generate a variable number of waypoints, they require additional computation for graph construction and depend on the coverage of states included in the graph.
Understanding the benefits of hierarchy. Prior work shows that hierarchy can improve exploration through temporally extended behavior [18] and improve statistical and computational efficiency by reusing solutions to repeated subproblems [27]. For policy learning, HIQL [20] shows that hierarchy provides clearer policy-learning signals, reducing sensitivity to value estimation errors. Further, SAW [33] brings the benefits of hierarchy to flat policies through bootstrapping, without a separate subgoal generator. These findings suggest that the benefits of hierarchy are closely tied to how it structures exploration and policy learning, rather than simply to the expressivity gained from a hierarchical policy structure.
Contrastive representations for goal-reaching. Contrastive reinforcement learning (CRL) [7] learns representations for goal-reaching in a self-supervised manner, without externally specified rewards. It formulates goal-conditioned RL as a contrastive learning problem, jointly learning policies and representations that encode temporal relationships between states. Subsequent work shows that CRL exhibits strong exploration capabilities even when data collection is directed toward a single fixed goal [14, 2], and that increasing the depth of actor and critic networks further improves its goal-reaching performance [25]. Despite these advances, it remains unclear whether exploration capability and network scaling alone are sufficient for CRL to solve substantially longer-horizon tasks. Beyond policy learning, Eysenbach et al. [8] derive closed-form distributions over waypoint representations using contrastive learning. However, their method learns representations from offline data without policy learning and requires a predefined number of waypoints, rather than adapting it to task difficulty.
Our method, C-Slerp, jointly learns contrastive representations and a goal-conditioned policy online. Using the learned representations, it adapts the number of waypoints to each state-goal pair and infers their representations in closed form, without a separate high-level policy or graph search. This allows us to examine how adapting the number of planning stages contributes to the benefits of hierarchy in long-horizon tasks.
Preliminaries
We focus on fully online RL without offline data, where the replay buffer is continually updated during policy training and the critic is trained with a self-supervised objective without external rewards.
Goal-conditioned reinforcement learning (GCRL). We consider a goal-conditioned Markov decision process , where and denote the state and action spaces, is the transition kernel, is the initial-state distribution, and is the discount factor. A goal is sampled from the distribution over the goal space , and a goal-conditioned policy selects an action conditioned on the current state and desired goal . For the analysis, we define the goal-reaching reward as , and the corresponding Q-function is
Prior work [7] has shown that this Q-function can equivalently be expressed as the probability of reaching the goal under the discounted state occupancy measure: . Here, denotes the probability of reaching from at a temporal offset drawn from under the goal-conditioned policy .2
Contrastive reinforcement learning (CRL). Instead of relying on Bellman backups, CRL [7] learns a critic for the goal-conditioned Q-function in a self-supervised manner. Given a batch , where the goal corresponds to the state steps after and , the critic is trained using the InfoNCE objective
Under the backward InfoNCE objective in Eq. (2), the Bayes-optimal critic can be expressed as
where is the future-state marginal and is a normalization term that depends only on the future state . Since the denominator is independent of the action, maximizing the critic over actions is equivalent to maximizing the discounted occupancy . The policy is therefore trained by maximizing the critic:
where denotes the state distribution of the replay buffer and the distribution of future goals from in the replay buffer, with temporal offsets drawn from .
Hyperspherical Contrastive Representations for Planning
In this section, we look at planning a sequence of intermediate waypoints between a current state and a goal. We approach this as an inference problem and show how the waypoints can be obtained in closed form by repeatedly composing contrastive representations. We then extend this approach to planning over a variable number of waypoints, deriving a principled criterion for selecting an appropriate number of waypoints for each state-goal pair using the same learned representations.
Problem Formulation
Setup. We collect data online under a hierarchical goal-conditioned policy that combines a high-level planner with a policy . Every environment steps, the planner provides a waypoint representation as a subgoal to reach the final goal, and the policy pursues it for the next steps. We alternate between collecting data under and updating the representations and policy.
We take a probabilistic approach to planning. Given a state and goal , we infer intermediate waypoints along trajectories generated by with goals drawn from . For notational consistency, we set and . We assume that consecutive waypoints and are separated by an interval , drawn independently for .
Objective. Let denote the distribution over intermediate waypoints given and under the data-generating process described above. We approximate this posterior with a tractable distribution by minimizing the following KL divergence:
For now, we fix and derive the corresponding optimal waypoints. We then derive a criterion for adaptively selecting for each state-goal pair.
Hyperspherical Contrastive Representations
To make the planning objective in Eq. (5) tractable, we parameterize temporal relationships using contrastive representations that lie on the unit hypersphere . Our approach learns a state-only representation , a state-action representation , a rotation matrix , and a policy , where is a representation of a goal. We use these representations to infer intermediate waypoints for the policy to pursue.
Parameterization. We use to score temporal relationships between states and to score future states given a current state-action pair. To infer consecutive waypoints in a common latent space, uses the same encoder for both inputs. Following the inner-product form used in CRL, we could score state pairs using . However, since this inner product is symmetric in and , it cannot capture asymmetries in the dynamics. We thus introduce a learnable rotation matrix to model these asymmetries while preserving the hyperspherical geometry. Specifically, we parameterize and as
where satisfies . This allows us to score an entire waypoint sequence by repeatedly applying a single to consecutive waypoint pairs. For , we follow the standard CRL parameterization and train the policy to maximize as in Eq. (4). The corresponding learning objectives are described in § 4.5.
Closed-Form Waypoint Inference
Key assumptions. Our derivation relies on the following assumptions, with theoretical justification based on prior work [26, 8] provided in Appendix § 8.§ 1:
Assumption 1 (Bayes optimality). The learned under the symmetric InfoNCE objective has the following Bayes-optimal form:
where is the data-collection policy and is a constant independent of and .
Assumption 2 (Uniformity). The marginal distribution over the representations learned for under the symmetric InfoNCE objective is uniform on the unit hypersphere :
Tractable reformulation. To obtain a tractable objective, we reformulate Eq. (5) in terms of the learned representations. We first factorize as , with one distribution per waypoint . This allows us to optimize for different within the same formulation below. Under Assumption 1 and the Markov assumption, the objective can be equivalently written as follows, with the derivation provided in Appendix § 8.§ 2:
This reformulation provides a natural interpretation of our objective in Eq. (5): it maximizes the expected sum of , which scores temporal relationships between waypoints, while encouraging each waypoint distribution to remain close to the marginal distribution of states visited under .
However, inferring waypoints directly in the high-dimensional state space is computationally challenging. Since the policy depends on the waypoint only through its representation , inferring its representation is sufficient to provide a subgoal to the policy. We therefore infer distributions over representations rather than the raw states . Assumption 2 and the parameterization of then yield the tractable objective to maximize:
where denotes entropy. This objective links the current state to the goal by repeatedly aligning consecutive representations through the rotation matrix , while the entropy term encourages stochasticity in the sequence of representations. The full derivation is provided in Appendix § 8.§ 2.
Closed-form solution. To model the stochasticity encouraged by , we parameterize each as the distribution of a Gaussian sample normalized onto the unit hypersphere:
with . As in SAC ([11]), we weight the entropy term in Eq. (10) by to control stochasticity, with recovering the original objective. Under a small-variance approximation, we obtain the following optimal solution for maximizing :
for , {#eq:11}
where and slerp denotes spherical linear interpolation. The derivation is provided in Appendix § 8.§ 3.
When , the solution places all means evenly along the geodesic between and on the unit hypersphere. In contrast, our method accounts for temporal transitions encoded in by interpolating from toward the rotated goal and mapping each interpolated point back using (see Figure 2 for a geometric interpretation). Importantly, these closed-form expressions allow us to infer distributions over waypoint representations directly from the learned contrastive representations without training an additional neural network.
Figure 2. Geometric interpretation of C-Slerp. The number of waypoints is selected using the alignment between and . Given the selected , waypoint mean directions are obtained by spherical interpolation from to , followed by mapping back via . The policy then pursues the furthest waypoint whose alignment with meets the threshold .
How Many Waypoints Are Needed for Each State-Goal Pair?
Since the closed-form solution in Eq. (11) applies to any number of waypoints , we now consider how to select for each state-goal pair. Recall that measures alignment between and to score a single geometric transition from to . Extending this to geometric transitions, we define the following alignment score between and :
This score measures how well the goal representation aligns with the direction predicted from the current state after geometric transitions under . A larger score indicates that the corresponding number of waypoints is more compatible with the state-goal pair. To infer probabilistically, we model with a von Mises–Fisher likelihood centered on the predicted direction :
where is the concentration parameter and is the normalizing constant. With a uniform prior over , Bayes’ rule yields
where controls the sharpness of the distribution over . This allows us to infer the number of waypoints for each state-goal pair using only the learned contrastive representations. The theoretical justification for the alignment score and the full derivation are provided in Appendix § 8.§ 4.
Which waypoint should the policy pursue? After selecting , we can sample waypoint representations from the closed-form distributions in Eq. (11). The remaining question is which waypoint representation to provide to the policy, given its current goal-reaching capabilities.
Our learned provides a natural proxy for the goal-reaching capability of the current policy, based on its probabilistic interpretation in Eq. (3). Since lies in the same space as , we use its alignment with to assess how likely the policy is to reach it. For each candidate , including , we sample and compute . We select the waypoint with the largest index whose score meets a threshold :
If no candidate meets the threshold, we set . This allows the policy to make progress toward the goal by pursuing the furthest waypoint estimated to be reachable, avoiding overly conservative subgoals. We provide a geometric interpretation of selecting and in Figure 2 and visualizations of the values in Figure 17.

Figure 17. (c) Ant Extreme Maze. Visualization of waypoint representations in maze environments. We visualize the inferred latent waypoints and the corresponding score heatmaps. For each environment, the top row shows the positions corresponding to the inferred latent waypoints, where 🔵 denotes a candidate waypoint , 🔴 highlights the selected waypoint , and 🔵 represents the goal. The bottom row shows heatmaps of , with the current state marked by ⚫ and the goal indicated by ⭐.
Learning Objectives and Algorithm
Representation learning. To learn the representations used for planning, we sample a batch from the replay buffer, with the temporal interval between and drawn from . Using this batch, we train with the backward InfoNCE objective in Eq. (2) and with the symmetric InfoNCE objective defined in Eq. (18). The total representation loss is
where the expectation is over batches sampled as described above.
Policy learning. Following CRL, we train the policy to maximize :
Specifically, the policy is conditioned on the goal representation , enabling it to pursue waypoints inferred in the representation space induced by .
Algorithm. Every environment steps, the high-level planner determines the number of waypoints for the current state-goal pair and selects a waypoint as a subgoal for the policy. Algorithm 1 provides the full pseudocode, including data collection and policy and representation learning.
Experiments
Benchmarks. We evaluate C-Slerp on six locomotion tasks in JaxGCRL (Bortkiewicz et al., [3]) and six manipulation tasks in BuilderBench (Ghugare et al., [9]). The JaxGCRL tasks cover Ant and Humanoid locomotion, including navigation through mazes of varying sizes to test goal-reaching capability over different horizons. In BuilderBench, the agent arranges cubes into target configurations using a gripper or applying forces directly to the cubes (Yan et al., [28]). The number of cubes determines the difficulty of these tasks, with more cubes requiring longer horizons. Using a gripper extends these horizons further, as each placement requires additional interactions to grasp and release the cube. Further details on both benchmarks are provided in Appendix § 10.§ 1, with environment visualizations in Figure 18.
Figure 18. Visualization of benchmark environments. The top row shows the BuilderBench manipulation tasks, and the bottom row shows the JaxGCRL navigation tasks. The goal used for evaluation in each JaxGCRL environment is indicated by 🔵. We provide videos demonstrating C-Slerp on all benchmark tasks on our project page.
Baselines. We compare C-Slerp with five GCRL methods: As a baseline using contrastive representations, we include CRL (Eysenbach et al., [7]), which learns representations of state-action pairs and future states and trains a policy to maximize their alignment. To compare different uses of hierarchy, we include RIS (Chane-Sane et al., [5]) and Online HIQL (Park et al., [20]). RIS uses imagined subgoals to regularize a flat policy during training, whereas Online HIQL uses a high-level policy to produce latent subgoals that a low-level policy pursues. For this comparison, we adapt HIQL, originally designed for offline reinforcement learning, to the online setting. For graph-based planning, we include L3P (Zhang et al., [30]), which constructs a graph of latent landmarks connected by reachability estimates and searches it to plan waypoint sequences. Finally, SAC + HER (Haarnoja et al., [10]; Andrychowicz et al., [1]) is a standard GCRL baseline that relabels goals with achieved states to learn from unsuccessful trajectories. Implementation details and hyperparameter settings are provided in Appendix § 10.§ 2.
Experimental Results
Benchmark Performance. Figure 3 compares C-Slerp with five baselines across twelve benchmark tasks. C-Slerp achieves the highest success rates on most tasks across both benchmarks. In BuilderBench, the agent must learn to construct target structures without a goal curriculum or intermediate rewards. Building taller towers requires more placements, thus leading to longer horizons and making exploration more challenging. The results show that C-Slerp and CRL perform comparably on shorter-horizon tasks such as the 2-tower task, but the performance gap between C-Slerp and the baselines widens as the number of cubes increases or when a gripper is used. Notably, C-Slerp is the only method to succeed on all cube-stacking tasks with a gripper, while most baselines fail to achieve any success.
Figure 3. C-Slerp solves long-horizon tasks where baselines never achieve a single success. Learning curves show success rates on BuilderBench manipulation tasks (top) and JaxGCRL locomotion tasks (bottom). C-Slerp achieves the highest success rates on most tasks across both benchmarks and is the only method to succeed on all cube-stacking tasks with a gripper.
In navigation tasks, several baselines also perform comparably on shorter-horizon tasks such as Ant Big Maze and Humanoid. As the required horizon increases, however, C-Slerp achieves consistently higher success rates. These results suggest that C-Slerp not only enables long-horizon planning but also facilitates exploration, allowing the agent to discover successful behaviors more efficiently by decomposing challenging tasks into easier subproblems.
Is adaptive waypoint planning necessary for long-horizon tasks? We first examine whether adapting the number of waypoints (as described in Section 4.4) improves performance over using a fixed number. Figure 4 compares adaptive and fixed choices of on the 8-tower task and Ant U5 Maze. For each fixed- variant, the number of waypoints remains constant throughout the episode. For , no intermediate waypoints are used, and thus the policy is always conditioned directly on the goal representation . The results show that adaptive selection achieves the highest success rates in both environments. The fixed- variants make little progress on the 8-tower task and reach lower final performance on Ant U5 Maze. Furthermore, increasing the fixed number of waypoints does not consistently improve performance, suggesting that simply introducing more intermediate waypoints is insufficient.
Figure 4. Ablation on -selection
These results suggest that the number of waypoints should match the difficulty of the goal-reaching problem. Too few waypoints can make each subproblem too difficult for the policy to solve, whereas too many may slow progress toward the goal by introducing unnecessary planning stages. Moreover, the appropriate number of waypoints can also change within an episode as the agent approaches the goal (see Figure 13 and Figure 14). Consequently, a fixed number of waypoints that works well early in an episode may become unnecessarily large as the remaining task becomes easier. Adaptive selection accounts for this change by adjusting to the current state-goal pair, highlighting that the benefit of C-Slerp comes not only from introducing intermediate waypoints but also from adapting their number to the problem.
Figure 13. Evolution of and over time in JaxGCRL environments. We plot the mean and sampled values of , together with the selected waypoint index , against environment steps. As the agent approaches the goal, the predicted number of waypoints decreases.
Figure 14. Evolution of and over time in BuilderBench environments. We plot the mean and sampled values of , together with the selected waypoint index , against environment steps. As the agent approaches the goal, the predicted number of waypoints decreases.
We next examine how to select the waypoint for the policy to pursue. Figure 5 compares adaptive waypoint selection with fixed choices of , while keeping the selection of adaptive. Among the fixed selection rules, and perform better on the 8-tower task, whereas and perform better on Ant U5 Maze. Thus, a choice that works well in one environment may not be the best choice in another. Earlier waypoints (e.g., ) provide more conservative subgoals but may slow progress, whereas later waypoints can enable greater progress but may be too difficult for the current policy to reach. Adaptive selection uses the learned to make this choice and achieves the best performance in both environments (see Figure 17 for a visualization of the selected waypoints). Together, these ablations show that adaptive selection of both and is needed to achieve the full performance of C-Slerp on long-horizon tasks.
Figure 5. Ablation on -selection
Exploration in single-goal settings. We further evaluate C-Slerp in a single-goal setting, where a single fixed goal is provided throughout training and evaluation, following the setting considered in prior work [14, 2]. As shown in Figure 6, we modify the goal distributions of Ant Big Maze and Ant U4 Maze by fixing the goal to the most distant location in each maze environment. C-Slerp achieves higher success rates than all baselines, with all baselines except CRL and L3P achieving zero success. These results suggest that C-Slerp can facilitate directed exploration by producing intermediate waypoints that guide the agent toward distant goals, even when only a single fixed goal is provided.

Figure 6. Evaluation of C-Slerp in single-goal environments. To assess exploration capability, we evaluate C-Slerp with a single fixed goal throughout training. The environments and their fixed goals are shown in (a), and success rates for C-Slerp and the baselines are presented in (b).
How do the inferred waypoints relate to task progress? Figure 7 shows successive states in the 5-tower task with a gripper, alongside projections of their representations and inferred waypoints. As the agent builds the tower, its state representation progresses along the latent trajectory toward the goal representation . At each replanning step, C-Slerp updates the number of intermediate waypoints , infers their representations, and selects one for the policy to pursue. Notably, the selected waypoint is not always the first in the inferred plan, which is consistent with our adaptive waypoint selection strategy described in Section 4.4. We can also observe that fewer waypoints are used as the tower nears completion, suggesting that the selected number of waypoints reflects the remaining temporal distance to the goal. Together, these visualizations show how C-Slerp guides the policy toward the goal by adapting the number of waypoints and selecting a subgoal in the learned representation space. Additional rollout visualizations are provided in Appendix § 9.
Figure 7. Adaptive planning in C-Slerp. The top row shows successive states in the 5-tower task with a gripper. The bottom row shows spherical PCA [15] projections of the latent trajectory, inferred waypoints, and selected subgoal. As the agent approaches the goal, it replans by adjusting the number of waypoints and selecting a waypoint to pursue. We provide complete rollout visualizations in Figure 15 and Figure 16 and videos on our project page.
Conclusion
We introduce C-Slerp, an online goal-reaching method that uses hyperspherical contrastive representations for adaptive planning. These representations enable closed-form waypoint inference through spherical linear interpolation, without a separate high-level network or graph search. Experiments show that C-Slerp solves long-horizon navigation and manipulation tasks, including settings where none of the baselines achieve any success. Ablations further show that adaptively selecting both the number of waypoints and the waypoint for the policy to pursue improves performance over fixed choices. These results suggest that adapting task decomposition to the goal-reaching problem contributes to the benefits of hierarchy in goal-conditioned reinforcement learning.
Our approach has limitations. Like other self-supervised RL methods, C-Slerp requires extensive environment interaction for training, which can be costly to collect on real robots. This motivates extending C-Slerp to an offline RL setting, where it could learn from offline data without additional environment interaction. Also, our experiments use state observations in simulation, leaving learning from visual observations and deployment on real robots untested. Improving data efficiency and extending the method to pixel-based observations are important directions for future work.
Final remarks. In this paper, we show how choosing an appropriate amount of planning can unlock new capabilities for reinforcement learning. C-Slerp learns to stack five cubes with a gripper without a goal curriculum or dense rewards, while all evaluated baselines fail to achieve a single success. These findings suggest that adapting how tasks are decomposed is a promising direction for extending online goal-conditioned reinforcement learning to more challenging problems. Additionally, although C-Slerp can be viewed as a hierarchical goal-conditioned RL method, it achieves these benefits without a separate high-level policy network or a planning graph. Instead, planning follows directly from spherical linear interpolation in the learned representation space, showing that adaptive planning need not require a complex architecture.
Acknowledgments
We thank Mahsa Bastankhah and Royina Jayanth for their helpful feedback on the manuscript. We also thank members of the Lab for Autonomous Robotics Research (LARR) and the Princeton RL Lab for insightful discussions.
Theoretical Results
Justification of the key assumptions
Assumption 1 (Bayes optimality). The learned under the symmetric InfoNCE objective has the following Bayes-optimal form:
where is the data-collection policy and is a constant independent of and $v.
The symmetric InfoNCE objective for a batch is defined as
The Bayes-optimal form in Eq. (17) follows directly from Lemma 5 of Eysenbach et al. [8]. Their formulation uses denominators without resubstitution [22, 29], excluding the positive pair from each denominator. Since , including the positive pair changes the loss by at most , which vanishes as . The same limiting result therefore applies to Eq. (18). We assume that attains this optimum in our analysis.
Assumption 2 (Uniformity). The marginal distribution over the representations learned for under the symmetric InfoNCE objective is uniform on the unit hypersphere :
Following Wang & Isola [26], we decompose the objective in Eq. (18) into alignment and uniformity terms corresponding to the numerators and denominators, respectively. We justify Assumption 2 using this decomposition and its entropy interpretation. Since is an orthogonal matrix and the representations have unit norm, we have
The alignment term therefore pulls toward for each positive pair. For the uniformity term, we consider the log-denominator of the first term in Eq. (18). If positive pairs are sufficiently aligned, replacing with in the von Mises–Fisher (vMF) log-density gives the approximation below. After subtracting the constant , this log-denominator can be written as
where is a vMF kernel density estimate, is its normalizing constant, and is the corresponding resubstitution entropy estimate. The entropy interpretation for the denominator of the second term in Eq. (18) can be derived in the same way.
Minimizing the term in Eq. (20) maximizes the estimated marginal entropy of , encouraging representations to spread across the sphere. Since maximizing entropy on the unit sphere yields the uniform distribution on , we assume a uniform marginal distribution for the learned representations in our analysis.
Derivation of the representation-space objective
In this section, we derive the objective in Eq. (10) from the posterior KL objective in Eq. (5). We fix the state-goal pair , the number of intermediate waypoints , and the data-collection policy . Following the setup in § 4.1, we set and and use the factorization .
Assuming that the waypoint sequence is a Markov chain, the posterior can be written as
Expanding the KL divergence in Eq. (5) gives
Applying Assumption 1 with , we have
Substituting Eq. (22) into Eq. (21) yields
Here, the constant is . It is independent of since and are fixed. Removing it gives the objective in Eq. (9).
We now express the objective in terms of . Following the notation in § 4.3, let denote the representation density induced by through , and let denote the representation marginal density induced by through the same mapping. Also, the joint distribution remains factorized as .
By the chain rule, the KL divergence in Eq. (23) decomposes into a representation term and an expected conditional term over states:
For any such that , the equality in Eq. (24) is always achievable with . Thus, with this choice, minimizing the KL divergence over representations can lead to minimizing the KL divergence in Eq. (23).
Under Assumption 2, is uniform on , so is constant. Therefore, the KL divergence simplifies as follows:
where denotes entropy with respect to the surface measure on . Substituting and Eq. (25) into Eq. (23) and dropping constants gives the objective in Eq. (10):
Derivation of the closed-form solution
In this section, we derive the approximate solution in Eq. (11) for a fixed state-goal pair and intermediate waypoints. For simplicity, we suppress the dependence on and write , with and . To control the stochasticity of the waypoint representations, we introduce an entropy weight into Eq. (10):
As in the main text, each waypoint representation is obtained by normalizing a Gaussian sample:
We use a small-variance approximation to obtain both mean directions and variances in closed form. We first determine the mean directions, then use them to optimize the variances.
Mean directions of waypoint representations. With isotropic Gaussian covariance, the entropy in Eq. (26) depends only on the variances and is therefore constant when optimizing the mean directions. Under , each waypoint representation is independent of the others, allowing us to express the objective in terms of their individual expectations:
where the constant is independent of .
Since is normalized to unit length, we approximate small deviations from by the perpendicular component of the Gaussian perturbation, denoted by . Its orthogonal coordinates each have variance , so
For a small perturbation, approximates the angular deviation from . Thus, the small-variance assumption ensures that the representation remains concentrated around its mean direction .
In the tangent-plane approximation, and imply . We can therefore write
The second term vanishes by symmetry since and have the same distribution and the denominator is unchanged under this sign reversal. Using , we obtain
Under the small-variance assumption, we use to optimize the mean directions independently of the variances. Setting for , maximizing Eq. (27) under this approximation reduces to
where and . Let denote the angle between and . The sum is maximized by placing the directions at equal angular intervals along the shortest geodesic connecting them, yielding the spherical linear interpolation
Using , we obtain
The case follows by continuity, and we exclude , where the shortest arc is not unique.
Variances of waypoint representations. We now optimize the variances in Eq. (26), with the mean directions fixed at from Eq. (28). For each , we rewrite the objective to isolate its dependence on :
where the constant is independent of . To optimize the variances, we retain the reduction in mean length derived above. A larger variance allows sampled waypoint sequences to cover a broader region of representation space, increasing entropy while reducing the expected inner products between neighboring representations. Using only makes the first term independent of the variances and fails to capture this tradeoff.
Set , , and for the fixed endpoints. Substituting for into each neighboring inner product gives
where we omit the products under the small-variance assumption. Applying this expansion to the two pairs and in Eq. (29), the terms proportional to are
Recall that consecutive transformed directions are separated by the angle . Thus, each inner product satisfies
Collecting the remaining terms independent of into a constant, we can therefore write
Under the same small-variance assumption, we approximate by the entropy of an isotropic Gaussian in the -dimensional tangent plane. Each of its independent coordinates follows , with density
Substituting this density into gives
where . Since these coordinates are independent, their entropies add, giving the following expression under the tangent-plane approximation:
Substituting the entropy expression above into Eq. (30), and collecting terms independent of into a constant, we obtain
Differentiating the right-hand side with respect to and setting the derivative to zero gives
Using , we obtain
For and , the approximate objective in Eq. (31) is strictly concave in since , so the positive stationary point is its unique maximizer. Together, Eqs. (28) and (32) yield the approximate solution in Eq. (11) under the small-variance condition .
Derivation of the distribution over the number of waypoints
In this section, we derive a distribution over the number of intermediate waypoints for a given state-goal pair. Following the setup in § 4.1, we use the notation
The intermediate waypoints divide the trajectory into segments, where the temporal intervals are sampled independently from a geometric distribution. We define as the resulting distribution of under given the starting state . For , this distribution reduces to , with a time interval sampled from a single geometric distribution and no intermediate waypoints.
Recall that is parameterized as
where and is orthogonal. Next, we relate to the expected representation of a future state sampled from .
Lemma 1 (Expected positive alignment). Assume that, at convergence, the contrastive representations are uniformly distributed on , with . The expected representation of a future state after a time interval sampled from a geometric distribution satisfies
where is a coefficient shared across states.
Proof. The result follows directly from the proof of Lemma 2 in Appendix § 9.2.2 of Bastankhah et al. [2], with replaced by .
Lemma 1 identifies as the predicted direction after one geometric transition, while captures the contraction in the expected representation. The following result extends this relation to geometric transitions.
Lemma 2 (Recursive composition of geometric transitions). Let and recursively sample for . Then the expected representation of satisfies
where is the coefficient in Lemma 1.
Proof. By definition, . For the expected representation, the case follows directly from Lemma 1. Suppose that . Assuming that the process is Markov with transition kernel , the law of iterated expectations gives
The stated approximation follows by induction.
By Lemma 2, the expected representation of is approximated by . Since has unit norm and is orthogonal, this vector has norm . Normalizing it therefore gives the predicted direction
We define its alignment with the goal representation as
This recovers the score in Eq. (11), which measures how well the predicted direction for intermediate waypoints aligns with the goal representation.
We now convert this alignment score into a distribution over . Since , we model the goal representation with a von Mises–Fisher likelihood centered at :
as in Eq. (12). Here, is a fixed concentration parameter. The normalizing constant depends only on and and is therefore independent of both and .
For a prior over , Bayes’ rule gives
where the shared normalizing constant cancels.
With the uniform prior , this reduces to
where , yielding Eq. (13).
Additional Experimental Results
Ablation Study
Ablation on the threshold . We investigate the effect of the threshold used to select the waypoint index . As described in Eq. (14), a larger favors earlier waypoints, leading to more conservative subgoal selection. Figure 8 shows that C-Slerp performs well across multiple threshold choices, although sensitivity varies across tasks. Performance is relatively robust across in all evaluated environments except the 8-tower task. The 8-tower task is more sensitive to the threshold, with achieving the highest success rate, whereas and perform better on Ant U5 Maze. We use as the default configuration for our algorithm across all tasks.

Figure 8. Ablation on the threshold .
Ablation on learning the rotation matrix . We investigate the role of learning the rotation matrix in by comparing it with fixed alternatives. As described in § 4.2, we parameterize through the Cayley transform, where and . Using this parameterization, we compare our default approach of learning with three fixed variants. The first sets , yielding the identity matrix . The other two independently sample with . In all three variants, we stop gradients to , keeping fixed throughout training. As shown in Figure 9, setting makes symmetric and prevents successful learning in the evaluated tasks. In contrast, the two variants with randomly initialized, fixed introduce asymmetry and enable learning, but yield unstable performance. These results suggest that asymmetry alone is insufficient for stable performance, highlighting the benefit of learning to capture temporal relationships between states.
Figure 9. Ablation on learning the rotation matrix .
Figure 10. Ablation on network depth.
Ablation on network depth. Wang et al. [25] report that increasing network depth improves the goal-reaching performance of CRL. Since C-Slerp also uses contrastive representations, we examine whether it benefits similarly from increased network depth. The results show that deeper networks generally achieve higher success rates. On Ant U5 Maze, performance improves as depth increases, while on the 8-tower task, depths of 16 and 32 perform comparably and outperform shallower networks, suggesting that sufficient network depth is needed for this task.
Figure 11. Ablation on representation dimension .
Ablation on representation dimension. We investigate the effect of the representation dimension . Since the learned rotation matrix in is a linear operator, we examine whether increasing the representation dimension provides greater expressive capacity and improves performance. The results show that performance is relatively robust once the representation dimension is sufficiently large, with further increases providing no consistent benefit. In particular, on the 8-tower task, only dimensions of achieve nonzero success among the tested values. We hypothesize that this limited benefit from further increasing arises because the encoder already provides sufficient nonlinear expressivity for the linear operator to model temporal relationships effectively.
CRL with larger discount factors
Comparison with CRL using larger discount factors . As discussed in § 3, CRL samples future states for contrastive learning using a temporal offset drawn from . Thus, a natural approach for adapting CRL to long-horizon tasks is to increase the discount factor .
We investigate this approach by evaluating CRL across on long-horizon tasks within our benchmark, while C-Slerp uses . As shown in Figure 12, CRL achieves low success rates across the evaluated tasks, and increasing does not close the performance gap with C-Slerp. One possible explanation is that a larger places more weight on temporally distant future states. This may make it harder for the network to distinguish temporally close and distant goals, limiting the effectiveness of the learned representations. These results suggest that simply extending the temporal horizon of contrastive learning does not offer the same benefits as planning with an appropriate number of waypoints.
Figure 12. Comparison with CRL with larger discount factors .
Visualizations
Evolution of and over time. Figure 13 and Figure 14 show the mean and sampled values of , together with the selected waypoint index , over a single episode in each environment. Since denotes the number of intermediate waypoints, represents the total number of transition segments from the current state to the goal. We plot to align with the waypoint indexing, where the goal has index , allowing direct comparison with the selected index .
In general, the mean value of decreases as the agent approaches the goal, suggesting that the learned representation captures the remaining temporal distance to the goal. Notably, in Humanoid U Maze, the selected values increase again after the humanoid reaches the goal, as it subsequently falls and cannot recover, causing its torso height to deviate from the target.
Visualizations of environment rollouts with corresponding representations. Figure 15 and Figure 16 visualize the environment rollouts together with spherical PCA ([15]) projections of the corresponding latent representations. Across the evaluated environments, these visualizations illustrate how C-Slerp adjusts the number of waypoints and selects a latent subgoal for the policy to pursue as it progresses toward the goal.
Figure 15. Visualization of C-Slerp rollouts and corresponding latent representations in JaxGCRL. For each environment, the top row shows successive states, and the bottom row shows spherical PCA [15] projections of the corresponding state representations and inferred waypoints.
Figure 16. Visualization of C-Slerp rollouts and corresponding latent representations in BuilderBench. For each environment, the top row shows successive states, and the bottom row shows spherical PCA [15] projections of the corresponding state representations and inferred waypoints.
Visualization of waypoint representations in maze environments. Figure 17 visualizes the inferred waypoints and the scores over the maze. We first encode all positions on a grid with 0.2 m spacing using the state encoder . For each inferred waypoint , we retrieve its nearest neighbor among these representations and plot the corresponding position in the maze. We also evaluate at every grid point and display the resulting scores as a heatmap, providing a proxy for how easily the current policy can reach each position. The visualizations indicate that, although the waypoints are generated entirely in the latent space, they correspond to intermediate positions along the path toward the goal.

Figure 1 (PDF p. 26). (a) Ant Big Maze; (b) Ant U4 Maze; (c) Ant U5 Maze. ; ; waypoint representations ; selected waypoint .

Figure d. Ant Extreme Maze
Figure 19 (PDF p. 29). ; ; waypoint representations ; selected waypoint . (a) 2-tower. (b) 8-tower. (c) 3-tower (gripper).

Figure 20 (PDF p. 31).
Experimental Details
We implement C-Slerp on top of the publicly available JaxGCRL (Bortkiewicz et al., [3]) and BuilderBench (Ghugare et al., [9]) codebases. For baselines, we implement CRL (Eysenbach et al., [7]), RIS (Chane-Sane et al., [5]), an online version of HIQL (Park et al., [20]), L3P (Zhang et al., [30]), SAC+HER (Haarnoja et al., [10]; Andrychowicz et al., [1]) on the same codebase as C-Slerp. We run our experiments on a local machine consisting of A6000 GPUs, and each run in § 5 takes 12–72 hours depending on the environment. All training metric curves are averaged over 5 seeds, and the shaded region denotes one standard error. We provide the environment and evaluation details in Appendix § 10.§ 1, and the implementation details in Appendix § 10.§ 2.
Environments
JaxGCRL. We evaluate our method on goal-conditioned navigation tasks in JaxGCRL, including Humanoid, Humanoid U Maze, Ant Big Maze, Ant U4 Maze, and Ant U5 Maze. To extend our evaluation to substantially longer-horizon problems, we additionally design Ant Extreme Maze, inspired by Myers et al. [16].
The states consist of the torso’s global position and proprioceptive observations, including joint positions and velocities. The goals specify the desired torso position, and the actions correspond to joint-control commands. For Ant and Humanoid, respectively, the states have 29 and 268 dimensions, the goals indicate the desired global torso coordinates and , and the actions have 8 and 17 dimensions. For the maze tasks, training goals are sampled uniformly from valid goal locations, whereas evaluation uses the goals shown as markers in Figure 18. The maximum episode length is 1,000 environment steps, except in Ant Extreme Maze, where the limit is 2,000 steps.
BuilderBench. We evaluate our method on gripper-based manipulation tasks with three to five cubes in BuilderBench. Each environment consists of cubes and a PD-controlled gripper. The gripper state consists of its 3-dimensional position, 4-dimensional orientation, 3-dimensional linear velocity, and 2 finger positions, giving 12 dimensions. Each cube contributes 13 dimensions consisting of its 3-dimensional position, 4-dimensional orientation, 3-dimensional linear velocity, and 3-dimensional angular velocity, yielding a -dimensional full state. Goals consist of the desired position of each cube and are -dimensional. The action space has 5 dimensions, controlling gripper opening, Cartesian motion, and yaw. At each reset, the initial cube positions are randomized, and a randomly sampled offset is added to the desired position of the goal structure. To accommodate the longer manipulation sequences required as the number of cubes increases, we use environment steps per episode during training and environment steps per episode during evaluation.
Following Yan et al. [28], we additionally evaluate a modified BuilderBench environment in which the policy selects a cube and applies force and torque directly to it without using a gripper. Each cube has the same 13 pose and velocity components as in the gripper environment, and an additional scalar indicates the selected cube, yielding a -dimensional state. Goals specify the desired position of each cube and are -dimensional. Each 5-dimensional action is represented as , where denotes the applied force, denotes the yaw torque, and identifies the cube receiving the actuation. As in the gripper environment, the initial cube positions are randomized, and the same randomly sampled offset is added to the desired position of the goal structure. To account for the longer manipulation sequences required as the number of cubes increases, we set the maximum episode length to environment steps during both training and evaluation.
Metrics. For both JaxGCRL and BuilderBench, we report the fraction of evaluation episodes in which the agent meets the success criterion for each task. In JaxGCRL environments, success is achieved when the torso is within 0.5 m of the goal position. In BuilderBench environments, success requires all cubes to be within 0.01 m of their target heights and the structure to lie within 0.04 m of its target position. Each cube has an edge length of 0.04 m.
For the four-cube pyramid task, we also require the horizontal arrangement of the cubes to match the target structure. We measure each cube’s horizontal position relative to the center of the bottom layer and compare it with the corresponding position in the target structure. The allowed error is approximately 0.01 m for bottom-layer cubes and 0.03 m for upper-layer cubes. The center of the bottom layer must also be within 0.04 m of its target position.
Implementation details
During the learning process, we adjust the entropy coefficients to match the target entropies using the automatic tuning procedure of SAC [10]. The number of waypoints is sampled from the softmax distribution in Eq. (13) with a temperature of during both data collection and evaluation. Separately, to control the sharpness of the softmax distributions in the InfoNCE loss, and are divided by a temperature of during training. We also adopt the sampling strategy of Ziarko et al. [34], which introduces in-trajectory negatives by sampling multiple positive pairs from each trajectory, with the number of pairs controlled by a repetition factor. For BuilderBench, we set the repetition factor to 12. For JaxGCRL, we use the default sampling strategy implemented in the codebase. We provide the hyperparameters of C-Slerp in Table 1 and the source code on our project page.
| Parameter | JaxGCRL | BuilderBench |
| Actor learning rate | ||
| Representation learning rate | ||
| Actor entropy learning rate | ||
| Waypoint entropy learning rate | ||
| Batch size | 512 | 1024 |
| Representation dimension | 128 | 512 |
| Network depth | 8 | 16 |
| Network width | 512 | 1024 |
| Discount factor | 0.99 | 0.99 |
| InfoNCE temperature | 0.1 | 0.1 |
| 4.0 | 2.0 | |
| Control horizon | 10 | 10 |
| Maximum planning stages | 5 (10 for Ant Extreme Maze) | 4 |
| sampling temperature | 0.1 | 0.1 |
| -selection threshold | 0.4 | 0.4 |
| In-trajectory repetition factor | - | 12 |
| Policy target entropy | ( with gripper) | |
| Waypoint target entropy | ( with gripper) |
Table 1. Learning hyperparameters.
Algorithm 1 provides the full pseudocode for C-Slerp. Every environment steps, the high-level planner determines the number of waypoints and selects a subgoal for the low-level policy to pursue for the next steps. The resulting transitions are stored in the replay buffer and used to update the representations and policy.
Baseline methods. We implement all baselines within the same training and evaluation framework as our method. We closely follow each method’s original training objectives and algorithm-specific components while using shared infrastructure and matching the capacity of the main networks where appropriate.
For CRL [7], we closely follow the implementation provided in each benchmark’s codebase, retaining its network architecture and L2-based energy function, while tuning the learning rates.
For RIS [5], we follow the original diagonal Laplace subgoal parameterization and goal-relabeling scheme. We use the rollout goal, an achieved goal sampled independently from the replay buffer, and a future achieved goal from the same trajectory with probabilities 0.2, 0.4, and 0.4, respectively. Future achieved goals are sampled uniformly from later states within the same trajectory. We draw 10 samples from the imagined-subgoal prior and use the resulting subgoals only during training. At evaluation time, the policy is conditioned directly on the final task goal.
For HIQL [20], we adapt the original offline RL algorithm to our online setting by replacing the fixed offline dataset and pretraining stage with trajectories collected through online interaction and updates from the resulting replay buffer. We preserve the action-free expectile valuelearning objective, the high- and low-level advantage-weighted policy objectives, and the latent subgoal prediction used by the hierarchical policy. For value learning, we use the current state, a future achieved goal from the same trajectory, and an achieved goal sampled independently from the replay buffer with probabilities 0.2, 0.5, and 0.3, respectively. Future achieved goals are sampled from later states within the same trajectory according to a geometric distribution with parameter . For the high-level objective, we sample an achieved goal either from the future of the same trajectory or independently from the replay buffer with probabilities 0.7 and 0.3, respectively. The target horizon determines how subgoals are selected during training. The low-level policy is trained to reach a state selected from the next steps of the same trajectory, while the high-level policy is trained to generate subgoals using targets selected within the same horizon. We set in JaxGCRL and in BuilderBench.
For SAC+HER ([10, 1]), goal relabeling uses a future achieved goal from the same trajectory with probability 0.8 and the original rollout goal with probability 0.2. Future achieved goals are sampled uniformly from later states within the same trajectory, and rewards are recomputed with respect to the resulting goal. Goal relabeling does not alter the original environment termination or discount signal.
For L3P ([30]), the training-time planning graph contains 50 learned landmarks and 150 additional replay-based landmarks, whereas evaluation uses only the 50 learned landmarks. Landmark pairs are scored using directed reachability estimates, so the retained graph topology depends on the learned values and the distance-clipping threshold rather than on a fixed edge set. L3P’s hindsight relabeling uses a uniformly sampled future achieved goal from the same trajectory with probability 0.85, with the future state restricted to at most 100 steps ahead. The graph is refreshed every environment interactions, and planning during data collection is enabled after interactions. To improve robustness in the online setting, each learned latent component is represented by a state selected from the replay buffer rather than directly by a decoded latent centroid. This ensures that planning landmarks correspond to states observed in the environment and avoids centroids that may fall in invalid or unreachable regions.
For model architecture, CRL, RIS, SAC+HER, and L3P use the same backbone as our method for their main policy and value-learning networks. For HIQL, we preserve its component-specific structure. The representation and value networks use three hidden layers, the high-level policy uses two hidden layers, and the low-level policy matches the number of hidden layers in the policy used by C-Slerp for each benchmark. To improve performance, both HIQL policies use half as many units per hidden layer as our method’s policy. HIQL uses a 10-dimensional latent subgoal representation, and L3P uses a 16-dimensional latent space. Unless otherwise specified, the baselines follow the same shared training settings as our method.
For baseline tuning, we use settings reported in the original papers and implementations as starting points and vary learning rates and method-specific parameters to identify the best-performing configuration for each baseline and benchmark. Table 2 summarizes the candidate values considered during tuning. Once selected, each configuration is fixed for all final evaluations. Table 3–Table 7 report the selected method-specific parameters used in our experiments.
| Method | Parameter | Search space |
| CRL | Actor learning rate | |
| Critic learning rate | ||
| RIS | Actor learning rate | |
| Critic learning rate | ||
| KL coefficient | ||
| Prior samples | ||
| SAC+HER | Actor/critic learning rate | |
| Target entropy | ||
| Online HIQL | Learning rate | |
| High-level coefficient | ||
| Low-level coefficient | ||
| Target horizon | ||
| Direct-goal bootstrap fraction | ||
| Random-action warm-up | ||
| L3P | Actor/critic/value learning rate | |
| Discount factor | ||
| Action regularization | ||
| Learned landmarks | ||
| Distance-clipping threshold | ||
| Graph refresh interval | ||
| Exploration noise | ||
| Random-action probability |
Table 2. Hyperparameter search spaces for baseline tuning.
| Parameter | JaxGCRL | BuilderBench |
| Actor learning rate | ||
| Critic learning rate | ||
| Energy function | L2 norm | L2 norm |
Table 3. CRL-specific parameters.
| Parameter | JaxGCRL | BuilderBench |
| Actor/critic/value learning rate | ||
| Autoencoder/cluster learning rate | ||
| Target-network update period | 10 learner steps | 10 learner steps |
| Latent dimension | 16 | 16 |
| Action regularization | 0.05 | 0.05 |
| Learned landmarks | 50 | 50 |
| Additional training landmarks | 150 | 150 |
| Graph refresh interval | ||
| Planning activation | ||
| Distance-clipping threshold | ||
| Soft-planning temperature | 1.1 | 1.1 |
| Value-iteration steps | 20 | 20 |
| Local planning horizon | 10 | 10 |
| Exploration noise | 0.2 | 0.2 |
| Random-action probability | 0.2 | 0.2 |
Table 7. L3P-specific parameters.
Algorithm 1 Contrastive Planning via Spherical Linear Interpolation (C-Slerp)
Initialize policy , encoders and , rotation matrix , replay buffer
for each training epoch do // Data collection
for each episode do
Sample an initial state and a goal
while the episode is not finished do
if then // K-selection
Sample for using Eq. (13)
for do
Compute using Eq. (11)
Sample
Set
end for
Set // i-selection
for do
Sample
Compute
end for
if then
Select using Eq. (14)
else
Set
end if
Set the subgoal
end if // Policy rollout
Sample
Execute and observe
Store in
end while
end for // Representation and policy learning
for each gradient step do
Sample a batch from
Update by minimizing in Eq. (15)
Update using Eq. (16)
end for
end for
| Parameter | JaxGCRL | BuilderBench |
| Actor/subgoal learning rate | ||
| Critic learning rate | ||
| KL coefficient | 0.1 | 0.1 |
| Bottleneck temperature | 0.1 | 0.1 |
| Prior samples | 10 | 10 |
Table 4. RIS-specific parameters.
| Parameter | JaxGCRL | BuilderBench |
| Actor/critic learning rate | ||
| Entropy learning rate | ||
| HER probability | 0.8 | 0.8 |
| Initial entropy coefficient | 1.0 | 0.01 |
| Target entropy coefficient |
Table 5. SAC+HER-specific parameters.
| Parameter | JaxGCRL | BuilderBench |
| Learning rate | ||
| Expectile | 0.7 | 0.7 |
| 0.2 | 0.5 | |
| 0.3 | 100 | |
| Target horizon | 25 | 10 |
| Direct-goal bootstrap fraction | 0 | 0 |
| Random-action warm-up | 0 | 0 |
| Representation dimension | 10 | 10 |
Table 6. Online HIQL-specific parameters.
References
- [1]Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Feng, Peter Welinder, Bob McGrew, Josh Tobin, Pieter Abbeel, and Wojciech Zaremba. Hindsight experience replay. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1707.01495
- [2]Mahsa Bastankhah, Grace Liu, Dilip Arumugam, Thomas L Griffiths, and Benjamin Eysenbach. Demystifying the mechanisms behind emergent exploration in goal-conditioned rl. In International Conference on Learning Representations, volume 2026, pp. 125535–125575, 2026.arxiv.org/abs/2510.14129
- [3]Michał Bortkiewicz, Władysław Pałucki, Vivek Myers, Tadeusz Dziarmaga, Tomasz Arczewski, Łukasz Kuciński, and Benjamin Eysenbach. Accelerating goal-conditioned reinforcement learning algorithms and research. In International Conference on Learning Representations, volume 2025, pp. 15732–15754, 2025.arxiv.org/abs/2408.11052
- [4]Yuri Burda, Harrison Edwards, Amos Storkey, and Oleg Klimov. Exploration by random network distillation. arXiv preprint arXiv:1810.12894, 2018.arxiv.org/abs/1810.12894
- [5]Elliot Chane-Sane, Cordelia Schmid, and Ivan Laptev. Goal-conditioned reinforcement learning with imagined subgoals. In International Conference on Machine Learning, 2021.
- [6]Ben Eysenbach, Russ R Salakhutdinov, and Sergey Levine. Search on the replay buffer: Bridging planning and reinforcement learning. Advances in neural information processing systems, 32, 2019.arxiv.org/abs/1906.05253
- [7]Benjamin Eysenbach, Tianjun Zhang, Sergey Levine, and Russ R Salakhutdinov. Contrastive learning as goal-conditioned reinforcement learning. Advances in Neural Information Processing Systems, 35:35603–35620, 2022.arxiv.org/abs/2206.07568
- [8]Benjamin Eysenbach, Vivek Myers, Ruslan Salakhutdinov, and Sergey Levine. Inference via interpolation: Contrastive representations provably enable planning and inference. Advances in Neural Information Processing Systems, 37:58901–58928, 2024.arxiv.org/abs/2403.04082
- [9]Raj Ghugare, Roger Creus Castanyer, Catherine Ji, Kathryn Wantlin, Jin Schofield, Karthik Narasimhan, and Benjamin Eysenbach. Builderbench: The building blocks of intelligent agents. arXiv preprint arXiv:2510.06288, 2025.arxiv.org/abs/2510.06288
- [10]Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018a.arxiv.org/abs/1801.01290
- [11]Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, et al. Soft actor-critic algorithms and applications. arXiv preprint arXiv:1812.05905, 2018b.arxiv.org/abs/1812.05905
- [12]Leslie Pack Kaelbling. Learning to achieve goals. In International Joint Conference on Artificial Intelligence, 1993.
- [13]Andrew Levy, George Konidaris, Robert Platt, and Kate Saenko. Learning multi-level hierarchies with hindsight. arXiv preprint arXiv:1712.00948, 2017.arxiv.org/abs/1712.00948
- [14]Grace Liu, Michael Tang, and Benjamin Eysenbach. A single goal is all you need: Skills and exploration emerge from contrastive rl without rewards, demonstrations, or subgoals. In International Conference on Learning Representations, volume 2025, pp. 78599–78621, 2025.arxiv.org/abs/2408.05804
- [15]Kai Liu, Qiwei Li, Hua Wang, and Gongguo Tang. Spherical principal component analysis. In Proceedings of the 2019 SIAM international conference on data mining, pp. 387–395. SIAM, 2019.arxiv.org/abs/1903.06877
- [16]Vivek Myers, Catherine Ji, and Benjamin Eysenbach. Horizon generalization in reinforcement learning. In International Conference on Learning Representations, volume 2025, pp. 76302–76326, 2025.arxiv.org/abs/2501.02709
- [17]Ofir Nachum, Shixiang Shane Gu, Honglak Lee, and Sergey Levine. Data-efficient hierarchical reinforcement learning. Advances in neural information processing systems, 31, 2018.arxiv.org/abs/1805.08296
- [18]Ofir Nachum, Haoran Tang, Xingyu Lu, Shixiang Gu, Honglak Lee, and Sergey Levine. Why does hierarchy (sometimes) work so well in reinforcement learning? arXiv preprint arXiv:1909.10618, 2019.arxiv.org/abs/1909.10618
- [19]Soroush Nasiriany, Vitchry Pong, Steven Lin, and Sergey Levine. Planning with goal-conditioned policies. Advances in neural information processing systems, 32, 2019.arxiv.org/abs/1911.08453
- [20]Seohong Park, Dibya Ghosh, Benjamin Eysenbach, and Sergey Levine. HIQL: Offline goal-conditioned RL with latent states as actions. In Advances in Neural Information Processing Systems, 2023.arxiv.org/abs/2307.11949
- [21]Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In International conference on machine learning, pp. 2778–2787. PMLR, 2017.arxiv.org/abs/1705.05363
- [22]Ben Poole, Sherjil Ozair, Aaron Van Den Oord, Alex Alemi, and George Tucker. On variational bounds of mutual information. In International conference on machine learning, pp. 5171–5180. PMLR, 2019.arxiv.org/abs/1905.06922
- [23]Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In International conference on machine learning, pp. 1312–1320. PMLR, 2015.
- [24]Alexander Sasha Vezhnevets, Simon Osindero, Tom Schaul, Nicolas Heess, Max Jaderberg, David Silver, and Koray Kavukcuoglu. Feudal networks for hierarchical reinforcement learning. In International conference on machine learning, pp. 3540–3549. PMLR, 2017.arxiv.org/abs/1703.01161
- [25]Kevin Wang, Ishaan Javali, Michał Bortkiewicz, Tomasz Trzcinski, and Benjamin Eysenbach. 1000 layer networks for self-supervised rl: Scaling depth can enable new goal-reaching capabilities. Advances in Neural Information Processing Systems, 38:157643–157670, 2026.arxiv.org/abs/2503.14858
- [26]Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In International conference on machine learning, pp. 9929–9939. PMLR, 2020.arxiv.org/abs/2005.10242
- [27]Zheng Wen, Doina Precup, Morteza Ibrahimi, Andre Barreto, Benjamin Van Roy, and Satinder Singh. On efficiency in hierarchical reinforcement learning. Advances in Neural Information Processing Systems, 33:6708–6718, 2020.
- [28]David Yan, Brandon Cho, Andrew Tu, Vedant Badoni, Zhechang Yang, Raj Ghugare, and Benjamin Eysenbach. Scaling the horizon of contrastive reinforcement learning. In Third Reinforcement Learning Beyond Rewards Workshop at the Reinforcement Learning Conference, 2026.
- [29]Chun-Hsiao Yeh, Cheng-Yao Hong, Yen-Chi Hsu, Tyng-Luh Liu, Yubei Chen, and Yann LeCun. De-coupled contrastive learning. In European conference on computer vision, pp. 668–684. Springer, 2022.
- [30]Lunjun Zhang, Ge Yang, and Bradly C. Stadie. World model as a graph: Learning latent landmarks for planning. In International Conference on Machine Learning, 2021a.arxiv.org/abs/2011.12491
- [31]Tianjun Zhang, Benjamin Eysenbach, Ruslan Salakhutdinov, Sergey Levine, and Joseph E Gonzalez. C-Planning: An automatic curriculum for learning goal-reaching tasks. arXiv preprint arXiv:2110.12080, 2021b.arxiv.org/abs/2110.12080
- [32]Tianren Zhang, Shangqi Guo, Tian Tan, Xiaolin Hu, and Feng Chen. Generating adjacency-constrained subgoals in hierarchical reinforcement learning. Advances in neural information processing systems, 33:21579–21590, 2020.arxiv.org/abs/2006.11485
- [33]John Zhou and Jonathan Kao. Flattening hierarchies with policy bootstrapping. Advances in Neural Information Processing Systems, 38:82975–83007, 2026.arxiv.org/abs/2505.14975
- [34]Alicja Ziarko, Michał Bortkiewicz, Michał Zawalski, Benjamin Eysenbach, and Piotr Miłos. Contrastive representations for temporal reasoning. Advances in Neural Information Processing Systems, 38:109229–109259, 2026.arxiv.org/abs/2508.13113















