cutting-edgeWorld Models

World Models

Background
  • Ha & Schmidhuber (2018) World Models paper formalized the idea of a learned internal model of the environment
  • Tesla FSD and Google DeepMind systems use world models for autonomous driving and robotics planning
  • GPT-4 exhibits implicit world modeling: it can simulate physical and social scenarios described in text
The Concept

A world model is a neural network that learns to predict what will happen next in an environment (images, physics, outcomes of actions). It enables planning without executing real actions, allowing agents to explore hypothetical futures in imagination rather than in reality.

How it Links
  • Connects directly to model-based reinforcement learning - the agent plans using the world model
  • Video prediction models (Sora, DALL-E video) are world models specialized for visual environments
  • Connects to memory-augmented neural networks and cognitive science theories of mental simulation
Concrete Example
AlphaGo planning ahead: rather than playing 10,000 real games against itself to evaluate a move, it simulates thousands of game continuations in its world model (the trained neural network that predicts board states and win probabilities). The best simulated outcome determines the actual move.
Learning outcomes
  • Define what makes a model a "world model" and distinguish it from a generative model or a policy.
  • Explain the Recurrent State Space Model (RSSM) in DreamerV3 and why planning in latent space beats pixel-space planning.
  • Describe how video generation models like GAIA-1 and Genie serve as implicit world models.
  • Identify the key open problems: partial observability, physical plausibility, and long-horizon consistency.
  • Connect world models to the broader goal of autonomous machine intelligence as framed by LeCun (2022).
TL;DR

A world model is a learned internal simulator: given the current state and an action, it predicts the next state (and reward). Ha and Schmidhuber [1] showed that an agent could train entirely inside its own dream. DreamerV3 [2] scales this to diverse domains via a compact latent space. Video generation models — GAIA-1, Genie [3] — extend the idea to controllable video, where the generated frames are the “world” that an agent can interact with.

Intuition

A chess engine does not play moves on a real board and wait for consequences; it imagines future positions and evaluates them. A world model gives a neural agent the same capability: instead of collecting every training example by interacting with the real environment (which is slow, expensive, or dangerous), the agent rolls out imagined trajectories inside a learned model of the environment.

Dream to plan

The key insight from Ha and Schmidhuber 2018 is that if the world model is accurate enough, an agent can train its policy entirely on imagined data (“in the dream”) and then transfer zero-shot to the real environment. Even imperfect world models provide a sample-efficiency boost because imagined rollouts are cheap.

The idea predates deep learning: Schmidhuber proposed self-modeling networks in 1990, and Sutton’s “Dyna” architecture (1991) interleaved real and imagined rollouts in tabular RL [6]. What modern deep world models add is the ability to model rich, high-dimensional observations (pixels, language) using neural representations.

What makes a model a “world model”?

A model MM is a world model if it predicts future states st+1s_{t+1} from current state sts_t and action ata_t:

s^t+1=M(st,at).\hat{s}_{t+1} = M(s_t, a_t).

A pure generative model (e.g., an unconditional video diffusion model) generates plausible-looking sequences but does not have an explicit action-conditioning mechanism. A world model is action-conditioned: different actions lead to different predicted futures, and the model’s internal dynamics encode the causal structure of the environment.

A world model supports:

  • Planning: roll out multiple action sequences, pick the one leading to the highest estimated return.
  • Policy training: generate imagined experience to train a policy without real environment interaction.
  • Counterfactual reasoning: ask “what would have happened if I had taken action a′a'?”
PropertyGenerative modelWorld modelPolicy / RL agent
Primary outputPlausible future observationsState predictions conditioned on actionsActions to take in environment
Action-conditioned?No (or weakly)Yes (core design requirement)Yes (outputs actions)
Supports planning?Not directlyYes — roll out imagined action sequencesIndirectly (model-free RL does not plan)
Used for counterfactuals?With cautionYesNo
ExamplesStable Diffusion, VideoPoetDreamerV3, MuZero, GAIA-1PPO, SAC, AlphaGo policy net

