Imagine Before You Act: World Models — Part 4: What Should a World Model Predict?
November 21, 2026 · 9 min read · World Models, Reinforcement Learning, Machine Learning
Every world model so far has been trained, at least partly, to redraw the frame. Part 2's VAE reconstructed images, and Part 3's RSSM decoded every latent state back to pixels. That gives the model a rich training signal: 12,288 numbers per frame to get right.
It also has a cost. In Part 2 the pixel loss nearly ignored the puck, the one thing that mattered, because it covered so few pixels. And a pixel loss has the opposite problem too: it makes the model spend effort on things that don't matter. A robot's camera sees curtains moving, reflections, other people walking by. A pixel model has to explain all of it.
This part asks the question behind the whole series directly: what should a world model predict? In the four-box picture we change encode and decode. By the end you'll know:
- the three main answers: reconstruct pixels, predict rewards and values (MuZero, TD-MPC), and predict the next embedding (JEPA),
- how to measure what a latent state remembers, with linear probes,
- what each objective keeps and drops when the world contains a distraction,
- why predicting embeddings can collapse, and how methods prevent it.
1. Three answers#
Reconstruct the observation. The latent state must contain enough to redraw the next frame. Used by World Models, PlaNet, Dreamer, and the video models in Part 5. The upside: a dense, task-free signal, so the model learns even without rewards. The downside: it must model everything visible, relevant or not.
Predict only what matters for decisions (value equivalence). Forget pixels. Train the latent dynamics so that, rolled forward, it predicts rewards and values (the future rewards the critic expects). Two worlds that lead to the same rewards for every action are treated as the same. MuZero (Schrittwieser et al., 2020) played Go, chess, shogi and Atari this way, planning with a model that never predicted a single pixel. TD-MPC2 (Hansen et al., 2024) does the same for continuous control. The downside: the signal is thin, so learning can be slow, and the model knows nothing about anything the reward hasn't touched yet.
Predict the next embedding (joint-embedding predictive architecture, JEPA). Encode the next frame into a latent vector with a target encoder, and train the dynamics to predict that vector, not the pixels. The model can drop whatever is unpredictable or irrelevant, because nothing forces it to be in the embedding. This is Yann LeCun's proposal for world models (2022), and the basis of I-JEPA, V-JEPA and V-JEPA 2 (2025), which was trained on over a million hours of video and then used to plan robot actions in its embedding space. The danger: the simplest way to predict an embedding perfectly is to make every embedding the same. That's collapse (Section 4).
ELI5: three ways to prepare for a driving test. Memorize photos of every street (reconstruction). Learn only "this kind of situation, that much risk" (value). Learn to anticipate what the road will mean in a moment (embedding prediction), without caring what colour the houses are.
2. The experiment: GapWorld with a fly#
GapWorld now has a fly: a small orange square that wanders around at random, has no effect on the puck, and has nothing to do with the reward. It's a clean, controllable distraction: the fly's position is visible but useless.
We train three models on the same data (2,000 episodes of random pushes, with the fly), with the same parts:
- an encoder: a small convolutional network that reads the last two frames (so speed is visible) and outputs a 64-number latent state,
- a latent dynamics network: given the latent state and the push, predict the next latent state,
- a reward head, so that every model can be used for planning.
Each model rolls its dynamics 5 steps ahead during training. They differ only in what those 5 predicted states are trained to match:
| Model | Loss on each predicted state |
|---|---|
| Reconstruct | the decoded image should match the real next frame, plus the reward |
| Value | the reward, plus a value head on the first state that predicts the discounted sum of the next 5 rewards |
| JEPA | the predicted state should match a slow-moving copy of the encoder applied to the real next frames, plus the reward |
3. What does each latent state remember?#
To see what a latent state contains, we use a linear probe, the tool from the interpretability series: a linear regression from the 64 numbers to some quantity, trained on some episodes and tested on others. If a linear map can read the puck's position well (high , up to 1), the latent state has that information in a simple form. We probe for the puck's position (what matters) and the fly's position (what doesn't). We also plan with each model, using CEM in latent space with the reward head, as in Part 3.
Three findings:
The pixel model remembers the fly, and remembers the puck worst. Its latent state has the most fly information () and the least puck information (0.80). The fly is bigger than the puck on screen, so the pixel loss pays more attention to it. Decoding its latent states shows what it prioritised, with Part 2's problem back again:
Neither small object is drawn well. The room, which never changes, is perfect.
The value model drops the fly completely () and knows the puck well (0.97). Reward depends only on the puck, so nothing pushes the fly into its state. That's value equivalence working as intended.
JEPA knows the puck best (0.99) and keeps a little fly information (0.11). Its targets are embeddings of real frames, and the encoder that produces them is free to leave the fly out, because a randomly moving fly is hard to predict, and anything in the embedding that the dynamics can't predict only adds to the loss.
The planning results follow the same order: 26%, 29% and 39%. That's well below Part 1's 72% with the true state. These models see images, train their dynamics only 5 steps ahead, and learn from random pushes alone. But the comparison is fair, since they share everything except the objective. With 100 test episodes the difference between 26% and 29% is noise. JEPA's 39% is a clearer gap, though still from a single run each.
4. Collapse, and how to prevent it#
Look at JEPA's loss: make the predicted embedding equal to the target embedding. If the encoder outputs the same vector for every frame, the prediction is trivially perfect and the loss is zero. Nothing about this loss forbids it. That's representational collapse.
In the main experiment, the reward loss protected every model: a constant state can't predict rewards. To see collapse, we remove the reward loss and train JEPA on embedding prediction alone, three ways:
- EMA target: the target encoder is a slow average of the online encoder, not trained by gradients (the approach of BYOL and the JEPA papers);
- encoder itself: the target is the online encoder, and gradients flow through both sides;
- encoder itself + VICReg: the same, plus a variance-covariance penalty (Bardes et al., 2022) that forces every latent dimension to keep a spread across the batch and the dimensions to stay uncorrelated.
All three start from almost the same place: a freshly initialized encoder gives nearly identical outputs for every frame (a spread of about 0.0001). What happens next is the whole story.
- Encoder itself: the spread shrinks further, to 0.00002. The easiest way to lower the loss is to make all embeddings more alike, and that's what gradient descent does. The probes read almost nothing ( of 0.13 for the puck).
- EMA target: the spread never grows. Collapse is avoided in the sense that it doesn't get worse, but the encoder never learns to spread its states either. The little information a probe can recover is mostly about the fly (0.74), the biggest moving thing in the picture, not the puck (0.34).
- VICReg: the variance term forces every dimension apart, the spread jumps to about 1 within the first 1,000 steps, and the latent state becomes an excellent map of the puck () with no fly information (, worse than guessing the average). Without any reward, embedding prediction plus an anti-collapse term found exactly the predictable, controllable part of the world and dropped the random part.
An EMA target is not useless. BYOL and the JEPA papers rely on it, together with a separate predictor network and careful settings. But in our small setup it was not enough on its own, which matches a common experience: EMA-based methods work, but they are sensitive. VICReg's explicit penalty was the robust fix here.
Collapse is why every embedding-prediction method has some explicit guard: an EMA target with a predictor network (BYOL, I-JEPA, V-JEPA), variance and covariance terms (VICReg), contrastive negatives that push different frames apart, or an extra signal such as reward (TD-MPC2). Reconstruction never needs one: it can't collapse, because a constant state can't redraw different frames. That robustness is a big part of why pixel prediction stayed popular.
5. Choosing#
| Reconstruct pixels | Predict reward and value | Predict embeddings (JEPA) | |
|---|---|---|---|
| Training signal | dense (every pixel) | thin (one number per step) | dense (an embedding per step) |
| Keeps irrelevant detail | yes, and pays for it | no | mostly no |
| Can miss small relevant detail | yes (the puck) | no, if it affects reward | less likely |
| Needs rewards | no | yes | no |
| Can show you what it imagines | yes, decode the frames | no | only through a separate decoder |
| Collapse risk | none | low (rewards anchor it) | high without a guard |
| Used by | World Models, Dreamer, video models (Part 5) | MuZero, EfficientZero, TD-MPC2 | I-JEPA, V-JEPA 2, DINO-WM |
There is no single winner. Reconstruction is safe and inspectable. Value equivalence is efficient once you know the task. Embedding prediction is the bet that a model should learn the predictable structure of the world without being tied to pixels or to one task. Many recent systems mix them, for example a latent model trained with rewards and values and a light reconstruction or embedding term.
6. In code#
The three objectives differ by a few lines inside one training loop (simplified from part4_train.py, which also handles the collapse variants):
z = m.enc(pair(fr, 1)) # latent state from frames t-1, t
zs = [z]
for k in range(H): # roll the latent dynamics H = 5 steps
z = m.step(z, acts[:, k])
zs.append(z)
loss = loss + F.mse_loss(m.rew(z).squeeze(-1), rews[:, k]) * 10 # every model: reward
if kind == "recon": # ... redraw the next frame
loss = loss + ((m.dec(z) - fr[:, k + 2]) ** 2).sum((1, 2, 3)).mean() * 0.1
elif kind == "jepa": # ... match the target encoder's embedding
with torch.no_grad():
tgt = m.target(pair(fr, k + 2))
loss = loss + F.mse_loss(z, tgt) * 10
if kind == "value": # ... predict the discounted future reward
ret = torch.zeros_like(rews[:, 0])
for k in reversed(range(H)):
ret = rews[:, k] + GAMMA * ret
loss = loss + F.mse_loss(m.val(zs[0]).squeeze(-1), ret) * 10
opt.zero_grad(); loss.backward(); opt.step()
if kind == "jepa": # the target encoder slowly follows the online one
with torch.no_grad():
for p, q in zip(m.enc.parameters(), m.target.parameters()):
q.lerp_(p, 0.01)
Recap#
- What a world model predicts decides what its latent state keeps. Pixels keep everything visible, rewards and values keep only what affects reward, and embeddings keep what's predictable.
- With a randomly moving fly in GapWorld, the pixel model stored the most fly and the least puck. The value model ignored the fly entirely. JEPA stored the puck best () and planned best (39% vs 26–29%).
- Linear probes are a cheap way to ask what a latent state knows.
- Predicting embeddings can collapse to a constant. It needs a guard: an EMA target, variance-covariance terms, negatives, or a reward signal. Reconstruction can't collapse, which is part of its lasting appeal.
Next up — Part 5: Generative World Models: Playable Video. Now we go the other way: a model whose whole job is to generate the next frame, sharp enough to play. We build a tiny diffusion world model, play it for 60 steps, and fight drift.
