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

Robotics.world

> JEPA-style planners choose actions by rolling out predicted latent states and picking the sequence whose final states are closest, in Euclidean distance, to an encoded goal image.

**arXiv**: 2611.05847 · Preprint · not peer-reviewed

**Published**: 2026-11-04

**Authors**: Ruilong Yu, Fei Ye

## In plain words

JEPA-style planners choose actions by rolling out predicted latent states and picking the sequence whose final states are closest, in Euclidean distance, to an encoded goal image.

## AI summary

## Overview

**Research area:** Reward-free latent world models for robotics and control — specifically goal-conditioned planning with Joint-Embedding Predictive Architectures (JEPAs).

**Technical level:** Intermediate to Advanced. The paper assumes familiarity with latent dynamics models, model-predictive control (MPC), and contrastive/ranking objectives, though its core idea — fixing the *cost function* rather than the *model* — is conceptually simple.

**Scope (one sentence):** The paper diagnoses why Euclidean distance in a JEPA latent space gives a weak signal of temporal progress toward distant goals, and proposes a small learned "Time-to-Goal" (T2G) metric that replaces that cost while the world model stays frozen.

## What This Paper Is About

JEPA-style planners choose actions by rolling out predicted latent states and picking the sequence whose final states are closest, in Euclidean distance, to an encoded goal image. The problem is that the encoder is trained only for next-state prediction and distribution regularization (SIGReg), so nothing forces states that are *temporally nearer* the goal to actually have *smaller distances* to it — especially when the goal is far away. The authors isolate this cost-function problem and ask whether a better goal cost alone, with no hierarchy and no changes to the world model, can make flat latent planning work on long-horizon tasks.

## Key Contributions

1. **A formal and empirical diagnosis of the Euclidean cost.** The authors decompose the expected squared latent distance between a state and a future goal into a "B" term (squared mean difference plus marginal variance traces) and a "q" term (trace of the cross-covariance), and show that when both change little with temporal offset, the *temporal contrast* between states at different offsets collapses.
2. **Time-to-Goal (T2G), a learned temporal metric.** A small MLP plus a learned positive scale maps frozen LeWM latents into an embedding where Euclidean distance approximates temporal separation, trained with a margin ranking loss on latent triples sampled from offline trajectories — no rewards, no policy labels, no world-model updates. It adds 0.182M parameters (1.6% of the flat LeWM model).
3. **A planning-time cost with dense and last-n variants.** The learned metric replaces the Euclidean goal cost for both sampling-based and gradient-based planners, with a windowed ("last-n") aggregation over the final predicted states and a full-rollout ("dense") alternative.
4. **Benchmark evidence that cost geometry can substitute, in part, for hierarchy.** On four benchmarks, flat LeWM + T2G raises the unweighted average success rate from 32.7% to 63.0%, approaching or surpassing H-JEPA baselines while adding roughly two orders of magnitude fewer parameters than multi-level H-JEPA (e.g., 0.18M vs 10.79M for two levels).

## Main Findings