Ha and Schmidhuber (2018): Dream to learn

The Ha and Schmidhuber “World Models” paper [1] introduced the V-M-C (Vision-Memory-Controller) architecture:

  • V (VAE): a convolutional variational autoencoder that compresses each frame oto_t to a low-dimensional latent vector ztz_t.
  • M (MDN-RNN): a mixture-density RNN that models the distribution over future latent states P(zt+1∣zt,at,ht)P(z_{t+1} | z_t, a_t, h_t), where hth_t is the hidden state of the RNN. The mixture-density output allows the model to capture multi-modal next-state distributions.
  • C (linear controller): a small linear layer that maps [zt,ht][z_t, h_t] to actions. Because C is linear, it can be optimised cheaply with CMA-ES (a black-box evolution strategy).

The key experiment: the controller C can be trained entirely on rollouts generated inside the M model (the “dream”), then deployed in the real environment. On CarRacing-v0, the policy trained in the dream matched or exceeded policies trained in the real environment, demonstrating that world-model planning can serve as a training environment.

Dreamer and DreamerV3

Dreamer [4] and its successor DreamerV3 [2] replace the V-M-C decomposition with an end-to-end differentiable world model called the Recurrent State Space Model (RSSM), trained jointly with the policy.

The Recurrent State Space Model (RSSM)

The RSSM represents state as a pair (ht,zt)(h_t, z_t) where hth_t is a deterministic recurrent state and ztz_t is a stochastic latent variable:

Sequence model (transition prior):

ht=fϕ(ht−1,zt−1,at−1),z^t∼pϕ(zt∣ht).h_t = f_\phi(h_{t-1}, z_{t-1}, a_{t-1}), \qquad \hat{z}_t \sim p_\phi(z_t \mid h_t).

Encoder (posterior, conditioned on the actual observation):

zt∼qϕ(zt∣ht,ot).z_t \sim q_\phi(z_t \mid h_t, o_t).

Decoder:

o^t∼pϕ(ot∣ht,zt),r^t∼pϕ(rt∣ht,zt).\hat{o}_t \sim p_\phi(o_t \mid h_t, z_t), \qquad \hat{r}_t \sim p_\phi(r_t \mid h_t, z_t).

Training minimises the ELBO-style world-model loss:

LWM=E ⁣[−ln⁡pϕ(ot∣ht,zt)−ln⁡pϕ(rt∣ht,zt)+β⋅KL(qϕ(zt∣ht,ot)∥pϕ(zt∣ht))].\mathcal{L}_{\text{WM}} = \mathbb{E}\!\left[ -\ln p_\phi(o_t \mid h_t, z_t) - \ln p_\phi(r_t \mid h_t, z_t) + \beta \cdot \text{KL}(q_\phi(z_t \mid h_t, o_t) \| p_\phi(z_t \mid h_t)) \right].

Why latent-space planning beats pixel-space planning: planning over raw pixels requires the world model to hallucinate photorealistic future frames, which is expensive and prone to compounding perceptual errors. Planning over zt∈R32z_t \in \mathbb{R}^{32} is computationally trivial, and the latent space is learned to be predictable — by training pressure from the KL term, ztz_t only captures what can be predicted from the transition model. Noise and irrelevant texture are discarded.

Policy learning via imagined rollouts: once the RSSM is trained, a policy πθ(at∣ht,zt)\pi_\theta(a_t \mid h_t, z_t) and a value function Vψ(ht,zt)V_\psi(h_t, z_t) are trained on rollouts generated entirely by the RSSM, with gradients flowing through the imagined trajectory via the reparametrisation trick.

DreamerV3 [2] extends the architecture with:

  • Symlog predictions (predict the symlog-transformed reward to handle varying reward scales across domains).
  • KL balancing (separately scale the KL towards the prior vs the posterior to prevent posterior collapse).
  • Free bits (a minimum KL per dimension to prevent degenerate solutions).

