Escaping Latent Traps by Remembering: Training-Free Episodic Kernel Repulsion for World-Model Planning

Yican Zhao, Bolin Yang, Ruizhe Wang, Haiyang Guo, Fuji Yang, Bingo Wing-Kuen Ling, Zelin ZangarXiv 2026 · arXiv

TL;DR

Episodic Kernel Repulsion (EKR) is a training-free, "plug-and-play" cost term that helps latent world models escape planning dead ends. By maintaining a small memory of visited states and repelling candidate plans away from them, EKR breaks the memoryless loops that cause agents to get stuck in "latent traps," significantly boosting success rates across navigation and manipulation tasks with minimal compute overhead.

What Problem Does This Paper Address?

Modern "zero-shot" visual control often relies on latent world models. These models plan by searching for action sequences that minimize the Euclidean distance between a predicted future state and a goal state in a learned latent space.

The fundamental issue is that latent distance is not geodesic distance. In environments with obstacles, the straight-line path in latent space might lead directly into a wall or a corner. Because standard Model Predictive Control (MPC) is "memoryless"—it only cares about the current state and the goal—the agent can fall into a latent trap. In these regions, every short-term plan that moves toward the goal looks worse (higher cost) than staying put or moving back into the trap. This creates a closed-loop attractor where the agent endlessly revisits the same unsuccessful states.

Figure 1. A latent trap on AntMaze (LeWM, seed 42, task 13). (a) Top-down trajectories. The baseline (grey) walks into a side pocket and stays there (purple: steps labelled as trapped); EKR (orange) goes around and reaches the goal (star). (b) While trapped, the baseline’s base cost (blue) stays on a plateau at a median of 1.11× its initial value (coefficient of variation 0.09), although the true geodesic distance (black) stays at a median of 0.51 of the initial distance. EKR reaches the goal at step 207 (curves truncated at success).

Methods

The authors propose Episodic Kernel Repulsion (EKR), a simple but effective modification to the planning cost function:

  1. Episodic Memory: The agent stores the latent representations of states it has actually visited during the current episode.
  2. Novelty Gating: To keep the memory efficient and spatially representative, a new state is only added if it is sufficiently far from existing entries, determined by an adaptive threshold based on recent trajectory spacing.
  3. Kernel Repulsion: During planning, EKR adds a penalty to candidate plans based on their proximity to the $k$ nearest neighbors in memory. This is calculated using a Gaussian kernel: $$\rho_K(\hat{z}^{(i)}) = \frac{1}{K_{eff}} \sum_{k=1}^{K_{eff}} \exp\left(-\frac{\|\hat{z}^{(i)} - m_{(k)}\|_2^2}{2\sigma^2}\right)$$
  4. Scale-Free Cost Fusion: To ensure the repulsion works across different models and latent dimensions without manual tuning, the penalty is rescaled by the mean "base cost" of the current batch of candidate plans. This makes the repulsion strength $\lambda$ a dimensionless hyperparameter.

Crucially, EKR is training-free. It requires no new neural networks and can be implemented in just a few lines of code around an existing cost function.

Datasets and Benchmarks

The method was evaluated using three different world model backbones (LeWM, H-JEPA, and DINO-WM) across several challenging benchmarks:

  • Visual AntMaze: Navigation in a maze with a quadruped robot.
  • FourRoom: A classic navigation task with narrow doorways.
  • Push-T: A manipulation task requiring the agent to push a T-shaped object to a target.
  • OGBench Cube: A short-horizon manipulation task.
  • PointMaze: Long-horizon navigation tasks.