- **Euclidean cost flattens at long horizons.** Using 50 recorded planner executions each in AntMaze and FourRoom, with offsets k = 1…23 model steps and a fixed gap of Δ = 1 model step (five environment steps), the B term's change stays small while the q term's change shrinks markedly as offset grows, so the bound on temporal contrast becomes small at long offsets.
- **T2G preserves stronger temporal contrast.** Over the last five comparisons (k = 18…22), the mean normalized contrast is 0.0202 for Euclidean cost versus 0.0481 for T2G on AntMaze, and 0.0036 versus 0.0214 on FourRoom.
- **T2G ranks near-versus-far states more accurately.** Over the same long-offset comparisons, pairwise ranking accuracy rises from 53.44% to 67.69% on AntMaze and from 50.27% to 61.53% on FourRoom — gains of 14.25 and 11.26 percentage points.
- **Last-n T2G improves every benchmark.** Success goes from 18.0% to 58.7% on Visual AntMaze, 32.0% to 63.3% on OGBench Cube, 40.7% to 78.7% on FourRoomDistractors, and 40.0% to 51.3% on Push-T, for an unweighted average of 63.0%.
- **Dense aggregation is not uniformly better.** Dense T2G reaches 48.3% on AntMaze, 81.3% on FourRoom (matching two-level H-JEPA), and 42.0% on Push-T, but collapses to 4.0% on Cube. Switching from dense to last-n changes the means by +10.4%, +59.3%, and +9.3% on AntMaze, Cube, and Push-T, and by −2.6% on FourRoom.
- **The aggregation choice matters because of intermediate states.** On Cube, dense scoring penalizes grasp-preparation states that are legitimately far from the goal in temporal distance; scoring only the final 1 predicted state lets the planner optimize those preparatory actions for their effect on the endpoint.
- **Flat + T2G competes with hierarchy selectively.** T2G last-n has the highest reported mean on Cube and Push-T, exceeding the best H-JEPA means by 3.3% and 6.0%. Three-level H-JEPA still wins navigation, at 73.3% on AntMaze and 96.0% on FourRoom.
- **Hierarchy depth is not monotone.** H-JEPA success averages are 53.3% (two levels), 61.7% (three levels), and 49.8% (four levels); four-level H-JEPA falls to 0.7% on Push-T.

## Methodology in Plain English

The authors keep the trained JEPA world model exactly as it is — encoder and action-conditioned predictor are frozen — and only learn a new way to measure "how far is this state from the goal in time."

To build training data, they take offline trajectory clips, encode them into latents, and repeatedly sample three latents: an anchor, a *near* state k steps after it, and a *far* state Δ steps after the near one. A tiny network embeds each latent, and the distance between embeddings is a learned scaled Euclidean distance. Training uses a margin ranking loss that penalizes the network whenever the far state is not farther from the anchor than the near state by at least a margin m = 1. Because supervision comes only from the order of states in a trajectory, no rewards or policy labels are needed, and the resulting quantity is a *relative* temporal cost rather than a calibrated step count.

Sampling is designed to emphasize long separations: the near offset is drawn uniformly, an extra gap is drawn, the far offset is clipped to a maximum K_max (23 model steps for AntMaze and FourRoom, 15 for Cube and Push-T), and clipping deliberately gives extra probability to the largest far offset. Observations are sampled every five environment steps, so one model step equals five environment steps; k_min = 1 and Δ_min = 2 throughout. Training uses AdamW at a fixed learning rate of 5×10⁻⁵, weight decay 10⁻³, batch size 128, and 5 epochs.

At planning time, the frozen predictor rolls out candidate action sequences exactly as before; the only change is the score. The last-n variant averages the learned distance to the goal over the final n predicted states (n = 2 on AntMaze, FourRoom, and Push-T; n = 1 on Cube, with n capped by the current horizon), and the dense variant averages over the whole rollout. The used planner is gradient-based with AdamW, and Cube uses a shortened horizon of H = 2 instead of the baseline's 4. Evaluation covers 50 start–goal tasks per environment, with success measured by each environment's goal test within a fixed episode budget, reported as mean and standard error over seeds 42, 43, and 44.

## Why This Matters

Most work on long-horizon latent planning attacks the problem by changing the *model* — adding hierarchy, deeper rollouts, or auxiliary regularizers. This paper shows that a substantial share of the gap can be closed by fixing the *evaluation function* alone, using only the ordering information already implicit in offline trajectories. That reframes goal-cost design as a first-class part of planner engineering, and it is a cheap intervention: 0.182M extra parameters on top of a frozen backbone.

Real-world applications:

- **Warehouse and service robot navigation** where the robot is given a goal image rather than coordinates, and must judge progress across rooms and around obstacles (the FourRoom and AntMaze settings).
- **Manipulation from demonstration video**, where the target is a grasp or placement configuration and intermediate approach poses are necessarily far from the goal (the Cube setting motivates exactly this).
- **Data-efficient retrofit of existing latent world models** — organizations with a trained JEPA-style model can learn the metric from logged trajectories without retraining or new reward engineering.
- **Plan scoring in receding-horizon controllers**, where the same learned metric can rank candidates for both sampling-based (CEM) and gradient-based optimizers.