With these changes, DreamerV3 trains a single set of hyperparameters that works across Atari, continuous control, Minecraft, and BSuite — the first model-based RL agent to achieve human-level performance in Minecraft (collecting diamonds) from scratch.

MuZero: planning without a reconstruction decoder

MuZero [5] takes a different architectural stance: it learns a world model without an observation decoder. Instead of reconstructing oto_t, the latent state sts_t is learned end-to-end to be useful for value and policy prediction. Three learned functions:

  • Representation hθh_\theta: ot→sto_t \to s_t (encode observations to latent).
  • Dynamics gθg_\theta: (st,at)→(st+1,rt)(s_t, a_t) \to (s_{t+1}, r_t) (transition + reward).
  • Prediction fθf_\theta: st→(pt,vt)s_t \to (p_t, v_t) (policy logits + value estimate).

Planning uses MCTS over the latent state space. Because the dynamics function is learned, MuZero can plan in games (Go, chess, shogi, Atari) without access to a simulator, achieving superhuman performance on all of them.

Video generation as world modeling

A video generation model that accepts action tokens as conditioning implicitly learns a world model: given frame oto_t and action ata_t, generate ot+1o_{t+1}. Two exemplars:

GAIA-1 (Wayve, 2023): a 9 billion parameter autoregressive video model trained on driving data. Given a driving video and a sequence of actions (steering, throttle), GAIA-1 generates photorealistic future frames consistent with the vehicle dynamics. The generated video can be used to train downstream driving policies, providing a simulation engine that generalises to novel scenarios.

Genie (Google DeepMind, 2024) [3]: a 11 billion parameter foundation world model trained on 2D platformer gameplay video, without any action labels. Genie learns to infer latent actions from video transitions via a spatiotemporal video tokenizer, a latent action model, and a dynamics model. Given a single image, it can generate an interactive environment: pressing left/right/jump produces consistent future frames obeying the inferred game physics. The model generalises to novel hand-drawn scene images never seen in training, demonstrating that world model knowledge can transfer across visual domains.

Sora as an implicit world model

OpenAI Sora (2024) and similar video diffusion models are sometimes described as world models because they generate physically consistent video sequences. Strictly, they are conditional generative models, not world models: they do not have an explicit action interface, and “planning” over them requires treating prompts as approximate action descriptions. Whether implicit physical consistency is sufficient for planning is an active research question.

Open problems

Partial observability: real environments are partially observable — the agent never sees the full state. DreamerV3 handles this via the stochastic latent ztz_t, but long-horizon memory (remembering which doors were locked three rooms ago) remains challenging.

Physical plausibility: video generation models can produce visually coherent but physically implausible sequences (objects passing through walls, incorrect rigid-body dynamics). Training on physics-engine-simulated data or incorporating physics priors is an active area.

Long-horizon consistency: world models tend to drift over many steps. A 10-step imagined rollout is plausible; a 1000-step rollout diverges from the true environment dynamics. Hierarchical world models (planning at multiple time scales) and uncertainty-aware planning (pulling back to real experience when the model is uncertain) are current research directions.

Scaling world models: LeCun (2022) [7] argues that world models are the central missing ingredient for human-level autonomous intelligence, proposing a Joint Embedding Predictive Architecture (JEPA) that learns self-supervised world models in abstract feature space rather than pixel space. Whether scaling video-generation-style world models eventually solves this is an open question.

Check yourself
Score: 0 / 5(0 answered)
  1. 1. What distinguishes a world model from a generative model?
  2. 2. Why does DreamerV3 plan in latent space rather than pixel space?
  3. 3. In DreamerV3's RSSM, what is the role of the deterministic component h_t?
  4. 4. What makes Genie (2024) unusual as a world model?
  5. 5. What is the "dream training" paradigm introduced by Ha and Schmidhuber (2018)?
What makes a model a 'world model' vs a generative model, and why does this distinction matter for planning?onsite

