Introduction
A JEPA-style world model encodes an observation into a latent state and predicts, for a sequence of actions, the latents that follow. With the model frozen, control becomes a search problem: find the action sequence whose predicted final latent is closest to the latent of the goal observation, execute its first actions, observe, and plan again. The question of this task is which search spends a fixed number of predictor evaluations best, measured by the fraction of episodes that end within the success tolerance of the goal.
The field mostly answers with sampling-based model-predictive control. Random shooting draws sequences and keeps the best [1]; the cross-entropy method refits a Gaussian to the elite samples, which is the planner of the published latent world models [2, 3, 4]; iCEM adds coloured noise and elite reuse [5]; MPPI and its annealed variants average samples under an exponential weight [6, 7]; and gradient-based planners differentiate the latent cost with respect to the actions [3, 8].
Three properties of the problem guided our design. The landscape is long and narrow. A goal behind an obstacle needs the predicted state to pass through a small region of latent space, which local refinement of one sample cloud tends to miss. Action coordinates act together. An isotropic sampler spends most of its budget on combinations that the predictor maps to almost the same latent. The forecast is wrong in a systematic way. A frozen predictor's one-step error does not average out over a closed loop; the same commanded motion is lost again and again, and a planner that only trusts the predicted cost keeps choosing it.
Method
Our planner divides the same budget of predicted rollout steps among four stages, all of which call only the predictor the interface supplies. It carries no per-setting constants: the environment name the interface passes is not stored.
Probing the predictor for directions and a drive
Before any search we spend one-step predictions, for action dimension . With the predictor's next latent from latent under action , the current latent, the goal latent and (or when actions are unbounded), the central differences
form a finite-difference action Jacobian. Its Gram matrix is shrunk with a ridge , giving the weights and the projector . We sample actions with the covariance , where is the correlation matrix of , so that coordinates that move the latent together are perturbed together. The same probe gives a goal-ward drive. The residual is taken between two zero-action predictions, one from and one from , so that a bias the encoder and the predictor share cancels,
and , clipped to , is the regularised least-squares action that moves toward the goal.
endpoints = torch.cat(outputs)
jac = endpoints[:dim] - endpoints[dim : 2 * dim]
jac = torch.nan_to_num(jac, nan=0.0, posinf=0.0, neginf=0.0)
self.action_secants = jac[:, self._motion_columns(jac.shape[1])] / max(2 * amplitude, 1e-8)
unit = jac.abs().amax().clamp_min(1e-8)
jac = jac / unit
gram = jac @ jac.T / jac.shape[1]
values, vectors = torch.linalg.eigh(gram)
values = values.clamp_min(0.0)
ridge = (0.04 * values[-1]).clamp_min(1e-12)
weights = values / (values + ridge)
projector = (vectors * weights) @ vectors.T
inv_sd = projector.diag().clamp_min(1e-8).rsqrt()
corr = inv_sd[:, None] * projector * inv_sd[None, :]
corr = corr + torch.diag((1.0 - corr.diag()).clamp_min(0.0))
# Transport the task residual through the same nominal one-step predictor
# at both endpoints. This cancels common encoder-to-predictor bias.
residual = (endpoints[-1] - endpoints[-2]) * (2 * amplitude / unit)
rhs = jac @ torch.nan_to_num(residual) / jac.shape[1]
drive = vectors @ ((vectors.T @ rhs) / (values + ridge))
factor = torch.linalg.cholesky(0.2 * eye + 0.8 * corr)
return factor, len(probes), torch.nan_to_num(drive).clamp(-100.0, 100.0)Each sampled sequence also has temporal structure. A sample is assigned one of three exponential kernels over time, with , and its noise is , with the Cholesky factor of and the action factor above. The population therefore mixes jittery, smooth and nearly constant sequences.
i = torch.arange(length, device=self.device, dtype=torch.float32)
distance = (i[:, None] - i[None]).abs()
scales = torch.tensor([0.55, max(1.0, length / 3), 2.0 * length], device=self.device)
kernels = (-distance / scales[:, None, None]).exp()
matrix = torch.linalg.cholesky(
0.97 * kernels + 0.03 * torch.eye(length, device=self.device)
)
if len(self.time_factors) >= 8:
self.time_factors.pop(next(iter(self.time_factors)))
self.time_factors[length] = matrix
return matrix
def _noise(self, count, time_factors, action_factor):
length, dim = time_factors.shape[-1], self.action_dim
noise = torch.randn(count, length, dim, device=self.device)
group = torch.arange(count, device=self.device) % len(time_factors)
return (time_factors[group] @ noise) @ action_factor.TA bidirectional search with verified return paths
To find passages that a single sample cloud misses, we grow two trees in latent space through the
predictor's predict hook, which rolls the model forward from planner-supplied latent states. The
forward tree starts at , the backward tree at , and the horizon is split into at most six stages
(about ). At each stage both trees expand by sampled primitives: random directions in
the leading subspace of the probe, partly continued from the parent's last command and partly pushed
along the drive, positively for the forward tree and negatively for the backward one. Survivors are
chosen by a weighted farthest-point cover on a random subset of latent coordinates, starting from the node
closest to the other tree, so that each tree stays spread out while leaning toward its partner.
A goal-side node is useful only if the goal can be reached from it in forward time, and reversing a command does not in general undo it. So each new goal-side node stores a return path that we test: three candidate counter-actions, namely the reversed command, the sibling whose measured effect best reverses the edge, and a damped reversal, are rolled forward from the new node, and the one that lands closest to the parent is kept, with its discrepancy added to the node's penalty.
if side == 0:
history = torch.cat((history[p], cmd), dim=1)
cost = loss[p]
else:
# Counteractions need not equal the negative incoming control.
# Include a sibling whose measured effect reverses the edge.
desired = 2 * base[p] - fs[side][q]
err = torch.cdist(desired, fs[side]).square()
err = err.masked_fill(parent[None] != p[:, None], float("inf"))
sibling = err.argmin(1)
backward = torch.stack(
(-cmd.flip(1), paths[side][sibling], -0.45 * cmd.flip(1)), dim=1
)
trials = backward.flatten(0, 1)
back = self._predict_endpoints(z_init, latent.repeat_interleave(3, 0), trials)
discrepancy = (
(self._features(back).reshape(len(q), 3, -1) - base[p, None])
.square()
.sum(2)
)
best = discrepancy.argmin(1)
arange = torch.arange(len(q), device=self.device)
history = torch.cat((backward[arange, best], history[p]), dim=1)
cost = loss[p] + discrepancy[arange, best]
spent += len(q) * 3 * duration
trees[side].append((latent, fs[side][q], history, cost))Forward paths and return paths are then joined. Testing every pair would exceed the budget, so we predict the cost of a join to first order. At each return path's origin we differentiate its executed end cost with respect to the starting latent, and a forward node then gets the estimate
where is the origin and a random signed projection that measures how far the latent moves in directions the gradient does not see. In four rounds we evaluate the pairs with the lowest estimate (in the first round, closeness plus the return penalty; afterwards a lower-confidence bound), refit the slope and the gap penalty per return path from what we measured, and correct the remaining estimates by kernel regression on the measured residuals. Return paths may extend up to twice the horizon when steps remain. For such long routes we add a risk term learned from how earlier return paths fared after execution, and the finalists are replayed with the supplied objective.
Search over arrival durations
The main search is evolutionary. Each candidate carries a duration from , with the number of executed actions. It is interpolated to that duration and, if shorter than the executed prefix, padded with zero actions to its length, so that a plan can arrive early and stop instead of overshooting. The first round mixes warm-started, drive-steered and pure-noise sequences. Later rounds recombine elites in the manner of differential evolution, , with a shrinking width . An 18% chance of switching duration and a per-duration survivor protect each arrival hypothesis from early elimination, and until the middle of the search one sample in eight is drawn fresh at full length. Round budgets fall as . The best routes from the tree stage enter as initial elites.
parents = torch.randint(len(elites), (count,), device=self.device)
duration_idx = elite_duration[parents].clone()
change = torch.rand(count, device=self.device) < 0.18
new_duration = torch.randint(len(durations), (count,), device=self.device)
duration_idx = torch.where(change, new_duration, duration_idx)
partners = torch.randint(len(elites), (count, 2), device=self.device)
delta = elites[partners[:, 0]] - elites[partners[:, 1]]
width = 0.85**i * (1 - 0.8 * i / max(1, rounds - 1))
paths = elites[parents] + 0.53 * delta + width * scale * noise
# Preserve the option to discover a full-length route until late in search.
if i < (rounds + 1) // 2:
paths[2::8] = scale * noise[2::8]
duration_idx[2::8] = len(durations) - 1
duration_idx[0] = elite_duration[0]
same = elite_duration == elite_duration[0]
paths[0] = elites[same].mean(0)Deciding with the forecast error we have seen
The last stage reranks about a dozen finalists, the verified long routes among them, and here we use what the previous replan got wrong. After each replan we store the forecast of the executed prefix and the forecast of doing nothing. At the next call the error of that forecast is regressed on the passive drift, with the discounted moments , giving a weight for how much of the predicted motion is passive drift that should be removed. Each finalist's terminal distance is recomputed with that drift subtracted.
A second correction targets motion lost to slack, friction or contact, and here our inspiration was the play and stop operators of hysteresis modelling. Lost motion is described by a memory with three elastic ball stops and three box stops with radii of , and typical step sizes, and a viscous component decaying by per step. The commanded latent increments pass through the memory, and what the stops absorb is the predicted loss.
def _play_atoms(self, increments):
# Each stop stores elastic deformation. Sliding occurs only on the
# boundary of its ball. Differences of the stop between the two ends
# are the *net lost motion*, including memory from previous commands.
mem = self.stop_memory[None].expand(len(increments), -1, -1)
snapshots = []
for dx in increments.unbind(1):
trial = mem + dx[:, None]
v = trial[:, :3]
mag = v.square().mean(2).clamp_min(1e-18).sqrt()
radial = v * (self.play_radius / mag).clamp_max(1.0)[:, :, None]
box = trial[:, 3:6].clamp(-self.play_box, self.play_box)
viscous = 0.60 * trial[:, 6:]
mem = torch.cat((radial, box, viscous), 1)
snapshots.append(mem)
states = torch.stack(snapshots, 1)
loss = states - self.stop_memory[None, None]
return torch.cat((loss, increments.cumsum(1)[:, :, None]), 2), statesThe weights on these atoms are fitted online, after every replan, by an accelerated projected gradient on a nonnegative set whose sum is at most . The fit has two sources: the observed forecast error and hindsight constraints. In the latter the observed successor is relabelled as the goal, so the command actually issued must explain it at least as well as every alternative. A trust factor learned from how much the correction reduced past errors scales it. When the fitted weights, scaled by the trust, exceed a threshold, we also add compensated commands, found by inverting the memory, to the finalists.
The final score keeps the supplied objective and corrects it only in its own units. We regress the objective on the raw latent distance across finalists, and add the slope times the difference between the corrected and the raw distance:
raw = (y - goal).square().mean(1)
anchored = (y - goal - weight * (passive - state)).square().mean(1)
first_error = (prefix - goal - weight * (neutral - state)).square().mean(1)
z, delta, atoms, memory = self._play_predict(trace, idle, source, weight, executed)
residual = z[:, 1:] - target
change = (delta * (delta - 2.0 * residual)).mean(2)
row = torch.arange(len(paths), device=self.device)
terminal = torch.tensor([len(p) - 1 for p in paths], device=self.device)
anchored = anchored + change[row, terminal]
first_error = first_error + change[:, executed - 1]
# Regress the supplied energy on the latent distance to express the
# correction in its units. The unaccounted component of the energy is kept.
centered = raw - raw.mean()
native_centered = costs - costs.mean()
slope = (
(centered * native_centered).sum() / centered.square().sum().clamp_min(1e-12)
).clamp_min(0.0)
uncertainty = (weight * (neutral - state)).square().mean(1) + innovation
current_dist = (state - goal).square().mean()
immediate = uncertainty / (uncertainty + current_dist).clamp_min(1e-12)
effort = torch.stack([path[:executed].square().mean() for path in paths])
for row, entry in self.return_candidates.items():
if row < count:
anchored[row] = torch.minimum(anchored[row], entry[0])
adjusted = (
anchored
+ immediate * (first_error - anchored)
+ 0.10 * uncertainty * effort / max(scale**2, 1e-12)
)
scores = (costs + slope * (adjusted - raw)).nan_to_num(
nan=float("inf"), posinf=float("inf"), neginf=float("inf")
)
index = int(scores.argmin())Every stage counts its rollout steps against the per-call budget, and the planner switches stages off when the budget is too small for them. Planner bookkeeping runs in float32, and the predictor is called under the caller's precision.
Results
| Method | ① | ② | ③ | ④ | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Success rate ↑ | Success, first world model ↑ | Success rate ↑ | Success, first world model ↑ | Success, second world model ↑ | Success rate ↑ | Success, first world model ↑ | Success, second world model ↑ | Success rate ↑ | Success, first world model ↑ | Success, second world model ↑ | |
| GPT-6.2 Astra | 0.115 | 0.115 | 0.825 | 0.825 | 0.825 | 0.515 | 0.515 | 0.545 | 0.700 | 0.700 | 0.760 |
| Random-shooting MPC | 0.700 | 0.700 | 0.145 | 0.145 | 0.165 | 0.095 | 0.095 | 0.095 | 0.160 | 0.160 | 0.140 |
| CEM | 0.830 | 0.830 | 0.610 | 0.610 | 0.635 | 0.270 | 0.270 | 0.260 | 0.735 | 0.735 | 0.810 |
| MPPI | 0.840 | 0.840 | 0.635 | 0.635 | 0.660 | 0.375 | 0.375 | 0.375 | 0.460 | 0.460 | 0.685 |
| iCEM | 0.855 | 0.855 | 0.715 | 0.715 | 0.805 | 0.430 | 0.430 | 0.385 | 0.825 | 0.825 | 0.840 |
| DIAL-MPC | 0.870 | 0.870 | 0.215 | 0.215 | 0.215 | 0.075 | 0.075 | 0.080 | 0.235 | 0.235 | 0.290 |
| GD | 0.735 | 0.735 | 0.125 | 0.125 | 0.105 | 0.025 | 0.025 | 0.050 | 0.015 | 0.015 | 0.040 |
| NGOpt | 0.800 | 0.800 | 0.655 | 0.655 | 0.700 | 0.345 | 0.345 | 0.345 | 0.560 | 0.560 | 0.535 |
- ① EB-JEPA Two Rooms · opposite rooms
- ② Push-T · goals 30 steps ahead (DINO-WM and JEPA-WM models)
- ③ Push-T · goals 50 steps ahead, long horizon (DINO-WM and JEPA-WM models)
- ④ Wall · random start/goal (DINO-WM and JEPA-WM models)
On PushT-30 and PushT-50 our planner is ahead of every published baseline. It reaches a success rate of 0.825 on PushT-30 against 0.715 for iCEM [5], and 0.515 on PushT-50 against 0.430 for iCEM [5]. The lead holds with the second world model as well: 0.545 on PushT-50 against 0.385 for iCEM [5].
On Wall the planner is competitive but not best. Its 0.700 is below iCEM [5] at 0.825 and below CEM at 0.735, while it is clearly above MPPI and the gradient planner. With the second world model it reaches 0.760, again below 0.840.
On TwoRooms the planner fails. Its success rate of 0.115 is far below every baseline, including random shooting at 0.700. A drop this large points to a mismatch between some stage of our planner and that setting, not to a narrow loss in search quality.
How we got here
The planner was built over many short cycles. In each we tested a change against the installed version on paired episodes before installing it. Our development used public world models downloaded from the task's hub, the published planners' implementations shipped with the task, and synthetic plants we wrote ourselves. The counts below are our own development measurements as recorded in the trace.
- Start: coordinated directions. We began from two failure modes described in the literature: local optimisers stall behind obstacles, and broad sampling misses movements that need several action coordinates to change together. A first planner that sampled along directions estimated from one-step predictions reached 128 of 140 goals in our synthetic suite, against 120 for iCEM and 110 for CEM. Several trajectories with a public model came close to the goal and then moved away, which led to the arrival-duration hypotheses.
- Lower predicted cost did not mean more successes. On 32 fresh episodes with a public model some plans beat CEM on predicted cost and lost on physical success. That is what turned us to the forecast error of the executed prefix as a signal for the next replan. With the forecast correction a public-model test went from 18 to 24 of 24 goals (CEM reached 22).
- Narrow passages forced the bidirectional search. A synthetic navigation simulator with narrow gates exposed failures that the easier suites missed: the planner reached 6 of 30 goals and some failed trajectories repeatedly chose the same position with steps left. A two-sided search raised one such test from 7 to 13 of 42. A larger tree search reached 26, which showed the remaining gap. Our closing ablation on 40 fresh starts gave 17 goals for the installed planner, 8 with the bidirectional tree disabled, and 9 with the tree kept but its return values beyond the horizon discarded.
- The lost-motion memory. Fitting a memory model of lost motion predicted held-out latent endpoints more accurately on all four of our archived physical suites, but it rarely changed which action succeeded. On a 200-episode test with known actuator slip, compensating the command raised success from 168 to 188, and on paired video-model trials the version that compensates reached 93 of 182 goals against 91 for its predecessor. Clearing the memory in the closing ablation cost one goal of 17, so most of the gain on that test comes from the tree.
- Abandoned directions. Several ideas were measured and not kept. A timing-aware variant that estimated how long an action takes to act gained on delayed-actuator tests (99 against 89 of 168) but lost six successes on an elastic-object test. A registration method doubled successes on one gate test (10 against 5 of 30) but lost accuracy on ordinary controls. Repairing a return path after a different approach lowered the model's error in 69% of early deformable-object trials but the physical error in only 20%. A learned weighting of latent coordinates improved prediction of the objective but reached the same number of goals on 196 tasks. A convex-hull search between reachable sets lost closed-loop success on the gate test. Replaying a short action history when restarting a rollout from an intermediate latent did not consistently help.
- Last-action ranking. A test that recovers the terminal goal score from summed objectives raised the ranking correlation on 106 held-out contexts from about 0.34 to 0.97.
In the last snapshot recorded in the trace the installed planner reached 84 of 148 development episodes, against 67 for iCEM and 52 for CEM on the same episodes. The final changes were engineering: a mixed-precision stress test found a dtype error in the bookkeeping, which led to float32 bookkeeping under the caller's predictor precision, and the bookkeeping transfers were batched. We checked that actions and rollout counts stayed identical on 1,776 seeded decisions.
Limitations
- TwoRooms is a failure, and we cannot explain it. Our planner falls far below every published baseline there, random shooting included. Our development never reproduced a collapse of this kind, so whatever fails on TwoRooms went unseen. A planner this composite needs a safe fallback, for example to plain sampling when its own stages disagree with the supplied objective, and ours has none.
- Wall is below the simplest strong baselines. iCEM and CEM both beat us there with both world models, so the extra machinery does not pay on every setting where it does not fail.
- The method is complex and its constants are tuned. The planner has many hand-set constants: kernel scales, recombination weights, stop radii, discount factors, budget fractions. They were chosen on our development suites. Our ablations cover the tree, its return values beyond the horizon, the lost-motion memory and the compensation, on two synthetic suites; on the second, with actuator slip, removing the tree or the memory did not lower success (107 and 105 of 115 against 104), while removing the compensation did (93).
- The corrections rest on short histories. The drift and lost-motion models are fitted from a handful of executed steps per episode. The lost-motion trust starts at zero and the drift weight starts from a fixed prior, so early in an episode the decision stage leans on constants rather than on measurements.
References
- Anusha Nagabandi, Gregory Kahn, Ronald S. Fearing et al. (2017). Neural Network Dynamics for Model-Based Deep Reinforcement Learning with Model-Free Fine-Tuning.
- Gaoyue Zhou, Hengkai Pan, Yann LeCun et al. (2025). DINO-WM: World Models on Pre-trained Visual Features enable Zero-shot Planning. ICML.
- Basile Terver, Tsung-Yen Yang, Jean Ponce et al. (2025). What Drives Success in Physical Planning with Joint-Embedding Predictive World Models?. TMLR.
- Basile Terver, Randall Balestriero, Megi Dervishi et al. (2026). A Lightweight Library for Energy-Based Joint-Embedding Predictive Architectures. ICLR.
- Cristina Pinneri, Shambhuraj Sawant, Sebastian Blaes et al. (2020). Sample-efficient Cross-Entropy Method for Real-time Planning. CoRL.
- Grady Williams, Andrew Aldrich, Evangelos Theodorou (2015). Model Predictive Path Integral Control using Covariance Variable Importance Sampling.
- Haoru Xue, Chaoyi Pan, Zeji Yi et al. (2025). Full-Order Sampling-Based MPC for Torque-Level Locomotion Control via Diffusion-Style Annealing. ICRA.
- Michael Psenka, Michael Rabbat, Aditi Krishnapriyan et al. (2026). Parallel Stochastic Gradient-Based Planning for World Models. ICML.