Industry relevance is mainly in reward-free imitation and goal-conditioned control pipelines, where labeling rewards is expensive but large archives of unlabeled trajectories already exist. The authors' explicit separation of "cost geometry" from "temporal abstraction" also gives practitioners a cheap baseline to beat before investing in multi-level architectures — a relevant cost consideration given H-JEPA's 10.79M–32.37M additional parameters versus T2G's 0.18M.

## Future Directions

- **Combining T2G with hierarchy.** The authors propose learning temporal costs at multiple levels to guide both subgoal selection and action optimization, which would pair T2G's ordering with the longer planning range of temporal abstraction — motivated by three-level H-JEPA's remaining lead on AntMaze (73.3%) and FourRoom (96.0%).
- **Deployment on physical robots.** Closed-loop evaluation using offline robot trajectories, testing robustness to real visual variation, sensor noise, and contact dynamics — none of which the current simulated benchmarks exercise.
- **Better aggregation rules.** Dense scoring helped FourRoom (81.3%) but destroyed Cube (4.0%), so how to automatically select or weight which predicted states get scored remains unresolved.
- **Beyond fixed margins and offsets.** The margin m and the sampling ranges (k_min = 1, Δ_min = 2, K_max of 23 or 15 model steps) are hand-set per environment; whether a single metric can transfer across environments with different latent dimensions (384 vs 192) and horizons is not established.

## Target Audience

Graduate students and research engineers working on model-based reinforcement learning, latent world models, and goal-conditioned planning will get the most from this paper — particularly those already using JEPA-family models or MPC over learned representations. It is also useful for practitioners who want a low-cost improvement to an existing frozen world model, and for readers interested in metric learning and ranking objectives applied to control. Readers without background in latent dynamics models will need to consult the cited JEPA and LeWM papers first, since the contribution is defined relative to those baselines.

## Authors’ 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 LeWorldModel (LeWM) by analyzing how its Euclidean goal cost changes with temporal…

[The full abstract on arXiv](https://arxiv.org/abs/2611.05847)

[Read the original paper](https://arxiv.org/abs/2611.05847)

## Related papers

- [Learning and Verifying Progress: Closed-Loop Agentic Planning with Progress-Enhanced Execution for Long-Horizon Vision-Language Navigation](https://robotics.world/paper/learning-and-verifying-progress-closed-loop-agentic-planning-with-2611.20676) 2026-11-16 · cs.RO · Key terms of the title in common
- [GEMS: Generation and Experience Memory for Subgoal-Guided Long-Horizon World Model Planning](https://robotics.world/paper/gems-generation-and-experience-memory-for-subgoal-guided-long-horizon-2611.25134) 2026-11-18 · cs.RO · Key terms of the title in common
- [Dream What I Can: Sparse Visual Planning for Long-Horizon Robot Manipulation](https://robotics.world/paper/dream-what-i-can-sparse-visual-planning-for-long-horizon-robot-2610.24981) 2026-10-18 · cs.RO · Key terms of the title in common
- [PILOT: Guiding Long-Horizon World-Model Planning for Robot Manipulation with Visual Subgoals and Policy Priors](https://robotics.world/paper/pilot-guiding-long-horizon-world-model-planning-for-robot-manipulation-2610.14335) 2026-10-09 · cs.RO · Key terms of the title in common
- [FLEX-WAM: Flexible Block-Causal World-Action Models for Long-Horizon Imagination and Planning](https://robotics.world/paper/flex-wam-flexible-block-causal-world-action-models-for-long-horizon-2610.05483) 2026-10-04 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/time-to-goal-learned-temporal-metrics-for-long-horizon-planning-with-2611.05847
