LeMémoire: Memory-Conditioned JEPA World Models for Planning in Changing Worlds

1Concordia University 2Mila – Quebec AI Institute 3University of Toronto
†Corresponding authors
Concordia Mila - Quebec AI Institute University of Toronto

Code coming soon.

Video

Narrated video with subtitles.

Abstract

JEPA world models plan by predicting the consequences of actions in a learned latent space. However, the dynamics of an environment often depend on factors the agent cannot observe, such as friction or the response of its actuators. Because these models predict from only a few recent frames, they cannot distinguish environments that differ only in these factors, and their plans degrade under dynamics shifts. We propose LeMémoire, a JEPA world model that plans by conditioning its predictor on a memory of every transition it has executed in its current world, kept across episodes. As the agent acts, the memory stores each action together with the outcome it produced. From these transitions the model reads a dynamics code, which conditions its predictions of the effects of its next actions. At test time, the model adapts by writing its transitions into its memory, without accessing the hidden factors or changing any weight. In three environments, memory raises planning success under dynamics shifts outside the training range above that of the same model trained on the same data without memory. On PushT, it raises out-of-range success from 50% to 72% and success under unseen dynamics by 18 points, and it significantly outperforms test-time training out of range and under combined shifts in 11 of 12 paired comparisons across environments and backbones. A history encoder limited to the current episode recovers less than half of the gain, so the gain comes from the experience kept across episodes. A JEPA world model can thus adapt to dynamics shifts from a memory of its own transitions.

One recorded sequence of pushes, replayed in four worlds

training world
as in training
commands rotated 30°
within the training range
pusher moves 2.5× farther
never trained
block turns 10× more easily
never trained

One recorded sequence of pushes, replayed unchanged in four PushT worlds: the training world, commands rotated 30°, a pusher that moves 2.5 times farther and a block that turns 10 times more easily. The first frames look the same, but the block ends in four different places.

Method

Overview of LeMémoire. (a) Training on many worlds with a memory, a reader and a predictor. (b) Test in one world, where the agent writes every executed transition into the memory.
Overview of LeMémoire. (a) Training on many worlds. The frozen encoder E maps frames to latent states z. The memory M holds earlier transitions from the same world. Each row stores three latent states, their actions, the next latent state and its surprise si (the error of the default-world predictor P0). The reader R maps M to a dynamics code ê, which conditions the predictor P (ℒpred). Optionally, where the training worlds expose their dynamics parameters ξ, a teacher code t(ξ) also trains P (ℒT) and is the target of ê (ℒmatch, sg: stop-gradient). (b) Test in one world: ξ is unknown and no weights change. The agent writes every executed transition into M, which persists across episodes, and reads an updated ê before every plan with P(· | ê).
The agent writes every executed transition into its memory, together with the surprise of the default-world predictor. The reader maps the memory to a dynamics code, which conditions the predictor. The memory persists across episodes, and no weight changes at test time.

Results

We add LeMémoire to two JEPA world models, LeWM and temporal straightening (TS), and evaluate it on ShiftedWorlds: 82 test conditions in PushT, Reacher and OGBench-Cube. They fall into four groups: in range (including the default world), out of range, unseen dynamics and combinations of several changes.

ShiftedWorlds

Every tile replays the same recorded action sequence of its environment in one test condition. Click a tile to enlarge it.

Condition names, values and training ranges as in the condition tables of the paper's appendix.

block inertia ×0.1 · never trained (training: ×0.3 to ×3)

Fine-tuned backbonethe same model trained on the same worlds without memory
✕ fails (50 steps)
Test-time trainingAdaJEPA, which updates the weights while acting
✕ fails (50 steps)
Ours (memory)reads a dynamics code from a memory of its own transitions, without weight updates
✓ succeeds at step 24

Without memory and with test-time training, the plans over-rotate the T. With memory, the T lands in place.

pusher gain ×2.5 · never trained (training: ×0.6 to ×1.6)

Fine-tuned backbonethe same model trained on the same worlds without memory
✕ fails (50 steps)
Test-time trainingAdaJEPA, which updates the weights while acting
✕ fails (50 steps)
Ours (memory)reads a dynamics code from a memory of its own transitions, without weight updates
✓ succeeds at step 24

Without memory, every push overshoots. With memory, the agent scales its pushes and lines the T up.

block and pusher friction 2.0 · never trained (training: 0 to 0.75)

Fine-tuned backbonethe same model trained on the same worlds without memory
✕ fails (50 steps)
Test-time trainingAdaJEPA, which updates the weights while acting
✕ fails (50 steps)
Ours (memory)reads a dynamics code from a memory of its own transitions, without weight updates
✓ succeeds at step 25

With memory, the T reaches the goal at step 25. Without memory and with test-time training, it misses the goal in all 50 steps.

Out of range, LeWM backbone, 150 test episodes per world

fine-tuned backbone50.3%
test-time training48.8%
ours72.3%

actuator gear ×4 · never trained (training: ×0.4 to ×2)

Fine-tuned backbonethe same model trained on the same worlds without memory
✕ fails (50 steps)
Test-time trainingAdaJEPA, which updates the weights while acting
✕ fails (50 steps)
Ours (memory)reads a dynamics code from a memory of its own transitions, without weight updates
✓ succeeds at step 8

Without memory, the arm swings past the target. With memory, it reaches it.

actuator gear ×4 · never trained (training: ×0.4 to ×2)

