Latent World Models Should Plan with
Distances Along the Latent Manifold

1 The University of Sydney2 Machine Learning Research, Apple

Euclidean distance in latent space can mislead planning. Our results on LeWM support planning with distances along the latent manifold.

Abstract

Latent world models such as LeWM plan by searching for an action sequence whose predicted terminal latent is closest to the goal latent under an ambient norm, such as the Euclidean distance. Planning with such a cost assumes that proximity in the ambient latent space reflects proximity to the goal in the environment. Studying LeWM, we find that this assumption holds only in a small neighborhood around the goal, whereas farther away the L2 cost forms spurious low-cost basins that trap the planner. Yet neighborhood-based embeddings show that the latents retain the underlying physical state. We therefore hypothesize that the latents lie near a curved, low-dimensional manifold, and that the terminal cost should measure the distance along this latent manifold rather than through the ambient space. To estimate this manifold distance, we propose the Neighborhood Graph Cost (NGC), which computes shortest-path distances on a mutual nearest-neighbor graph constructed over training latents. NGC changes only the terminal cost and requires no retraining. This single change improves the planning success rate of LeWM across all four benchmark tasks and nearly solves TwoRoom and Reacher: even at the farthest goal offsets tested, NGC reaches 95% and 100% success, whereas the L2 cost falls to 27% and 81%. These results support the manifold hypothesis and our argument that latent world models should plan with distances along the latent manifold.

Observation

Even in TwoRoom, where an agent only needs to move between two rooms through a doorway, LeWM can fail to reach the goal. The rollouts below show the agent becoming trapped far from its target at locations that correspond to spurious low-cost basins in the L2 cost visualization.

Four LeWM rollouts with L2 cost in TwoRoom, in video order: one success followed by three failures in spurious low-cost regions.

Near the goal, L2 cost is faithfully low. Farther away, it no longer reflects physical distance to the goal: a state can have a low latent cost despite being physically far from the goal. The plot below shows this for the second example.

L2 cost against feasible physical path length for the second example. Near-goal points are purple, and the remaining points are gray. Physically distant states can also have low L2 cost.

Dimensionality reduction methods based on global latent distances fold the room layout, while those based on local neighborhoods recover its structure. This suggests that the latents retain spatial information that global L2 distance fails to capture.

Physical-position color key and PCA, metric MDS, Isomap, t-SNE, and UMAP embeddings of the same TwoRoom latents.

Hypothesis

We hypothesize that the latents lie near a curved, low-dimensional manifold. Nearby latent distances can preserve local physical relationships, while a straight line through the ambient space can shortcut the manifold and make physically distant states appear close.

This suggests latent world models should plan with distances along the latent manifold.

Method

Neighborhood Graph Cost (NGC) combines graph shortest paths with local Euclidean distance to estimate distance along the latent manifold.

A curved latent manifold: the blue Euclidean shortcut crosses empty space, while the orange NGC path follows neighborhood graph edges toward the goal. A close-up shows the local Euclidean branch.

Offline, we encode 5,000 training observations as nodes viv_i, connect mutual 15-nearest neighbors with Euclidean-weighted edges, and precompute shortest-path distances DijD_{ij}.

For a predicted terminal latent qq and goal gg, we find the shortest route through their four nearest graph nodes, N4(q)\mathcal{N}_4(q) and N4(g)\mathcal{N}_4(g):

Cgraph(q,g)=min⁡i∈N4(q)j∈N4(g)[∥q−vi∥2+Dij+∥vj−g∥2]C_{\mathrm{graph}}(q,g)=\min_{\substack{i\in\mathcal{N}_4(q)\\j\in\mathcal{N}_4(g)}}\left[\lVert q-v_i\rVert_2+D_{ij}+\lVert v_j-g\rVert_2\right]

Locally, NGC uses direct distance d=∥q−g∥2d=\lVert q-g\rVert_2. The radii ρq\rho_q and ρg\rho_g are the distances to each latent’s 15th-nearest graph node:

C(q,g)={d,d≤min⁡{ρq,ρg},Cgraph(q,g),otherwise.C(q,g)=\begin{cases}d, & d\le\min\{\rho_q,\rho_g\},\\[4pt]C_{\mathrm{graph}}(q,g), & \text{otherwise.}\end{cases}

CEM scores candidate action sequences with this terminal cost. The encoder, predictor, and planner stay unchanged, with no retraining.

Results

Returning to the same four TwoRoom examples, NGC produces cost maps that better reflect the route to the goal. With the encoder, predictor, and planner fixed, all four NGC rollouts reach their goals.

The same four TwoRoom pairs: L2 cost maps and rollouts above, NGC maps and successful rollouts below.
Terminal cost vs. path length

In the second example, NGC’s cost better reflects the path length to the goal.

L2 and NGC terminal costs against feasible physical path length for the second TwoRoom example.

Across all four tasks, NGC improves success at longer goal offsets (top). Grouping the same pairs by physical start–goal distance (bottom) shows that the largest gains occur on distant goals, where L2 performance degrades most.

Full paper results across four tasks. Top: success by goal offset with bootstrap intervals. Bottom: success by quintile of physical start–goal distance.
Success rates by goal offset
Success rates at the selected goal offsets
TaskOffsetL2 (%)NGC (%)Δ (pp)
TwoRoom 7527.3 94.6+67.2
Reacher 10080.6 100.0+19.4
Cube 10034.8 50.6+15.8
PushT 10012.8 27.9+15.1
Oracle predictor

With an oracle predictor, NGC reaches 100% on TwoRoom, compared with 94.6% in the main evaluation. Its advantage over L2 persists with exact predictions, showing that prediction error alone cannot explain the gains. Cube and PushT also improve.

TaskOffsetPredictorL2 (%)NGC (%)Δ (pp)
TwoRoom75Learned2494+70
Oracle19100+81
Cube100Learned3150+19
Oracle3874+36
PushT100Learned1428+14
Oracle1336+23
CEM search-budget comparison

At the longest goal offsets, increasing the CEM candidate pool yields only small gains for L2. Even with four times the default budget, L2 remains below default-budget NGC on every task, suggesting that more search alone cannot compensate for the limitations of the L2 cost.

Success rates for L2 and NGC as the CEM candidate pool increases from 0.2 to 4 times the default at the longest goal offset of each task.

Rollouts

Three examples each for Reacher, Cube, and PushT where NGC succeeds and L2 fails.

Citation

@article{you2026ngc,
  title={Latent World Models Should Plan with Distances Along the Latent Manifold},
  author={You, Zunzhi and Tao, Linwei and Xu, Siyu and Wang, Yunke and Xu, Chang},
  journal={arXiv preprint arXiv:2610.25013},
  year={2026}
}