Object-Centric and Relational Worlds

Michael BrenndoerferJune 17, 202652 min read

Part of World Models Handbook

Explains how object-centric and relational world models use slots, graphs, and message passing to predict object dynamics, track identity.

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Object-Centric and Relational Worlds

Consider a robot watching a kitchen table: a mug, a spoon, and a hand that picks up the spoon and stirs the mug. A conventional world model can compress each frame into one latent vector and learn a transition on those vectors. That can work well. In a typical stirring task, however, the hand and mug state are likely to matter more to the spoon's motion than countertop color. The useful causal structure is often local and compositional. An unconstrained flat latent can represent that structure, but it does not expose object correspondence, locality, or parameter sharing explicitly. Generalization to changed object counts, rearrangements, or exchanges is therefore possible, not guaranteed by the representation.

Object-centric and relational world models take the opposite bet: they represent the scene as a set of objects, each with its own state, connected by relations, and they factor the dynamics across those objects and relations. Instead of learning "what happens to the whole scene," they learn "what one object does to another." This chapter develops that bet in detail: how to discover objects without supervision, how to represent and reason about relations with graphs and message passing, how to keep object identity stable over time, and how interaction networks turn this structure into fast, generalizing dynamics models.

Throughout, keep the distinction from What Is a World Model? in mind: we separate what the model predicts (next object states, next relations, next masks) from how an agent uses those predictions (state estimation per object, planning actions that touch specific objects, imagining interventions). This separation matters more, not less, once structure enters the picture. A slot-based model can produce faithful-looking reconstructions while its slots fail to track objects through contact, which is a failure of the predictions the agent needs. Conversely, a model with mediocre reconstruction but accurate per-object dynamics can be excellent for control. We therefore keep four notions of model quality distinct as the chapter proceeds: predictive fidelity (does the rollout match reality), representation quality (do the slots correspond to objects the way we intend), uncertainty quality (does the model know where its predictions are unreliable), and decision usefulness (can an agent plan better with this model than with a flat one). Object structure is only worth its complexity if it improves prediction or decision-making; we will be precise about which.

Why Objects? From Flat Latents to Structured Scenes

In Sufficient State and State Abstraction we argued that a good state keeps everything decision-relevant and discards the rest. In Latent-Variable Representations we saw how autoencoders and variational methods can learn such states without direct state labels. But there is a third axis of representational choice: structure. A state can be sufficient and still use a flat, unstructured vector. Object-centric representations instead expose an explicit factorization: a set of entities, each with attributes, linked by relations. The distinction is not vector versus non-vector, since sets and graphs are stored in tensors too. It is the distinction between unstructured coordinates and an explicit object-and-relation interface.

The contrast is easiest to see with a scene of three balls. A distributed flat code need not assign fixed coordinates to each ball, and supervision or a suitable architecture can still make it systematic. Without an explicit object or set bias, however, consistent entity factorization is not guaranteed: the encoder and transition may have to learn correspondence, symmetry, and dynamics jointly. A structured representation supplies exchangeable containers and shared relational computations up front. It narrows the hypothesis class; it does not prevent distributed slot contents or eliminate permutation ambiguity.

What Counts as an Object

The word "object" is doing a lot of work here, so let us pin it down.

Object

For our purposes, an object is a coherent bundle of appearance and state that persists and moves approximately as a unit, can be counted, and can be re-identified over time. The definition is functional rather than metaphysical: a good object is one whose boundaries make the world's dynamics simpler to predict.

That last clause matters. Objects are not just visual segments. A pair of scissors is one object or two depending on whether you care about its hinge. A cloud can be an object for a weather model and not for a manipulation model. For many prediction and control tasks, a useful abstraction suppresses internal degrees of freedom irrelevant to the current question. Once you know where a rigid mug is and how it is moving, molecular coordinates are unnecessary for predicting its short-term pose. Object-centric representations are a conditional bet that such a factorization matches the environment and task; when it does not, the bias can hurt.

Notice how this definition depends on the task, and therefore on the agent. The decomposition of the world into objects is not written into the pixels; it is a hypothesis about which partition of the scene yields the simplest dynamics for the questions being asked. A billiards model wants balls. A cloth-folding model wants regions of fabric with internal state. A traffic model wants vehicles and maybe platoons. This task-relativity is not a defect of the definition but a feature: it tells us that object discovery should ideally be evaluated by the dynamics and decisions it enables, not by how well the discovered segments match human segmentations. We return to that evaluation question at the end of the chapter.

The cognitive science literature calls the underlying puzzle the binding problem: perception must group features that belong to the same thing and maintain those groupings over motion, deformation, and occlusion. Images contain useful boundary and motion cues, but not explicit persistent identities or a unique correct partition. Spelke's core-knowledge studies and Baillargeon's looking-time experiments tested infants of particular ages with controlled possible and impossible events. Those results are commonly interpreted as evidence for early expectations of persistence, solidity, and continuity; they do not by themselves establish the mechanism or a mature object concept. Object-centric models borrow the design lesson cautiously: a matched inductive bias can improve learning, while a mismatched one reduces flexibility.

What Structure Buys You

Before the machinery, it is worth being explicit about what the structured bet purchases:

  • Sample efficiency. A factored dynamics model shares parameters across objects that use the same dynamics family and feature semantics. A learned rule for one ball can then be reused for another. A generic flat transition can learn the same locality, but it does not receive locality or object-wise sharing as an architectural guarantee.
  • Compositional generalization. A pairwise model can be applied to compatible graphs with more objects or new arrangements. By contrast, a fixed-width joint-state model without padding, masks, or equivariant modules needs an interface change for a different object count. This is a claim about that restricted interface, not an impossibility result for every vector representation.
  • Interpretability and interventions. "If you push the red block" maps directly to one node and its edges. A flat latent can support the same query through a learned probe or readout, but it does not provide an explicit object handle without that additional interface.
  • Grounded actions and diagnosis. When perception preserves identity and the planner accepts object-indexed actions, structured states can support commands such as "grasp the cup" and can localize a rollout error to one object. These are design motivations whose benefit depends on the task, action parameterization, and reliability of the representation.

The cost is real, too. Object-centric models force hard commitments: how many objects, what counts as one, what the per-object state should contain. Each commitment is a place where the inductive bias can be wrong. A mismatch can propagate errors through the model, although whether it is worse than an unstructured alternative depends on data, optimization, and the task. The rest of this chapter is about making those commitments well, and about what breaks when they are wrong.

Object Discovery and Slot Representations

The first problem is discovery. Without segmentation supervision, the model must learn a useful scene decomposition. Reconstruction alone does not require human-aligned objects: parts, textures, and background regions can also minimize the loss. A widely studied family uses slot representations: the scene is represented by a fixed set of KK exchangeable latent vectors, with architectural competition intended to encourage different slots to specialize.

Slot

A slot is an exchangeable latent container. In Slot Attention and mixture decoders, slots compete to explain parts of the observation, which discourages redundancy but does not guarantee one object per slot. The set is unordered: a symmetry-preserving model should not depend on which slot index receives which object.

Competition is one mechanism for making slots specialize; it is not a definition of every slot model. Without competition, redundancy is possible, although other priors, routing rules, or objectives can also break symmetry. The next two subsections show how soft masks and attention normalization create competition for explanatory weight over pixels or tokens.

Reconstruction with Competitive Masks

Several early unsupervised object-discovery methods use component-wise scene decomposition with exclusive or competitive masks: MONet (Burgess and colleagues, 2019), IODINE (Greff and colleagues, 2019), GENESIS (Engelcke and colleagues, 2020), and GENESIS-V2 (Engelcke and colleagues, 2021). Their inference mechanisms differ: MONet uses recurrent attention, IODINE iteratively refines variational posterior parameters, GENESIS uses an autoregressive scene prior, and GENESIS-V2 uses embedding clustering with stochastic stick breaking. In the following common mixture view, slot kk decodes to a mask logit mk(u)m_k(u) and appearance prediction ak(u)a_k(u):