Fine-tuned backbonethe same model trained on the same worlds without memory
✕ fails (50 steps)
Test-time trainingAdaJEPA, which updates the weights while acting
✕ fails (50 steps)
Ours (memory)reads a dynamics code from a memory of its own transitions, without weight updates
✓ succeeds at step 25

A second episode in the same world. With memory, the arm reaches the target at step 25.

Out of range, LeWM backbone, 150 test episodes per world

fine-tuned backbone18.3%
test-time training15.3%
ours28.9%

command rotation 56.25° · never trained (training: ±45°)

Fine-tuned backbonethe same model trained on the same worlds without memory
✕ fails (50 steps)
Ours (memory)reads a dynamics code from a memory of its own transitions, without weight updates
✓ succeeds at step 21

Without memory, the arm pushes the cube the wrong way. With memory, it brings the cube to the goal.

Out of range, TS backbone, 150 test episodes per world

fine-tuned backbone70.7%
ours77.7%

Each example is a test episode in which ours succeeds within half the step budget and the other methods fail. The examples are chosen by this rule, so the success rates are in the bars and in the table below, not in the clips.

Planning success (%) in changed worlds

PLDM and GCBC sit outside the two backbone groups of the paper's table and appear in both views. Bold and underline rank all nine columns of the paper's table.

Test groupPLDMGCBCLeWMAdaJEPAPhysiCalWorldOursTSAdaJEPAOurs
In range61.8 ± 1.874.0 ± 7.764.9 ± 2.955.0 ± 1.982.2 ± 4.786.3 ± 1.380.7 ± 1.964.5 ± 4.283.0 ± 2.7
Out of range51.7 ± 3.062.3 ± 6.254.3 ± 2.748.8 ± 0.466.4 ± 2.172.3 ± 3.266.2 ± 2.454.5 ± 1.666.9 ± 3.3
Unseen dynamics71.5 ± 1.074.3 ± 9.076.5 ± 2.365.0 ± 2.080.0 ± 6.984.5 ± 5.775.2 ± 6.863.5 ± 6.178.7 ± 3.1
Combinations30.8 ± 2.027.7 ± 3.032.7 ± 2.330.0 ± 1.037.2 ± 0.853.2 ± 1.851.8 ± 2.743.4 ± 1.751.8 ± 3.3
Test groupPLDMGCBCLeWMAdaJEPAPhysiCalWorldOursTSAdaJEPAOurs
In range56.4 ± 4.1—‡50.3 ± 3.851.9 ± 3.654.4 ± 3.280.5 ± 4.466.4 ± 1.779.1 ± 3.287.2 ± 2.2
Out of range11.4 ± 2.2—‡11.9 ± 3.615.3 ± 1.415.0 ± 5.128.9 ± 5.535.0 ± 4.222.7 ± 2.962.3 ± 1.2
Unseen dynamics18.0 ± 2.6—14.9 ± 1.114.7 ± 2.516.1 ± 3.635.7 ± 1.918.3 ± 1.528.2 ± 2.438.1 ± 5.4
Combinations23.7 ± 4.4—‡27.7 ± 4.536.8 ± 6.333.2 ± 6.339.7 ± 9.156.8 ± 3.722.0 ± 4.865.3 ± 1.6
Test groupPLDMGCBCLeWMAdaJEPAPhysiCalWorldOursTSAdaJEPAOurs
In range64.8 ± 4.393.9 ± 1.971.4 ± 4.287.4 ± 3.386.1 ± 2.186.4 ± 0.981.6 ± 4.081.8 ± 1.688.4 ± 0.2
Out of range58.9 ± 2.675.9 ± 2.862.7 ± 3.271.3 ± 1.080.0 ± 2.582.6 ± 1.669.9 ± 4.969.9 ± 4.277.7 ± 2.5
Unseen dynamics51.7 ± 4.961.6 ± 3.056.2 ± 4.366.2 ± 0.563.4 ± 4.261.4 ± 2.660.4 ± 4.959.3 ± 2.963.8 ± 3.2
Combinations58.4 ± 4.280.3 ± 1.061.6 ± 2.068.3 ± 2.274.1 ± 1.880.4 ± 2.067.1 ± 3.960.5 ± 3.970.1 ± 0.2

Planning success (%) in changed worlds. LeWM and temporal straightening (TS) backbones. Mean ± std over three 50-episode blocks. Best in bold, second best underlined, and the best within each backbone shaded. A dash marks a cell not measured, or (‡) a success below 3%. Three training seeds of our LeWM model on PushT vary by a std of at most 0.7 points per group (see the paper's appendix). Ours is significantly better in over 80% of paired comparisons (Holm-corrected McNemar).

Planning success with the TS backbone in the four groups of each environment, without memory (fine-tuned backbone) and with memory (ours), 150 test episodes per condition.
With the memory of another world of the same group, PushT success is up to 33.5 points lower than with its own memory, so the plans follow the world in which the memory was recorded.

BibTeX

@article{lememoire2026,
  title   = {LeM{\'e}moire: Memory-Conditioned {JEPA} World Models for Planning in Changing Worlds},
  author  = {Pinon, Sadman Rakib and Orsini, Adamo and Jiang, Linlian and Chi, Zhixiang and Kingi, Jacob and Wang, Yang and Zuo, Xinxin},
  journal = {arXiv preprint},
  year    = {2026}
}