A generative model produces plausible-looking observations from a noise distribution or a conditioning signal, but does not have an explicit interface for action conditioning. A world model specifically maps (st,at)→st+1(s_t, a_t) \to s_{t+1}: it is causal in the action, meaning different actions lead to different predicted futures in a controlled, plausible way.

This distinction matters for planning because planning requires evaluating the consequences of hypothetical actions. A generative model cannot answer “what would happen if I steer left?” unless it has learned the action-state causal structure. A world model by definition supports this query. The practical consequence is that world models enable agents to improve their policies from imagined experience, substantially reducing the number of real environment interactions needed — critical for settings where real-environment samples are expensive (robotics, drug discovery, autonomous driving).

Explain how DreamerV3's RSSM works and why latent-space planning is preferable to pixel-space planning.staff

The RSSM represents state as a pair (ht,zt)(h_t, z_t). The deterministic component hth_t is computed via a GRU-style recurrent function ht=f(ht−1,zt−1,at−1)h_t = f(h_{t-1}, z_{t-1}, a_{t-1}), providing a running summary of history. The stochastic component ztz_t is a random variable drawn from a posterior q(zt∣ht,ot)q(z_t | h_t, o_t) during training (when observations are available) and a prior p(zt∣ht)p(z_t | h_t) during imagination (when the model rolls forward without new observations). The training objective includes a reconstruction loss (predicting oto_t and rtr_t) and a KL term that pushes the posterior toward the prior, training the prior to capture the predictable structure of transitions.

Policy training runs entirely in imagination: from a starting state (ht,zt)(h_t, z_t), the model imagines HH steps by sampling actions from the policy, advancing via the transition model, and receiving rewards from the reward head. The policy and value function are updated via backpropagation through the entire imagined trajectory using the reparametrization trick on ztz_t.

Why latent over pixels: generating photorealistic next frames requires the dynamics model to reproduce all visual detail — lighting, texture, non-relevant background objects. This is hard and causes compounding perceptual error over long rollouts. A 32-dimensional ztz_t only needs to capture the predictable aspects of transitions (object positions, velocities, relevant game state). The reconstruction pressure from the decoder trains ztz_t to be sufficient for observation prediction, but the dynamics model operates entirely in the compact latent space, making imagination fast and accurate over long horizons.

References

  1. Ha, D. and Schmidhuber, J. (2018). World Models. arXiv preprint. arXiv:1803.10122
  2. Hafner, D., Lillicrap, T. P., Norouzi, M., and Ba, J. (2023). Mastering Diverse Domains through World Models. arXiv preprint. arXiv:2301.04104
  3. Bruce, J., Dennis, M., Edwards, A., Parker-Holder, J., Shi, Y., Hughes, E., Lai, M., Mavalankar, A., Steigerwald, R., Apps, C., Aytar, Y., Bechtle, S., Bhatt, U., Blundell, C., Carifio, J., Catoia, V., Chakrabarti, S., Chan, H., Crespo, G., and others (2024). Genie: Generative Interactive Environments. arXiv preprint. arXiv:2402.15391
  4. Hafner, D., Lillicrap, T. P., Fischer, I., Villegas, R., Ha, D., Lee, H., and Davidson, J. (2019). Learning Latent Dynamics for Planning from Pixels. ICML 2019. arXiv:1811.04551
  5. Schrittwieser, J., Antonoglou, I., Hubert, T., Simonyan, K., Sifre, L., Schmitt, S., Guez, A., Lockhart, E., Hassabis, D., Graepel, T., Lillicrap, T., and Silver, D. (2020). Mastering Atari, Go, Chess and Shogi by Planning with a Learned Model. Nature 588, 604-609. arXiv:1911.08265
  6. Sutton, R. S. and Barto, A. G. (2018). Reinforcement Learning: An Introduction. MIT Press, 2nd edition. http://incompleteideas.net/book/the-book-2nd.html
  7. LeCun, Y. (2022). A Path Towards Autonomous Machine Intelligence. OpenReview preprint. https://openreview.net/forum?id=BZ5a1r-kVsf