x^(u)=∑k=1Kγk(u) ak(u),γk(u)=exp⁡mk(u)∑k′exp⁡mk′(u),\hat{x}(u) = \sum_{k=1}^{K} \gamma_k(u)\, a_k(u), \qquad \gamma_k(u) = \frac{\exp m_k(u)}{\sum_{k'} \exp m_{k'}(u)},

where:

  • x^(u)\hat{x}(u): the reconstructed color at pixel location uu
  • ak(u)a_k(u): slot kk's appearance prediction at pixel uu
  • mk(u)m_k(u): slot kk's mask logit at pixel uu
  • γk(u)\gamma_k(u): the normalized mask weight at pixel uu, a softmax over slots that says what fraction of pixel uu slot kk explains
  • k′k': an index running over all KK slots

The softmax gives each pixel one unit of mixture weight divided fractionally among components. This creates competition and can encourage near-exclusive masks, but it does not force a one-hot or semantically correct object assignment. Decoding a mask from one latent supplies a spatial-coherence bias rather than enforcing connected contours. IODINE performs iterative amortized variational inference using likelihood, gradients, masks, and other refinement inputs; it is inspired by iterative refinement rather than a literal alternating mask/appearance algorithm. On simple multi-object datasets, these models can learn object-aligned components without segmentation labels, while split, merged, texture-based, and background components remain possible.

Slot Attention

Slot Attention (Locatello and colleagues, 2020) is an influential object-centric encoder. It resembles transformer attention, but combines competition across slots with a second normalization that forms a weighted mean for each slot.

We have a set of input feature vectors x1,…,xNx_1, \dots, x_N (for an image, one per spatial location, typically from a CNN) and KK slots s1,…,sKs_1, \dots, s_K. Compute dot-product affinities between slots and inputs:

dkn=(skWq)(xnWk)⊤d,d_{kn} = \frac{(s_k W_q)(x_n W_k)^\top}{\sqrt{d}},

where:

  • sks_k: the current vector of slot kk
  • xnx_n: the nn-th input feature vector
  • WqW_q, WkW_k: learned projection matrices applied to the slots (queries) and the inputs (keys)
  • dd: the projected dimension; when query and key coordinates have roughly fixed, weakly correlated variance, dividing by d\sqrt{d} stabilizes the typical dot-product scale
  • dknd_{kn}: the raw affinity between slot kk and input nn

The first normalization is the competitive one: normalize each input's affinities over slots. A second normalization over inputs will form each slot's weighted mean below.

akn=exp⁡dkn∑k′exp⁡dk′n,a_{kn} = \frac{\exp d_{kn}}{\sum_{k'} \exp d_{k' n}},

where:

  • akna_{kn}: the weight that input nn assigns to slot kk
  • k′k': an index running over all KK slots, so the weights on slots sum to one for each input

In standard attention, each query usually normalizes over keys. Here, each input distributes one unit of weight across slots. Comparable affinities split that weight; with two equal logits, the split is exactly one half each. This soft allocation creates competition and encourages a partition, but does not force a discrete or object-correct assignment.

The competition is easiest to see in a toy matrix of affinities.

In[2]:
Code
import numpy as np

n_inputs = 24
positions = np.linspace(0.0, 1.0, n_inputs)
d = np.zeros((2, n_inputs))
d[0] = -((positions - 0.30) ** 2) / 0.01  # slot 0 prefers the left cluster
d[1] = -((positions - 0.70) ** 2) / 0.01  # slot 1 prefers the right cluster

exp_d = np.exp(d)
attn = exp_d / exp_d.sum(axis=0, keepdims=True)  # softmax over slots
Out[3]:
Visualization
Heatmap of attention weights split between two slots across inputs.
Slot attention weights after normalizing over slots for each input. Inputs near the left cluster give most of their unit budget to slot 0, inputs near the right cluster to slot 1, and boundary inputs split their weight.

Each column sums to one, so increasing one slot's share reduces the others' shares. The middle columns show the greatest ambiguity between the two slots.

Canonical Slot Attention next renormalizes each slot's competitive weights across inputs to form a weighted mean, then updates the slot. With a small ϵ>0\epsilon>0 for stability,

