Manuscript Offprint

arXiv:2611.05847

Time-to-Goal: Learned Temporal Metrics for Long-Horizon Planning with JEPA World Models

Ruilong Yu, Fei Ye

ABSTRACT

Joint-Embedding Predictive Architectures (JEPAs) support planning by comparing predicted latent states with an encoded goal. For this comparison to guide temporal progress, states closer in time to the goal should receive lower costs. However, training representations for prediction and distribution regularization does not directly enforce this ordering. We examine this mismatch in flat LeWorld-Model (LeWM) by analyzing how its Euclidean goal cost changes with temporal separation. Our analysis identifies conditions under which states at different long offsets receive similar average costs, weakening their temporal distinction. To learn the missing ordering explicitly, we introduce Time-to-Goal (T2G), a lightweight metric trained on latent triples from offline trajectories. A margin ranking loss encourages smaller distances for temporally nearer states, requiring no rewards or policy labels. The learned metric then replaces the Euclidean planning cost while the JEPA encoder and predictor remain frozen. Diagnostics on AntMaze and FourRoom show that T2G preserves stronger temporal contrast and improves near-far ranking at long offsets. Across four navigation and manipulation benchmarks, T2G improves the average planning success rate from 32.7% (flat LeWM) to 63.0% and approaches or even surpasses the performance of the hierarchical H-JEPA baselines. These results show that learning temporal ordering for the goal cost can substantially improve latent planning even with a flat world model. Code is available at https://github.com/yrlustc/T2G-JEPA.

1 Introduction

Joint-Embedding Predictive Architectures (JEPAs) [1, 2, 3] learn world models by predicting future observations in a latent space. An encoder maps observations to representations, and an action-conditioned predictor models how these representations evolve under actions. This avoids pixel reconstruction and allows planning by comparing predicted future states with an encoded goal. LeWorldModel (LeWM) [4] implements this with a next-embedding prediction loss and a sketched isotropic Gaussian regularizer (SIGReg), which discourages representation collapse. Its planner optimizes actions using the Euclidean distance between predicted states and the goal. However, as shown in Fig. 1, this flat planner may provide an unreliable progress signal over long horizons, where reliable predictions and a cost that reflects distance to or progress toward a distant goal are both required. A flat model must roll out many prediction steps, leading to error accumulation. Moreover, matching a distant goal in a representation space that also carries low-level details

Figure

Figure 1: On successful FourRoom executions, Euclidean cost weakly signals initial progress (i.e., distant to goal), whereas T2G provides a more consistent temporal cost.

*denotes the corresponding author.

can be difficult. H-JEPA [5] addresses these challenges with a hierarchy of JEPAs operating at increasing temporal strides in which subgoals divide a long task into shorter planning problems, and higher levels provide more abstract spaces for goal matching. Because this hierarchy changes both how futures are predicted and how they are evaluated, its gains conflate architectural and cost-related effects. This motivates isolating the goal cost and examining whether a better cost estimate alone can improve flat planning in long-horizon settings.

We ask whether the goal-matching cost of a flat model can guide planning without introducing a hierarchy. Intuitively, a useful cost should assign lower values to states that are closer to reaching the goal. However, LeWM's Euclidean cost is applied to representations trained for next-state prediction and distribution regularization. Its training objective does not explicit impose supervision of progress toward a goal. We therefore examine the Euclidean costs of states along a saved planning trajectory. Specifically, we compare pairs of states separated by an interval of several model steps. Our analysis shows that, as this interval increases, the difference in their Euclidean costs becomes progressively smaller. This weakens the cost signal for ranking candidate futures when the states are far from the goal.

To provide this temporal signal, we propose Time-to-Goal (T2G), a lightweight learned temporal metric for long-horizon planning. T2G learns a small embedding network on flat LeWM latents and uses Euclidean distance in this embedding as a temporal-distance score. It is trained on latent triples sampled from offline trajectories, where a ranking objective encourages a temporally nearer future state to be closer to the anchor state than a farther future state. The LeWM encoder and predictor remain frozen, and no rewards or policy labels are required during this process. During planning, the same predictor rolls out candidate action sequences, and T2G scores their predicted states by their learned distance to the goal.

Our contributions are summarized as follows.

  • We analyze the case where Euclidean latent distances provide little distinction across temporal separations when states are far from the goal.

  • We introduce Time-to-Goal, a lightweight learned temporal metric with only 0.182M parameters (1.6% of the flat LeWM), which substantially improves flat LeWM on long-horizon tasks without changing the latent world model.

  • Comprehensive experimental results demonstrate that T2G enables flat LeWM to approach or even surpass multi-level H-JEPA in our long-horizon evaluations.

References (22)