Key Insights and Ideas

  • Traps are Plateaus: Inside a latent trap, the cost function isn't just pointing the wrong way; it's often flat. This means the model provides no signal on how to escape.
  • History as a Heuristic: The agent already possesses the information needed to escape a trap: its own history. If it keeps returning to the same spot, that spot should become "expensive."
  • Efficiency over Brute Force: Simply increasing the search budget (more samples or iterations) is often ineffective inside a trap because the planner just converges more precisely to the local minimum. EKR changes the landscape itself to remove the minimum.
  • Transferability: Because of the scale-free cost fusion, a single configuration of EKR hyperparameters can transfer across entirely different model architectures (e.g., from a gradient-based JEPA model to a sampling-based DINO-WM) without re-tuning.

Key Results

EKR consistently outperformed baselines across all tested environments:

  • Success Rates: On average, EKR raised success from 31.8% to 46.7% for LeWM and from 54.7% to 64.0% for the hierarchical H-JEPA model.
  • Compute Efficiency: In 7 out of 8 settings, EKR with standard compute matched or exceeded a baseline using 4× more samples. In some cases, it even beat an 8× sample budget while using only ~1.5× the compute.
  • Long-Horizon Gains: On a long-horizon PointMaze task, EKR improved success from 44.7% to 100.0%.
  • Reduced Failure: Analysis showed a significant drop in "stuck" episodes and state revisits, confirming that the agent successfully navigates away from previously visited regions.
Figure 2. Success vs. planning compute (log scale, relative to the 1× baseline; definition in Section B). Grey line: baseline with 1–8× samples (shaded: 95% bootstrap CI); square: 2× iterations; star and dashed orange line: EKR at the default budget, labelled with its lead over the strongest baseline point and that point’s compute relative to EKR. Three seeds × 50 tasks, all points on the same set. Manipulation panels were chosen by their lead at 1–4× before the larger budgets were run; AntMaze/H-JEPA was added afterwards as the navigation example. All eight cells: Figure 5.

Limitations and Future Work

  • Slow Escape from Dead Ends: EKR fills the local cost basin one memory entry at a time. In very deep dead ends, it may still take many steps to "fill" the trap enough to push the agent out.
  • Repulsion Near the Goal: Since the memory doesn't know where the goal is, it can theoretically repel the agent away from a goal it has already visited or passed near. The authors suggest annealing the repulsion strength $\lambda$ as the base cost becomes small as a potential fix.
  • Gradient Overhead: For gradient-based planners, differentiating through the repulsion term adds a small amount of wall-clock time per step (though peak memory remains unchanged).

Summary updated

Abstract

Latent world models plan towards a goal image by minimising the distance between predicted and goal latents. This distance is not geodesic: it has local minima, latent traps, behind walls, at corners and in dead ends, and memoryless receding-horizon replanning keeps the agent in them, revisiting states far from the goal. We propose Episodic Kernel Repulsion (EKR), a training-free cost term that penalises candidate plans by a top-$k$ Gaussian kernel to a novelty-gated memory of the latents the agent has actually visited, rescaled by the current base cost so that its strength is comparable across models. Across two JEPA world models and four benchmarks, EKR raises average success from 31.8% to 46.7% (LeWM) and from 54.7% to 64.0% (H-JEPA) with the same model, planner and budget. Same-memory counterfactuals show that, in most settings, EKR pushes plans away from visited states, in navigation, often at a higher base cost; stuck episodes and revisits drop accordingly. In seven of eight settings it matches or exceeds $4\times$ samples at $0.8$--$1.5\times$ compute. Without tuning, it transfers to DINO-WM with CEM: $+6.7$ and $+19.3$ points on official and longer-goal Wall tasks, and from 44.7% to 100.0% and from 21.0% to 32.0% on long-horizon PointMaze and Push-T.
BibTeX
@misc{zhao2026escaping,
  author = {Yican Zhao and Bolin Yang and Ruizhe Wang and Haiyang Guo and Fuji Yang and Bingo Wing-Kuen Ling and Zelin Zang},
  title = {{Escaping Latent Traps by Remembering: Training-Free Episodic Kernel Repulsion for World-Model Planning}},
  year = {2026},
  eprint = {2611.22470},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.22470},
}
Figure