wkn=akn+ϵ∑m(akm+ϵ)(normalize one slot’s weights over inputs)uk=∑nwkn (xnWv)(weighted mean of values)sk←GRU(sk,uk)(fold in the new evidence)sk←sk+MLP(LayerNorm(sk))(residual refinement)\begin{aligned} w_{kn} &= \frac{a_{kn}+\epsilon}{\sum_m (a_{km}+\epsilon)} && \text{(normalize one slot's weights over inputs)} \\ u_k &= \sum_{n} w_{kn}\,(x_n W_v) && \text{(weighted mean of values)} \\ s_k &\leftarrow \text{GRU}(s_k, u_k) && \text{(fold in the new evidence)} \\ s_k &\leftarrow s_k + \text{MLP}(\text{LayerNorm}(s_k)) && \text{(residual refinement)} \end{aligned}

where:

  • akna_{kn}: the competitive weight that input nn assigns to slot kk
  • wknw_{kn}: slot kk's weights renormalized across inputs, which sum to one over nn
  • WvW_v: a learned value projection applied to the inputs
  • uku_k: the weighted-mean value update for slot kk
  • GRU: a gated recurrent unit that blends the new evidence uku_k into the slot's previous content
  • MLP and LayerNorm: a small multilayer perceptron applied after layer normalization, added as a residual update

The GRU in the middle of this update is easy to overlook but does real work: because the update is applied iteratively, the slot needs a way to keep what it has already learned about its object while incorporating new evidence, rather than overwriting itself at every pass. The GRU's gating provides exactly that selective memory within the iteration loop.

The canonical setup samples initial slots from learned Gaussians and uses three refinement iterations, although the count is a tunable hyperparameter. The process resembles soft clustering: attention weights act like assignments and slots like iteratively updated representatives. After the configured iterations, many variants decode each slot independently with a spatial-broadcast decoder and combine masks with a softmax mixture. Independent decoding is a strong component-separation bias, not a requirement; SLATE instead uses a joint transformer decoder conditioned on all slots.

Two properties make slot attention attractive for world modeling:

  • Permutation symmetry. When initialization and downstream processing preserve the symmetry, permuting initial slots permutes the outputs. No discovery-time index is privileged, which discourages fixed conventions such as "slot three is always leftmost" but does not prevent swaps or every index-based degeneracy.
  • Variable input sets, fixed object capacity. Attention can process a variable number of input features, but a fixed KK is a direct ceiling on simultaneously represented objects. Slot width, iteration count, positional encodings, and encoder resolution are additional capacity and resolution choices.
What a slot does not give you

Slot Attention provides a mechanism for learning spatial binding: which pixels go together. It does not, by itself, guarantee temporal binding or relational inference. Those are separate problems addressed later in the chapter.

Object-Centric Learning from Video

For world modeling we need object structure in time, not just per frame. A per-frame encoder returns an unordered set, so correspondence across frames is unresolved. SAVi, or conditional Slot Attention (Kipf and colleagues, 2022), propagates a fixed set of prior slots through a predictor and corrects them with the current frame. This learned temporal conditioning replaces an explicit matching stage and encourages continuity, but it does not guarantee a stable track ID or solve births and deaths. SAVi used optical flow as a training target, treating coherent motion as a useful grouping cue rather than a definition of objecthood. SAVi++ (Elsayed and colleagues, 2022) replaces flow supervision with depth prediction and evaluates synthetic depth and sparse-LiDAR supervision.

SLATE (Singh, Deng, and Ahn, 2022) uses a dVAE to discretize image patches, maps the token embeddings into continuous slots with Slot Attention, and autoregressively reconstructs the token grid with a transformer conditioned jointly on all slots. The discrete vocabulary belongs to image patches, not to the slots, and SLATE itself is an image model rather than a temporal world model. SlotFormer (Wu and colleagues, 2023) supplies the separate temporal step by predicting sequences of continuous slots and evaluating them for video prediction and model-based control.

Reconstruction quality alone is an incomplete proxy for object-centric segmentation or downstream usefulness. A model can reconstruct well while splitting one object or merging touching objects, because the pixel mixture can be correct even when the decomposition is not the one the task needs. Evaluation can therefore add adjusted Rand index (ARI) against ground-truth masks, foreground ARI (FG-ARI), and downstream tests of dynamics prediction or control. Each metric answers a different question.

Relations, Graphs, and Message Passing

Once the scene is a set of objects, the natural language for how they influence each other is a graph. Objects are nodes; relations, known or learned, are edges. Graph representations give us a principled way to write dynamics that depend on which objects interact, not just on the global scene. The move from sets to graphs is the move from "there are things" to "these things affect each other in these ways," and it is the second half of the structured bet.

Graphs as a Representation

Formally, a graph-structured scene is a tuple (V,E,u)(\mathcal{V}, \mathcal{E}, u): nodes V\mathcal{V} with per-object states hih_i (position, velocity, pose, appearance summary), edges E\mathcal{E} with per-relation attributes eije_{ij} (distance, contact type, spring rest length, relative velocity), and optionally a global attribute uu describing scene-level context (gravity, table friction). The three levels of the tuple are worth keeping separate in your head, because different physical regularities live at different levels: forces between objects live on edges, intrinsic object behavior and damping live on nodes, and uniform fields and shared environment properties live in the global attribute. Battaglia and colleagues (2018) made the influential argument that this "graph network" block generalizes a large family of models, from interaction networks to transformers, and that the choice of graph is a statement of relational inductive bias: an assumption about which interactions can matter.

The bias is a commitment. A fully connected graph assumes any object may affect any other; a sparse spatial graph assumes locality. Getting this wrong can waste computation or omit relevant interactions. With nn objects, a complete graph has O(n2)O(n^2) edge activations, so memory and compute grow quadratically even though a shared edge function keeps parameter count fixed. Sparse graphs are useful when their construction covers the interaction support.

The quadratic cost of the dense choice is easy to state and easy to see.

In[4]:
Code
import numpy as np

n_values = np.arange(4, 41)
k_nn = 2
full_edges = n_values * (n_values - 1) / 2
k_regular_edges = n_values * k_nn / 2
Out[5]:
Visualization
Line chart of edge counts rising much faster for fully connected graphs.
Number of undirected edges versus number of objects for a fully connected graph and an ideal undirected 2-regular graph. The dense topology grows quadratically while the ideal sparse topology grows linearly.

At forty objects the dense graph carries nearly twenty times the edges of this ideal 2-regular graph. This analytic line is not the exact count of the union-symmetrized kk-nearest-neighbor builder used later: that data-dependent construction can contain between nk/2nk/2 and nknk undirected edges depending on reciprocal choices.

For systems whose direct interactions are local in space, a kk-nearest-neighbor or radius graph can be a cheap approximation when its edges cover the true interaction support. The risk is explicit: kk-nearest neighbors can omit contacts in dense regions or add irrelevant neighbors in sparse ones, while fixed-radius graphs omit long-range effects and cannot express mediated influence in one hop.

The Message-Passing Update

Many graph-based dynamics models use a variant of one update, applied one or more times. The recipe has three stages: compute a message per edge, aggregate messages per node, and update each node's state. For every edge from sender jj to receiver ii, an edge function computes a message:

mji=ϕe(hj,  hi,  eji).m_{ji} = \phi_e\big(h_j,\; h_i,\; e_{ji}\big).

Each node aggregates its incoming messages with a permutation-invariant reduction □\square (sum, mean, max, or set attention with shared order-independent scoring):

mˉi=□j∈N(i) mji,\bar{m}_i = \square_{j \in \mathcal{N}(i)}\, m_{ji},

and a node function produces the next node state:

hi′=ϕv(hi,  mˉi),h_i' = \phi_v\big(h_i,\; \bar{m}_i\big),

where:

  • hjh_j, hih_i: the current states of sender node jj and receiver node ii
  • ejie_{ji}: the attributes of the edge from sender jj to receiver ii
  • ϕe\phi_e: the learned edge function, shared across all edges
  • mjim_{ji}: the message computed on the edge from sender jj to receiver ii
  • N(i)\mathcal{N}(i): the set of nodes with an edge into node ii, the in-neighborhood of ii
  • □\square: a permutation-invariant reduction, including sum, mean, max, or order-independent set attention
  • mˉi\bar{m}_i: node ii's aggregated incoming message
  • ϕv\phi_v: the learned node function, shared across all nodes
  • hi′h_i': the next state of node ii, one message-passing round later

A global update ϕu\phi_u over aggregated node and edge summaries can weave in scene-level context. Three properties of this recipe carry the real weight:

  • Permutation invariance of aggregation. Sum, mean, and max do not depend on neighbor order, so the same parameters can be applied to variable-size compatible graphs. Sum preserves the vector total: six equal, co-directed forces yield six times one force, while general force vectors can differ or cancel. Mean instead normalizes by degree.
  • Parameter sharing across edges and nodes. One edge function is applied everywhere. A learned rule can transfer across pairs when relation types, feature semantics, and physical regimes match.
  • Composition. After LL synchronous local rounds, information can travel up to LL hops. Dependence across a path requires at least its graph distance in rounds unless a global solver or nonlocal edge supplies a shortcut.

Transformer self-attention can also be viewed as message passing on a complete graph with attention-weighted aggregation. Key differences include initialization, normalization, iterative recurrent slot updates, exchangeability, and the decoder and training objective. Slot Attention allocates each input's unit weight across slots, creating competition that encourages a partition; standard attention normally lets each query normalize independently over keys. We develop the transformer side in Transformers and Neural State-Space Architectures.

Finally, a symmetry note. Absolute position can often be replaced by relative position Δx=xj−xi\Delta x=x_j-x_i and relative velocity Δv=vj−vi\Delta v=v_j-v_i, while retaining necessary invariant attributes such as mass, type, and spring rest length. When all inputs and operations respect translation symmetry and there are no position-dependent fields or boundaries, this makes translation invariance automatic. Rotation-equivariant architectures such as the equivariant graph networks of Satorras and colleagues (2021) further restrict the hypothesis class and can improve sample efficiency when that symmetry is valid on the evaluated task.

Interaction Networks and Compositional Dynamics

Graph machinery becomes a world model when it predicts next object states and rolls them forward. Filtering, planning, and error attribution can use that structured state after their interfaces are adapted to sets, graphs, and uncertain correspondence. The Interaction Network (Battaglia and colleagues, 2016) is an influential template used by many later relational models.

The Interaction Network Recipe

Given per-object states xix_i (say, position and velocity) and relations rjir_{ji}, an interaction network computes:

  1. An effect per relation:   εji=ϕe(xj,xi,rji)\;\varepsilon_{ji} = \phi_e(x_j, x_i, r_{ji}), a learned summary of how jj pushes on ii.
  2. An aggregated effect per object:   mˉi=∑j∈N(i)εji\;\bar{m}_i = \sum_{j \in \mathcal{N}(i)} \varepsilon_{ji}.
  3. A dynamics output per object:   Δi=ϕv(xi,mˉi)\;\Delta_i = \phi_v(x_i, \bar{m}_i), interpreted as the object's acceleration or state derivative.

For the pairwise spring and n-body systems considered here, this mirrors an important physical decomposition: pair effects add vectorially before a node update. The architecture supplies that relational computation template while the MLPs still learn the message and update functions. Numerical integration then updates velocities and positions. When connectivity is state-dependent, as in radius or kk-nearest-neighbor graphs, recomputing edges lets topology change with the state; fixed string or mesh relations need not be rebuilt. Battaglia and colleagues (2016) evaluated n-body systems, rigid-body collisions, and non-rigid strings, including domain-specific tests at object counts different from training. Those results demonstrate qualitative count generalization within the same physical domain, not a universal two-or-three-to-ten result.

The Visual Interaction Network (Watters et al., 2017) closed the perception loop: a visual encoder mapped short frame windows to per-object latent state codes, an interaction-network dynamics predictor rolled those codes forward, and a linear state decoder output per-object position and velocity. This is structurally object-centric: encode visual observations into object states, predict in structured latent space, and decode task-relevant states. Here the latent space is a set of objects with relations rather than one vector, and the transition is factored across that set.

Discovering the Relations

The recipes above assume the edge structure is given. Neural Relational Inference (Kipf and colleagues, 2018) instead infers discrete latent interaction types variationally from trajectories. In the charged-particle experiment, the relevant types distinguish attraction from repulsion; separate experiments include non-interacting edges. The encoder amortizes inference for new trajectories, and training uses a differentiable relaxation or surrogate for the discrete choices. A diffuse posterior can indicate ambiguity under a calibrated, adequate model, but it can also reflect misspecification, optimization failure, label symmetry, or poor calibration. A planner should treat it as epistemic evidence only after those conditions are checked.

A common alternative in named simulators is to define edges geometrically: connect kk nearest neighbors or all objects within radius rr. For state-dependent graphs the edges are recomputed, and the network learns per-edge effects. This embeds locality and avoids latent-edge inference, but interactions omitted by the rule are invisible in that message-passing step.

Scaling Learned Simulation

Later work scaled the template to larger particle and mesh simulations. Graph Network Simulator (Sanchez-Gonzalez and colleagues, 2020) predicts per-particle accelerations for fluids and granular or deformable materials using fixed-radius connectivity. MeshGraphNets (Pfaff and colleagues, 2021) applies message passing to deformable surfaces and aerodynamics on computational meshes. These papers demonstrate learned simulation on their reported benchmarks; they do not establish general solver parity at a measured fraction of engineering cost.

  • Noisy one-step training. GNS trains a one-step acceleration predictor and adds random-walk noise to input trajectories to expose the model to perturbed states resembling rollout errors. It does not train on short self-generated rollouts in the cited method.
  • Encode-process-decode. GNS and MeshGraphNets encode node and edge features, apply several message-passing rounds, and decode dynamics outputs. A useful design heuristic is to ensure the processor receives the information required for relational reasoning; encoder width alone does not determine whether the graph carries relational information.

Object-Centric World Models for Control

Contrastive Learning of Structured World Models (C-SWM, Kipf and colleagues, 2019) learned object-factored latent states with graph-structured transitions and demonstrated planning in its reported abstract environments. SlotFormer (Wu and colleagues, 2023) learned transformer dynamics over slots and evaluated video prediction and model-based control. In such systems, stable slots plus an object-indexed planner can enable object-specific action selection and error analysis. A flat latent can support those queries through an additional learned interface, but it does not expose object handles directly.

Identity, Permanence, and Tracking

Discovery gives you objects now. A world model needs objects over time: the mug you plan to grab next is the mug you saw two seconds ago, even though it passed behind the kettle. This section covers the three intertwined problems of temporal binding. They are worth separating because they fail in different ways and are solved by different machinery: permanence is about memory and prediction through gaps in observation, tracking is about assigning identities across frames, and the sufficiency of the tracked state determines whether any of it is useful for decisions.

Object Permanence

Object permanence is continued existence while an object is unobserved; an expectation of a continuous hidden trajectory is an additional assumption. In controlled violation-of-expectation studies, infants are shown matched possible and impossible events, and longer looking at the impossible event is commonly interpreted as evidence of an expectation under the experiment's controls. IntPhys (Riochet and colleagues, 2018) and ADEPT (Smith and colleagues, 2019) adapt surprise-based physical probes to models. CLEVRER (Yi and colleagues, 2020) is different: it evaluates descriptive, explanatory, predictive, and counterfactual question answering over collision videos. Matched occlusion probes are designed to reduce surface shortcuts and test whether surprise depends on representing a hidden object; forgetting alone does not logically imply zero surprise under every classifier or statistical model.

Permanence requires memory and prediction without direct observations of the object. A transition prior can advance hidden state while indirect evidence from occluder boundaries, contacts, camera motion, or other objects still corrects it. Transition error can make a reappearing observation harder to associate, especially when appearance cues are weak, but it need not force failure. Flat and slotted latents can both preserve hidden-object beliefs. Slots make a per-object trajectory easier to inspect; they do not certify permanence. Training on documented synthetic occlusions or explicit object-permanence objectives can provide relevant gradients; the unsupported generic "slot dropout reconstructs masked slots" recipe is not assumed here.

Tracking as Temporal Binding

Tracking is the problem of assigning object identities across frames. In tracking-by-detection, filtering and data association are two central subproblems, alongside detection, gating, and track management:

  • Per-object filtering. A tracker maintains a state estimate or belief for each track and predicts it forward before correction. A Kalman tracker carries a Gaussian estimate; other trackers need not represent a full posterior.
  • Data association. Given predicted and detected states, the Hungarian algorithm finds a minimum-cost one-to-one assignment for the supplied cost matrix. Dummy assignments permit unmatched tracks or detections; lifecycle rules then interpret them as misses, candidate births, or deaths.

SORT (Bewley and colleagues, 2016) combines a constant-velocity Kalman model with Hungarian association over detections. DeepSORT (Wojke and colleagues, 2017) adds an appearance metric to help association when geometry is ambiguous. Their explicit assignments are inspectable, although overlap, missed detections, and long disappearances can still cause swaps or failed re-identification.

Slot-based video models instead encourage continuity by recurrent conditioning. In SAVi, prior slots are predicted forward and corrected using the current frame, removing a separately exposed matching decision but not guaranteeing identity. A swap may be silent unless the system adds identity-consistency diagnostics. Explicit association is easier to inspect; recurrent conditioning is end-to-end. Either design should be validated under the task's occlusion, contact, and re-entry conditions rather than chosen by a binary rule.

What the State Must Carry

It is worth connecting this to sufficient state. The necessary contents depend on the task: velocity when motion prediction needs it, grasp-relevant geometry for manipulation, and appearance when re-identification is required. A slot is only as useful as the sufficiency of what it encodes. A slot that binds an object cleanly but lacks pose may support video prediction while failing a grasp planner. One design is to keep the slot free-form while supervising or probing particular variables. In the code section, the synthetic world gives us ground-truth positions and velocities directly.

Worked Example: A Spring Lattice, Message by Message

Let's make message passing concrete with the smallest possible physical system: two unit masses connected by one spring with stiffness k=6k = 6 and rest length L0=1L_0 = 1, moving along a line with damping c=0.6c = 0.6. Small enough to do by hand, rich enough to exercise every stage of the recipe: an edge function, an aggregation, a node update, and an integration step. At some instant, with xix_i the position of mass ii and viv_i its velocity:

x1=0,x2=1.2,v1=v2=0.3.x_1 = 0, \quad x_2 = 1.2, \quad v_1 = v_2 = 0.3.

The worked physical system has one undirected relation. We will display its equal-and-opposite forces as two directed effects. That representation allows both effects to be carried, but a generic learned directed-edge MLP does not enforce Newton's third law unless antisymmetry is built into the parameterization or one pair force is applied with opposite signs.

Edge messages. The signed scalar spring law is k(r−L0)k(r-L_0); its magnitude is k∣r−L0∣k|r-L_0|, with direction supplied separately. Here r=1.2r=1.2, so the stretch is 0.20.2 and the magnitude is 1.21.2. The physical force on mass 1 points toward mass 2, so ε2→1=+1.2\varepsilon_{2\to1}=+1.2, while the paired force is ε1→2=−1.2\varepsilon_{1\to2}=-1.2. A learned edge function can use relative position and rest length to approximate this vector law without absolute positions. Exact action-reaction symmetry still requires an antisymmetric construction; otherwise data-sparse regimes are one risk among several sources of approximation error.

Aggregation. Each mass has exactly one neighbor, so mˉ1=1.2\bar{m}_1=1.2 and mˉ2=−1.2\bar{m}_2=-1.2. In a larger lattice, aggregation forms the vector sum of attached spring forces. For two equal, co-directed contributions, averaging would return half of the correct sum; in general, directions and magnitudes differ and may cancel.

Node update. The node function combines the aggregated force with damping: ai=mˉi−c via_i = \bar{m}_i - c\,v_i, where aia_i is the acceleration of mass ii (with unit masses, net force and acceleration are numerically equal). With v=0.3v = 0.3 for both masses:

a1=mˉ1−c v1=1.2−0.6×0.3=1.2−0.18=1.02,a2=mˉ2−c v2=−1.2−0.6×0.3=−1.2−0.18=−1.38.\begin{aligned} a_1 &= \bar{m}_1 - c\,v_1 = 1.2 - 0.6 \times 0.3 = 1.2 - 0.18 = 1.02, \\ a_2 &= \bar{m}_2 - c\,v_2 = -1.2 - 0.6 \times 0.3 = -1.2 - 0.18 = -1.38. \end{aligned}

One semi-implicit Euler step with Δt=0.02\Delta t = 0.02, updating velocity first with vi′=vi+Δt aiv_i' = v_i + \Delta t\, a_i and then position with xi′=xi+Δt vi′x_i' = x_i + \Delta t\, v_i', gives v1′=0.3+0.02×1.02=0.3204v_1' = 0.3 + 0.02 \times 1.02 = 0.3204 and v2′=0.3+0.02×(−1.38)=0.2724v_2' = 0.3 + 0.02 \times (-1.38) = 0.2724. The separation becomes

x2′−x1′=(1.2+0.02×0.2724)−(0.02×0.3204)(semi-implicit Euler updates, with x1=0)=1.205448−0.006408(evaluate the two new positions)=1.19904≈1.199,\begin{aligned} x_2' - x_1' &= (1.2 + 0.02 \times 0.2724) - (0.02 \times 0.3204) && \text{(semi-implicit Euler updates, with } x_1 = 0 \text{)} \\ &= 1.205448 - 0.006408 && \text{(evaluate the two new positions)} \\ &= 1.19904 \approx 1.199, \end{aligned}

which is down from 1.21.2: the stretched spring is pulling the masses together, with damping bleeding energy.

The edge function in this example is a straight line in the separation, which makes its job easy to picture.

In[6]:
Code
import numpy as np

K_SPRING = 6.0
L0 = 1.0
separations = np.linspace(0.4, 1.8, 200)
forces = K_SPRING * (separations - L0)
r_now = 1.2
f_now = K_SPRING * (r_now - L0)
Out[7]:
Visualization
Line of spring force versus separation with a marked operating point.
Signed scalar spring force k(r-L0) versus separation for stiffness 6 and rest length 1. The dot marks separation 1.2, where the scalar is 1.2; negative values denote compression.

This curve is one one-dimensional, fixed-parameter slice of the learned relation. The two-dimensional model below receives relative position, relative velocity, and rest length and must learn a direction-dependent vector message across that larger input space.

For a fixed-size joint state (x1,x2,v1,v2)(x_1,x_2,v_1,v_2), a generic MLP can learn relative differences and symmetry, but does not obtain them by construction. A different object count changes a fixed-width interface unless the design adds padding, masks, sharing, or set-equivariant modules. Message passing supplies shared local computation and permutation-compatible aggregation directly. The following code tests that inductive bias against an edge-free per-object baseline.

Code Implementation

We will build a small interacting-particle world, train an interaction network to predict its dynamics, measure how rollout error compounds, and test the central claim of the chapter: that a relational model trained on four-object scenes generalizes to larger graphs where a flat per-object model does not. We close with a minimal data-association tracker to make identity concrete. Throughout, our "slots" are the true object states, positions and velocities, so that questions about representation quality do not contaminate the questions about dynamics and identity we intend to isolate.

A Synthetic Interacting-Particle World

The world is a set of point masses in the plane connected by springs. Dynamics are semi-implicit Euler: accelerations come from spring forces along active edges plus global damping.

In[8]:
Code
import numpy as np

rng = np.random.default_rng(11)

DT = 0.02  # integration step
SPRING_K = 6.0  # spring stiffness
DAMPING = 0.6  # global velocity damping


def spring_accel(pos, vel, senders, receivers, rest):
    """Acceleration from spring forces along directed edges plus damping."""
    acc = np.zeros_like(pos)
    diff = pos[senders] - pos[receivers]  # (E, 2)
    r = np.linalg.norm(diff, axis=1, keepdims=True) + 1e-9
    f = SPRING_K * (r - rest[:, None]) * diff / r  # force on receiver
    np.add.at(acc, receivers, f)
    acc -= DAMPING * vel
    return acc


def simulate(pos0, vel0, senders, receivers, rest, steps):
    pos, vel = np.array(pos0, float), np.array(vel0, float)
    pos_traj, vel_traj = [pos.copy()], [vel.copy()]
    for _ in range(steps):
        acc = spring_accel(pos, vel, senders, receivers, rest)
        vel = vel + DT * acc
        pos = pos + DT * vel
        pos_traj.append(pos.copy())
        vel_traj.append(vel.copy())
    return np.stack(pos_traj), np.stack(vel_traj)

The directed-edge convention says that sender -> receiver carries the sender's effect on the receiver. The analytic simulator produces equal-and-opposite forces because its formula is odd under reversal. Duplicating edges lets a learned function represent both directions, but does not enforce antisymmetry. The tiny 1e-9 keeps the coincident-particle denominator nonzero.

Now the graph builders. Training scenes are jittered four-node squares; test scenes are random kk-nearest-neighbor graphs of various sizes, so evaluation involves both new geometries and new graph sizes. The mismatch between training and test topology is deliberate: it is the compositional generalization claim under test.

In[9]:
Code
def edge_rest_lengths(pos0, edges, jitter=0.15):
    base = np.array([np.linalg.norm(pos0[j] - pos0[i]) for i, j in edges])
    noisy = base * (1 + rng.normal(scale=jitter, size=base.shape))
    return np.clip(noisy, 0.2, None)


def make_square(jitter=0.05):
    base = np.array([[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0]])
    pos0 = base + rng.normal(scale=jitter, size=base.shape)
    edges = [(0, 1), (1, 2), (2, 3), (3, 0)]
    return pos0, edges, edge_rest_lengths(pos0, edges)


def make_random_graph(n, k=2):
    pos0 = rng.normal(size=(n, 2))
    edges = set()
    for i in range(n):
        d = np.linalg.norm(pos0 - pos0[i], axis=1)
        for j in np.argsort(d)[1 : k + 1]:
            edges.add((min(i, int(j)), max(i, int(j))))
    edges = sorted(edges)
    return pos0, edges, edge_rest_lengths(pos0, edges)


def directed_edges(edges, rest):
    senders = np.array(
        [i for i, j in edges] + [j for i, j in edges], dtype=np.int64
    )
    receivers = np.array(
        [j for i, j in edges] + [i for i, j in edges], dtype=np.int64
    )
    return senders, receivers, np.concatenate([rest, rest])

Rest lengths carry deliberate jitter. The true dynamics depend on current length minus rest length, so this edge attribute affects the prediction target. Even without the extra jitter, coordinate jitter would produce multiple rest lengths. The extra perturbation decorrelates rest length from initial geometry and makes ignoring the attribute costly; exact prediction across otherwise matched states requires that value to be available.

Generate the datasets: 256 training trajectories on squares and 16 held-out trajectories each for 4-, 6-, and 8-node random graphs, 40 steps each.

In[10]:
Code
STEPS = 40


def build_dataset(n_graphs, graph_fn, steps=STEPS, vel_scale=0.6):
    trajs, vels_all, meta = [], [], []
    for _ in range(n_graphs):
        pos0, edges, rest = graph_fn()
        senders, receivers, rest_dir = directed_edges(edges, rest)
        vel0 = rng.normal(scale=vel_scale, size=pos0.shape)
        traj, vels = simulate(pos0, vel0, senders, receivers, rest_dir, steps)
        trajs.append(traj)
        vels_all.append(vels)
        meta.append((senders, receivers, rest_dir))
    return trajs, vels_all, meta


train_data = build_dataset(256, make_square)
test_data = {
    n: build_dataset(16, lambda n=n: make_random_graph(n)) for n in (4, 6, 8)
}
n_train_transitions = 256 * STEPS
Out[11]:
Console
Training trajectories: 256  (nodes per graph: 4)
Training transitions:  10240
Test graph sizes:      [4, 6, 8]  (16 trajectories each)

Every training trajectory is a 4-node graph; every test set changes geometry and the 6- and 8-node sets also change object count. The random 4-node set tests topology and geometry transfer, while the evaluated 6- and 8-node sets additionally test count transfer. The architecture accepts other compatible sizes, but this experiment establishes results only for 4, 6, and 8 nodes.

The next figure is the mental picture to keep for the rest of the section: a graph where each edge runs a small edge function and each node aggregates what arrives. When we later say the model "generalizes to 8 nodes," the mechanism behind that sentence is visible here: nothing in the picture depends on there being four nodes.

Out[12]:
Visualization
Diagram of a four-node graph with gray edges and labeled message arrows arriving at a highlighted node.
Message passing on a four-node spring graph. Each directed edge computes a message from the two endpoint states and the relation attributes; a node then aggregates its incoming messages and updates its state.

An Interaction Network in PyTorch

The model follows the recipe exactly. The edge function consumes relative position, relative velocity, and rest length; aggregation is a sum via index_add_; the node function maps own velocity plus aggregated messages to a predicted acceleration. Note that all edge features are relative, so translation invariance is built in rather than learned: shift the whole scene by any vector and every edge input is unchanged, hence so is every prediction.

In[13]:
Code
import torch
import torch.nn as nn

torch.manual_seed(0)


class InteractionNet(nn.Module):
    def __init__(self, edge_in=5, node_in=2, hidden=64):
        super().__init__()
        self.edge_mlp = nn.Sequential(
            nn.Linear(edge_in, hidden),
            nn.SiLU(),
            nn.Linear(hidden, hidden),
            nn.SiLU(),
            nn.Linear(hidden, hidden),
        )
        self.node_mlp = nn.Sequential(
            nn.Linear(hidden + node_in, hidden),
            nn.SiLU(),
            nn.Linear(hidden, 2),
        )

    def forward(self, pos, vel, senders, receivers, rest):
        edge_in = torch.cat(
            [
                pos[receivers] - pos[senders],
                vel[receivers] - vel[senders],
                rest[:, None],
            ],
            dim=-1,
        )
        msgs = self.edge_mlp(edge_in)
        agg = torch.zeros(pos.shape[0], msgs.shape[1]).index_add_(
            0, receivers, msgs
        )
        return self.node_mlp(torch.cat([vel, agg], dim=-1))


class IndependentMLP(nn.Module):
    """Baseline: one shared MLP per node, no edges, no relations."""

    def __init__(self, hidden=64):
        super().__init__()
        self.net = nn.Sequential(
            nn.Linear(4, hidden),
            nn.SiLU(),
            nn.Linear(hidden, hidden),
            nn.SiLU(),
            nn.Linear(hidden, 2),
        )

    def forward(self, pos, vel, senders, receivers, rest):
        return self.net(torch.cat([pos, vel], dim=-1))

The comparison model is an independent per-object baseline, not a fixed-width flat scene model. It predicts from one node's absolute position and velocity and is itself applicable to any node count. Configuration-specific spring forces are not functions of those inputs alone. Under squared loss, the unrestricted Bayes predictor for this input is the conditional mean acceleration, with irreducible conditional variance from hidden relational context. The finite MLP's measured error can additionally include approximation and optimization error. Disjoint-graph concatenation supports variable node counts by offsetting indices; equal training size is not required.

In[14]:
Code
def transition_items(traj, vels, senders, receivers, rest_dir):
    items = []
    for t in range(len(traj) - 1):
        items.append(
            dict(
                pos=traj[t],
                vel=vels[t],
                acc=(vels[t + 1] - vels[t]) / DT,
                senders=senders,
                receivers=receivers,
                rest=rest_dir,
            )
        )
    return items


def batch_graphs(items):
    pos = torch.tensor(
        np.concatenate([it["pos"] for it in items]), dtype=torch.float32
    )
    vel = torch.tensor(
        np.concatenate([it["vel"] for it in items]), dtype=torch.float32
    )
    acc = torch.tensor(
        np.concatenate([it["acc"] for it in items]), dtype=torch.float32
    )
    rest = torch.tensor(
        np.concatenate([it["rest"] for it in items]), dtype=torch.float32
    )
    senders, receivers, offset = [], [], 0
    for it in items:
        senders.append(it["senders"] + offset)
        receivers.append(it["receivers"] + offset)
        offset += it["pos"].shape[0]
    senders = torch.tensor(np.concatenate(senders), dtype=torch.long)
    receivers = torch.tensor(np.concatenate(receivers), dtype=torch.long)
    return pos, vel, acc, senders, receivers, rest


def train_model(model, items, batch_indices, lr=3e-3):
    opt = torch.optim.Adam(model.parameters(), lr=lr)
    losses = []
    for idx in batch_indices:
        batch = batch_graphs([items[i] for i in idx])
        pred = model(*batch[:2], *batch[3:])
        loss = ((pred - batch[2]) ** 2).mean()
        opt.zero_grad()
        loss.backward()
        opt.step()
        losses.append(loss.item())
    return losses

Train both models on the square-graph transitions with the same precomputed minibatch sequence.

In[15]:
Code
train_items = []
for traj, vels, (senders, receivers, rest_dir) in zip(*train_data):
    train_items.extend(
        transition_items(traj, vels, senders, receivers, rest_dir)
    )

model_in = InteractionNet()
model_base = IndependentMLP()

TRAIN_STEPS = 500
BATCH_SIZE = 256
train_batch_indices = [
    rng.integers(0, len(train_items), size=BATCH_SIZE)
    for _ in range(TRAIN_STEPS)
]
losses_in = train_model(model_in, train_items, train_batch_indices)
losses_base = train_model(model_base, train_items, train_batch_indices)
Out[16]:
Console
Interaction network: final loss 0.04309
Independent MLP:     final loss 0.89749

In the seeded run below, the final acceleration loss is about 21 times lower for the interaction network. The representational advantage is architectural: an independent node lacks pair context. The measured finite-training gap still depends on capacity, optimization, minibatches, and training duration.

Training and Rollout Evaluation

Now the distinction that this book keeps returning to: one-step accuracy is cheap, closed-loop rollout is the real test. We roll each trained model out from the initial state of every test trajectory, feeding its own predictions back as inputs, and record position error per horizon.

In[17]:
Code
def rollout_model(model, traj, vels, senders, receivers, rest, steps):
    pos, vel = traj[0].copy(), vels[0].copy()
    out = [pos.copy()]
    t_s = torch.tensor(senders, dtype=torch.long)
    t_r = torch.tensor(receivers, dtype=torch.long)
    t_rest = torch.tensor(rest, dtype=torch.float32)
    for _ in range(steps):
        t_pos = torch.tensor(pos, dtype=torch.float32)
        t_vel = torch.tensor(vel, dtype=torch.float32)
        with torch.no_grad():
            acc = model(t_pos, t_vel, t_s, t_r, t_rest).numpy()
        vel = vel + DT * acc
        pos = pos + DT * vel
        out.append(pos.copy())
    return np.stack(out)


def rollout_errors(model, data, steps=STEPS):
    per_traj = []
    for traj, vels, (senders, receivers, rest_dir) in zip(*data):
        pred = rollout_model(
            model, traj, vels, senders, receivers, rest_dir, steps
        )
        per_traj.append(((pred - traj) ** 2).mean(axis=(1, 2)))
    return np.stack(per_traj).mean(axis=0)


errors_in = {n: rollout_errors(model_in, test_data[n]) for n in (4, 6, 8)}
errors_base = {n: rollout_errors(model_base, test_data[n]) for n in (4, 6, 8)}

example = test_data[6]
example_true = example[0][0]
example_pred = rollout_model(
    model_in, example[0][0], example[1][0], *example[2][0], STEPS
)
bar_h = 20
ratio = {n: errors_base[n][bar_h] / errors_in[n][bar_h] for n in (4, 6, 8)}
Out[18]:
Console
n=4: one-step MSE 8.41e-07, horizon-20 MSE 1.88e-02, baseline/interaction ratio at horizon 20: 3.5x
n=6: one-step MSE 3.15e-07, horizon-20 MSE 7.76e-03, baseline/interaction ratio at horizon 20: 7.8x
n=8: one-step MSE 2.12e-07, horizon-20 MSE 5.51e-03, baseline/interaction ratio at horizon 20: 10.6x

Two effects are visible. The interaction-network rollout error grows with horizon. Its horizon-20 errors at 4, 6, and 8 nodes remain in the same order of magnitude, while the independent-node baseline is worse at every evaluated size because it cannot recover configuration-specific pair forces. The baseline can still exploit own velocity and absolute position to learn a marginal predictor; without a component ablation, we do not attribute that partial fit specifically to damping. It is a reasonable current-state independent-node comparison, not a proof of the best possible trained per-object model.

Out[19]:
Visualization
Log-scale line chart of rollout error rising with horizon for three graph sizes.
Rollout position error versus horizon for the interaction network, averaged over held-out random graphs of each size. Error compounds with the horizon but stays in a similar regime across graph sizes, even though the model was trained only on 4-node squares.
Out[20]:
Visualization
Bar chart of error ratios above one for graph sizes four, six, and eight.
Independent per-object baseline error relative to the interaction network at horizon 20. The relational model wins at every graph size, including sizes never seen in training.

For this seeded experiment, error is small at short horizons and grows during closed-loop rollout. Here, structure changes the observed rate rather than eliminating drift. The horizon-20 baseline-to-interaction ratios remain above one at all evaluated sizes. Both implemented models are size-flexible: the independent-node baseline shares a node MLP but lacks pair inputs, while the interaction network additionally shares an edge function and aggregates relational context. A separate fixed-dimensional joint-scene MLP would require redesign or retraining for a new count, but that is not the baseline plotted here.

We can also look at the trajectories themselves on a held-out 6-node graph.

Out[21]:
Visualization
Line plot of six colored particle trajectories.
Ground-truth trajectories of a held-out 6-node graph over 40 steps in the damped spring simulator.
Line plot of six predicted trajectories with visible long-horizon differences from ground truth.
The interaction network's closed-loop rollout from the same initial state, trained only on 4-node squares. The prediction preserves broad motion trends but visibly diverges over the 40-step rollout.

The panels show both transfer and its limit. On this held-out 6-node graph, the rollout retains broad motion directions but several paths differ visibly in extent and curvature by 40 steps. The architecture provides separate places for relational messages and node updates, but this plot does not identify damping with one module or spring rhythm with the other. Shared size-independent functions are an architectural explanation for transfer across the evaluated counts, not proof that the learned modules recovered a unique physical decomposition.

Keeping Identity Through a Crossing

Finally, consider two noisy point tracks that cross while observation order is reshuffled each frame. We maintain a last-displacement constant-velocity prediction and solve a two-by-two Euclidean-cost assignment with the Hungarian algorithm. This is a SORT-like filtering-plus-assignment toy, not the SORT algorithm itself, which uses a Kalman state for detected boxes and an overlap-based association cost. Near the crossing, position-only current-frame association is highly uncertain under the stated equal-appearance noise model.

In[22]:
Code
from scipy.optimize import linear_sum_assignment

T_TRACK = 60
track_rng = np.random.default_rng(0)
start = np.array([[-0.8, -0.3], [0.8, -0.3]])
end = np.array([[0.8, 0.3], [-0.8, 0.3]])
true_tracks = (
    start[None]
    + (end - start)[None] * (np.arange(T_TRACK) / (T_TRACK - 1))[:, None, None]
)
obs = true_tracks + track_rng.normal(scale=0.04, size=true_tracks.shape)

## Shuffle observation order within each frame: no index privilege.
## true_id[t, o] records which particle generated the observation now at position o.
obs_shuffled = np.empty_like(obs)
true_id = np.zeros((T_TRACK, 2), dtype=int)
for t in range(T_TRACK):
    perm = track_rng.permutation(2)
    obs_shuffled[t] = obs[t][perm]
    true_id[t] = perm  # obs[t, i] was generated by particle i

track_pos = [obs_shuffled[0, 0].copy(), obs_shuffled[0, 1].copy()]
track_vel = [np.zeros(2), np.zeros(2)]
track_identity = [int(true_id[0, 0]), int(true_id[0, 1])]
track_hist = [[obs_shuffled[0, 0].copy()], [obs_shuffled[0, 1].copy()]]
switches = 0

for t in range(1, T_TRACK):
    preds = np.array([track_pos[k] + track_vel[k] for k in range(2)])
    cost = np.linalg.norm(obs_shuffled[t][:, None] - preds[None], axis=2)
    rows, cols = linear_sum_assignment(cost)  # rows: obs idx, cols: track idx
    for o, k in zip(rows, cols):
        new_pos = obs_shuffled[t, o]
        track_vel[k] = new_pos - track_pos[k]
        track_pos[k] = new_pos
        track_hist[k].append(new_pos.copy())
        assigned_identity = int(true_id[t, o])
        if assigned_identity != track_identity[k]:
            switches += 1
        track_identity[k] = assigned_identity
Out[23]:
Console
Track-level identity changes over 60 frames: 4
Minimum true separation between the particles: 0.027
Minimum noisy-observation separation: 0.018

The counter initializes each track's generating identity at frame zero and increments whenever a later assignment changes it. Thus a nonzero value records a swap event rather than a change in shuffled observation index. In this seeded example the position-only predictor records a nonzero swap count near the crossing. That failure is the lesson: prediction adds context, but it does not make an ambiguous association identifiable.

Out[24]:
Visualization
Scatter and line plot of two tracker paths crossing, with identity swaps near closest approach.
Data association through a crossing. Dots are noisy observations assigned by Hungarian matching against last-displacement predictions; colors denote tracker slots, which swap generating identities near the crossing.

Prediction helps away from the crossing by supplying where each track should be if its identity persists. Here it is insufficient at closest approach: noisy last-displacement estimates drive repeated swaps. Appearance features, calibrated Kalman uncertainty, or multi-frame smoothing could add evidence. Recurrent slot conditioning changes where continuity enters the system, but it can also swap unless identity consistency is checked explicitly.

Key Parameters

The key parameters for the interaction network and its training setup are:

  • SPRING_K: Spring stiffness of the synthetic world. It sets the magnitude of the pairwise force the edge function must learn from relative positions and rest lengths.
  • DAMPING: Global velocity damping applied in the node update. It is directly predictable from a node's own velocity, unlike configuration-specific spring forces.
  • DT: Integration step for semi-implicit Euler. For a fixed physical horizon and within the method's stable regime, smaller values usually reduce discretization error but require more steps.
  • STEPS: Number of rollout steps per trajectory. It fixes the horizon over which compounding rollout error is measured.
  • hidden: Width of the hidden layers in the edge and node MLPs. Larger values give the message and update functions more capacity at a higher training cost.
  • BATCH_SIZE: Number of transition items sampled per gradient step. Larger batches often reduce gradient variance at higher memory cost.
  • TRAIN_STEPS: Number of optimizer updates applied to each model with the shared minibatch schedule.
  • lr: Adam optimizer step size. Larger values can accelerate early progress but also increase instability or overshoot.

Limitations and Impact

Object-centric and relational world models introduce failure modes alongside their benefits. This section separates those limitations from the results the cited methods have demonstrated.

Where Object-Centric Models Struggle

The failure modes begin at discovery.

Discovery is not solved. Synthetic benchmarks with simple objects demonstrate the mechanism, while clutter, occlusion, deformation, and domain shift require separate evaluation rather than a blanket "works best" ranking. A fixed slot count KK is a hard capacity ceiling; empirical models can split, merge, or allocate slots to background, but the exact failure pattern depends on data and objective. More fundamentally, "object" is task-relative. Reconstruction pressure does not know whether a manipulation policy needs mug-and-handle structure or whether a traffic model needs vehicles and platoons. Pixel fidelity can therefore disagree with decision usefulness.

Occlusion and contact are important, challenging cases for explicit association and recurrent slot continuity. An undetected swap can attach predictions to the wrong history and may mislead an object-indexed planner; confidence and downstream failure are not automatic. Long occlusions also require transition predictions to remain useful without direct object observations. Factorization can localize error to a slot, which may help diagnosis or planning when downstream components use that structure, but it does not make rollouts self-correcting.

Several cited simulators fix connectivity with a radius rule or mesh, while NRI-style methods learn latent relations. Dense pairwise latent-edge inference has O(n2)O(n^2) candidate pairs, and richer edge-type posteriors add statistical and computational burden. An imperfect fixed topology can be harmful when omitted or spurious edges cannot be compensated by the learned functions, but a message function may also learn to suppress irrelevant edges. A fixed topology does not represent uncertainty over graph structure directly, so topology error is harder to diagnose, though residuals, uncertainty, or learned edge weights can still reveal it.

Compositional generalization is bounded by what the representation and training identify. Interaction Networks report domain-specific transfer to different object counts within the same physical family. That does not establish zero-shot transfer to a qualitatively new interaction law. A shared untyped edge function chiefly supplies an architectural route to count and configuration generalization; typed relations, relation embeddings, meta-learning, or additional training are possible routes across interaction kinds. The architecture alone guarantees none of these extrapolations. Part IV develops related geometry, physical dynamics, and causal tools.

What These Methods Demonstrated

The cited work demonstrates learned simulation of fluids, granular materials, deformable surfaces, and aerodynamics in research benchmarks, alongside object-factored planning in the reported C-SWM and SlotFormer environments. IntPhys and ADEPT make learned physical expectations testable without claiming historical priority or hard-coded permanence, solidity, and continuity. The defensible lesson is conditional: encoding a correct structural bias can improve data efficiency and generalization, while mismatch, finite capacity, data, and optimization determine the outcome. The next chapter applies the object-centric lens to the agent's own state, and Part IV adds geometry, physics, and causal structure.

Summary

  • Objects are task-relative abstractions. Explicit sets and graphs expose entity correspondence and relations but do not make every decomposition correct.
  • Slot mixtures and Slot Attention create soft competition. Canonical Slot Attention normalizes across slots, then renormalizes over inputs to form each slot's weighted-mean update. Neither step guarantees object-aligned binding.
  • Message passing shares edge and node functions across compatible graphs. Relative features provide translation invariance only when every remaining input and operation respects that symmetry.
  • The experiment compares a relational network with a size-flexible independent-node baseline. It supports transfer across the evaluated 4-, 6-, and 8-node graphs, while its selected trajectory still drifts visibly.
  • Tracking combines prediction and association, but the seeded crossing example records identity swaps. Recurrent slot conditioning also encourages rather than guarantees continuity.
  • Fixed capacity, topology mismatch, occlusion, and new interaction laws remain separate failure modes. Structured bias helps when it matches the task and can hurt when it does not.

Quiz

Ready to test your understanding? Take this quick quiz to reinforce what you've learned about object-centric and relational world models.

Object-Centric and Relational Worlds

Question 1 of 80 of 8 completed
In Slot Attention, which normalization creates competition between slots?

Comments

No comments yet. Be the first to share your thoughts!

Reference

Citation details

Cite or share this article.

BIBTEXAcademic
@misc{brenndoerfer2026objectcentric, author = {Michael Brenndoerfer}, title = {Object-Centric and Relational Worlds}, year = {2026}, url = {https://mbrenndoerfer.com/writing/object-centric-relational-world-models-slots-graphs-message-passing}, organization = {mbrenndoerfer.com}, note = {Accessed: 2026-10-15} }
APAAcademic
Michael Brenndoerfer (2026). Object-Centric and Relational Worlds. Retrieved from https://mbrenndoerfer.com/writing/object-centric-relational-world-models-slots-graphs-message-passing
MLAAcademic
Michael Brenndoerfer. "Object-Centric and Relational Worlds." 2026. Web. October 15, 2026. <https://mbrenndoerfer.com/writing/object-centric-relational-world-models-slots-graphs-message-passing>.
CHICAGOAcademic
Michael Brenndoerfer. "Object-Centric and Relational Worlds." Accessed October 15, 2026. https://mbrenndoerfer.com/writing/object-centric-relational-world-models-slots-graphs-message-passing.
HARVARDAcademic
Michael Brenndoerfer (2026) 'Object-Centric and Relational Worlds'. Available at: https://mbrenndoerfer.com/writing/object-centric-relational-world-models-slots-graphs-message-passing (Accessed: October 15, 2026).
SimpleBasic
Michael Brenndoerfer (2026). Object-Centric and Relational Worlds. https://mbrenndoerfer.com/writing/object-centric-relational-world-models-slots-graphs-message-passing

About the author

Continue with the full handbook

This chapter is part of World Models Handbook. Use the handbook page to browse the complete table of contents and continue reading in sequence.

Explore World Models Handbook
Newsletter

Stay up to date

Get articles, book updates, and news delivered to your inbox.

No spam, unsubscribe anytime.

or

Join the community

Sign in to remove popups, track your reading progress, and join the discussion.