No history yet

Predictive Latent Architectures

Abstracting Dynamics

Effective world models don't predict pixels; they predict the evolution of abstract representations. The core challenge lies in building a latent space that is both informative enough to reconstruct observations and simple enough to enable efficient planning and prediction. This involves creating a deliberate information bottleneck, forcing the model to distill the essence of the environment's state and dynamics while discarding high-frequency, task-irrelevant noise.

World modeling in AI is the practice of learning an internal predictive model of an environment—often in a compact latent space—so an agent can simulate “what happens next” under candidate actions and choose better actions with fewer real-world trials.

Two prominent architectures excel at this: the Recurrent State-Space Model (RSSM) and the Joint-Embedding Predictive Architecture (JEPA). Both depart from direct observation prediction, but they achieve their compact representations through different means.

The Recurrent State-Space Model

The forms the backbone of agents like Dreamer. It factorizes the latent state into two key components: a deterministic recurrent state and a stochastic multi-categorical state. The deterministic part, typically managed by a GRU, aggregates information over time, providing a continuous memory of the environment's history.

The stochastic part introduces randomness, capturing the unpredictable nature of the environment. While early versions used a Gaussian distribution for this component, later iterations like DreamerV3 adopt multi-categorical latent variables. This is a critical shift. A single Gaussian struggles to model disconnected states, like a robot arm being either in contact with an object or not. A mixture of Gaussians can approximate this, but categorical variables model such discrete, non-smooth dynamics more naturally and efficiently.

Using categorical variables allows the model to represent distinct, unrelated concepts without forcing them onto a continuous manifold, which is ideal for environments with abrupt changes or discrete modes of operation.

This combination of a deterministic state for temporal integration and a stochastic state for uncertainty is powerful. The model learns to predict the next stochastic state based only on the deterministic history, forming the dynamics model. Separately, it uses the current observation to infer the 'true' stochastic state. The KL-divergence between these two distributions, prior and posterior, acts as a regularization term, forcing the model to make its predictions as informative as possible.

Joint-Embedding Architectures

In contrast, take a different approach to avoiding pixel-level prediction. Instead of reconstructing the observation, JEPA aims to predict the representation of the observation in a latent space. The core idea is to learn an encoder that creates informative representations by performing a prediction task entirely within that abstract space.

A typical JEPA setup involves three main components:

  1. An encoder network, EE, which maps an observation xx to a representation s=E(x)s = E(x).
  2. A predictor network, PP, which takes a representation sAs_A (from a context block) and a mask token, and outputs a predicted representation, s^B\hat{s}_B.
  3. A target encoder, EtargetE_{target}, which computes the actual representation of the target block, sB=Etarget(xB)s_B = E_{target}(x_B).

The predictor is trained to minimize the distance between its prediction s^B\hat{s}_B and the target representation sBs_B. The key is that the gradients only flow through the encoder EE and the predictor PP. The target encoder EtargetE_{target} is updated with an exponential moving average of the encoder's weights, providing a stable, slowly-evolving target.

L=P(E(xA),mask)Etarget(xB)22L = \| P(E(x_A), \text{mask}) - E_{target}(x_B) \|_2^2

This architecture inherently learns to filter out noise. If a detail in the observation is unpredictable (like the rustling of leaves in the wind), the encoder learns to ignore it because it provides no useful signal for predicting the representation of a future state. It focuses only on the predictable, core dynamics, creating a powerful information bottleneck.

Quiz Questions 1/6

What is the primary reason that effective world models like RSSM and JEPA avoid predicting raw pixels?

Quiz Questions 2/6

The Recurrent State-Space Model (RSSM) factorizes its latent state into which two key components?