SandHouse
Pages and contents

Latent Particles

DDLP: Unsupervised Object-centric Video Prediction with Deep Dynamic Latent Particles

โ‹ฎโ‹ฎ
Field
Object-centric learning, video prediction, latent dynamics
โ‹ฎโ‹ฎ
Authors
Tal Daniel, Aviv Tamar
โ‹ฎโ‹ฎ
Year
2024
โ‹ฎโ‹ฎ
Venue
Transactions on Machine Learning Research
โ‹ฎโ‹ฎ
Link / arXiv
https://arxiv.org/abs/2306.05957
โ‹ฎโ‹ฎ
Code
https://github.com/taldatech/ddlp
โ‹ฎโ‹ฎ
Project
https://taldatech.github.io/ddlp-web/
โ‹ฎโ‹ฎ
Tags
#object-centric #world-models #video-prediction #transformers #latent-dynamics #representation-learning

Problem

Object-centric video prediction represents a scene as a collection of entities and then predicts how those entities evolve. This is attractive for physical reasoning because the model can focus directly on properties such as object position, appearance, and interactions rather than predicting every future pixel independently. Existing methods usually use either patch-based representations, which generate many candidate objects and become computationally expensive, or slot-based representations, which allocate a richer latent vector to a smaller fixed number of objects and can become expensive as the number of objects increases.

The paper argues that Deep Latent Particles (DLPs) provide a useful middle ground. A particle is centered at an explicit image keypoint and carries latent attributes describing the local object. Compared with a generic slot, its position and several physical properties are directly represented and therefore interpretable. However, the original DLP model was designed primarily for single images. Applying it independently to every video frame gives an unordered set of particles at each timestep, so there is no guarantee that particle k represents the same object from one frame to the next.

DDLP extends DLP into a full video world model. The main problems are therefore to maintain consistent object identity across frames, learn interactions between particles over time, and retain a representation compact enough for long-horizon prediction. The resulting model introduces a differentiable particle-tracking posterior and a Particle Interaction Transformer (PINT) that models the dynamics of those tracked particles.

Background: Deep Latent Particles

DLP is a VAE-style object-centric model. Instead of representing an image with one unstructured latent vector, the image is represented by K particles. In the original DLP, each particle contains a two-dimensional location and an appearance vector:

z=[zf,zp]โˆˆโ„Kร—(d+2),

where zpโˆˆโ„Kร—2 gives image coordinates and zfโˆˆโ„Kร—d describes local appearance.

The position prior is generated from image patches using a CNN and spatial softmax, which proposes locations likely to contain meaningful visual content. Because the resulting keypoints are an unordered set, DLP replaces an ordinary position KL divergence with a Chamfer-KL that matches each posterior keypoint to a nearby prior proposal without requiring a predefined ordering.

Each particle's visual representation is inferred from a small image region centered around its position. A spatial transformer extracts this local "glimpse," and the decoder performs the reverse process: each particle generates an image patch, and those patches are combined into the reconstructed image.

This gives DLP a useful structural bias: individual latent variables are explicitly tied to localized regions of the scene.

Method

DLPv2 Particle Representation

DDLP first improves the single-image DLP representation. A foreground particle becomes

z=[zp,zs,zd,zt,zf]โˆˆโ„6+m.

Its attributes are:

โ€ข zpโˆˆโ„2 : position.
โ€ข zsโˆˆโ„2 : spatial scale.
โ€ข zdโˆˆโ„ : depth.
โ€ข ztโˆˆโ„ : transparency.
โ€ข zfโˆˆโ„m : learned visual appearance.

Position, scale, depth, and visual features are represented with stochastic latent distributions, while transparency is modeled using a Beta distribution. A separate background particle represents the scene background.

Scale allows the spatial transformer to choose differently sized glimpses around particles. Depth determines how overlapping decoded objects should be layered, and transparency controls their contribution when patches are composed. This representation makes some physical properties directly accessible rather than burying all information inside an opaque slot vector.

DLPv2 retains the VAE-style objective. At a high level,

โ„’DLP=โ„’rec+ฮฒKL(โ„’position+โ„’attributes+ฮฒfโ„’features),

where the position term uses the Chamfer-KL matching between posterior keypoints and keypoint proposals, while the remaining attributes use standard KL regularization.

Why Tracking Is Necessary

Applying the single-image encoder separately to frames xt and xt+1 would produce two unordered particle sets. Particle 3 might correspond to a green ball in one frame and a red block in the next. A dynamics model would then have to solve object matching at the same time as learning dynamics.

DDLP instead makes the particle representation temporally persistent. The position of a particle in the previous frame becomes an anchor for its position in the next frame:

za,t=zp,tโˆ’1.

The encoder searches locally around this anchor and predicts an offset to the new object position. The assumption is that an object's displacement between consecutive frames is relatively small.

To make this search more reliable, DDLP computes a normalized cross-correlation between the image patch around the previous position in xtโˆ’1 and a region around the same location in xt . The resulting score map indicates likely displacement directions and is concatenated with the encoder input. Because the entire tracking procedure is differentiable, object decomposition and object tracking are trained jointly with the video model.

This is one of the most important parts of the paper. The ablations show that learning good particles independently in every frame is insufficient; consistent particle identity through time is essential for learning useful dynamics.

Particle Interaction Transformer

Once particles are aligned through time, DDLP must predict their future evolution. PINT models a sequence containing all particles from all previous timesteps. It is a causal Transformer whose attention allows one particle to consider both its own history and the states of other particles.

This is important for physical interactions. A ball's future trajectory depends not only on its previous velocity but also on whether it collides with another object. Attention provides a flexible mechanism for modeling these cross-object effects.

Ordinary positional embeddings create a problem because particle sets should largely retain permutation symmetry. DDLP therefore separates position information into a temporal relative bias and a particle relative bias:

B=Btime+Bpos.

This bias is added directly to the attention logits:

Attentionโก(Q,K,V)=Softmaxโก(QKโŠคD+B)V.

Btime distinguishes relative timesteps, while Bpos maintains information about which particle trajectory is being followed. A causal mask prevents attention to future states. The standard implementation uses six Transformer layers and eight attention heads.

PINT does not deterministically output a single next particle state during training. Instead, it predicts the parameters of a prior distribution over the next particles. This allows the video model to retain the probabilistic VAE formulation.

Posterior and Dynamics Prior

During training, the encoder is allowed to observe the actual current frame and produces the posterior

qฯ•(ztโˆฃxโ‰คt).

PINT only receives the past particle sequence and predicts a dynamics prior

pฯˆ(ztโˆฃz<t).

The posterior therefore says what particles actually explain the observed frame, while the prior attempts to predict those particles from history alone. Minimizing their KL divergence teaches PINT the temporal dynamics.

The first few frames are used as a burn-in period because one image is insufficient to infer quantities such as velocity. DDLP uses ฯ„=4 burn-in frames. During this period the model uses the original single-image particle prior; after burn-in, the learned PINT dynamics prior is used.

The complete temporal training objective is

โ„’DDLP=โˆ’โˆ‘t=0Tโˆ’1ELBOโก(xt)=โˆ‘t=0ฯ„โˆ’1โ„’DLP,t+โˆ‘t=ฯ„Tโˆ’1โ„’dyn,t,

with

โ„’dyn,t=โ„’rec(xt,x~t)+ฮฒKLDKL(qฯ•(ztโˆฃxโ‰คt)โ€–pฯˆ(ztโˆฃz<t)).

Training uses teacher forcing: PINT receives true posterior particles from previous frames. At inference, the model becomes autoregressive. After encoding the context frames, PINT samples or predicts future particles from its own previous predictions, and the particle decoder converts each predicted particle set into a video frame.

Overall Computation

The core DDLP pipeline can be summarized as

xtโ†’qฯ•(ztโˆฃxโ‰คt)โ†’zt1,โ€ฆ,ztKโ†’PINTโ†’pฯˆ(zt+1โˆฃzโ‰คt)โ†’z~t+1โ†’x~t+1.

During training, the tracking encoder and PINT prior are learned together. The posterior learns to represent the video in a way that both reconstructs the current frame and remains predictable from the past. The dynamics prior simultaneously learns to reproduce that representation without seeing the future image.

Counterfactual "What If?" Prediction

Because physical attributes are explicit, the user can intervene directly in latent space. The authors encode several initial frames, identify a particle belonging to an object, alter properties such as its position, scale, or visual features, and then let PINT roll the modified state forward.

For example, moving a ball to a new initial location can cause it to collide with a different object. PINT then predicts the resulting changed trajectory and the decoder renders the counterfactual video. This is a useful consequence of explicitly separating interpretable object properties from the learned dynamics.

The intervention is applied consistently to the ฯ„=4 burn-in frames before the autoregressive rollout so that the altered initial trajectory remains compatible with the model's small-displacement assumption.

DiffuseDDLP

The compact particle space also makes unconditional video generation cheaper. DiffuseDDLP trains a diffusion model to generate only the particles of the first four frames,

zฯ„โˆˆโ„ฯ„ร—Kร—F.

PINT then predicts the remaining particles for a long video, and the existing DDLP decoder renders them to pixels:

z0:ฯ„โ†’PINTz0:Tโ†’decoderx^0:T.

The authors find that using a PINT-like Transformer as the diffusion denoiser works better than a standard UNet for this structured latent representation. Because the particle state is far smaller than pixel-space video, the diffusion model trains in less than a day on a consumer GPU and can generate 100-frame videos in a few seconds on a CPU.

Results

DDLP is evaluated on five datasets:

Dataset
Main challenge
โ‹ฎโ‹ฎ
Balls-Interaction
Long-term collisions between bouncing balls
โ‹ฎโ‹ฎ
OBJ3D
3D objects and collision dynamics
โ‹ฎโ‹ฎ
CLEVRER
Many initial conditions and long rollouts
โ‹ฎโ‹ฎ
PHYRE
Physical puzzle dynamics
โ‹ฎโ‹ฎ
Traffic
Real video with up to roughly 20 cars

The main baselines are G-SWM, which uses a patch-based object representation with recurrent dynamics, and SlotFormer, which uses slot representations with Transformer dynamics.

Prediction quality is measured using PSNR, SSIM, and LPIPS. Lower LPIPS generally corresponds to greater perceptual similarity. Balls-Interaction additionally provides ground-truth object locations, allowing direct measurement of accumulated position error with MED10.

Long-Horizon Dynamics

On Balls-Interaction:

Model
MED10 โ†“
LPIPS โ†“
โ‹ฎโ‹ฎ
G-SWM
0.256
0.23
โ‹ฎโ‹ฎ
DDLP
0.149
0.18

The large decrease in position error is particularly important because the dataset contains repeated collisions. Small trajectory errors compound strongly over time, so maintaining low error requires correctly modeling both individual motion and object interactions.

The perceptual results on the remaining datasets are:

Dataset
G-SWM LPIPS โ†“
SlotFormer LPIPS โ†“
DDLP LPIPS โ†“
โ‹ฎโ‹ฎ
OBJ3D
0.118
0.135
0.088
โ‹ฎโ‹ฎ
Traffic
0.235
0.180
0.150
โ‹ฎโ‹ฎ
CLEVRER
0.146
โ€”
0.134
โ‹ฎโ‹ฎ
PHYRE
0.078
โ€”
0.055

DDLP does not dominate every PSNR or SSIM number. For example, its OBJ3D PSNR is close to rather than clearly better than the baselines, and CLEVRER differences are relatively small. Its strongest advantage is in perceptual quality and long-term consistency. The paper's rollout figures show competing models increasingly blurring, deforming, or removing objects over long horizons, whereas DDLP more often preserves object shape and position.

Traffic particularly illustrates the scalability benefit of particles. Videos can contain up to around 20 cars, which is difficult for a fixed small collection of slots. The paper reports missed objects in SlotFormer when the number of visible cars exceeds what its available slots can represent.

Tracking Ablation

The most important ablation removes temporal particle tracking:

Model
MED10 โ†“
LPIPS โ†“
โ‹ฎโ‹ฎ
Full DDLP
0.149
0.180
โ‹ฎโ‹ฎ
No relative positional encoding
0.157
0.194
โ‹ฎโ‹ฎ
DLP encoder independently on each frame
2.736
0.393

Removing the special relative positional encoding causes a modest decline. Removing tracking causes a catastrophic increase in trajectory error. This supports the paper's main architectural argument: a strong single-frame object representation is not sufficient for a video world model if object identity is allowed to permute between frames.

What-If Prediction and Generation

The authors qualitatively demonstrate that changing one particle's position, scale, or appearance before rollout changes the subsequent simulated interactions. Figure 1 is especially useful: repositioning the green ball changes which collisions occur, producing a different future trajectory. This demonstrates a degree of controllability that is difficult to obtain from an opaque slot representation.

DiffuseDDLP additionally demonstrates unconditional generation on Balls-Interaction, OBJ3D, and Traffic. Rather than diffusing over an entire 100-frame pixel video, the model generates four compact particle frames and lets the learned dynamics produce the remainder. For OBJ3D, the paper gives an example representation of only 4ร—13ร—14=728 latent numbers for the initial particle sequence, smaller than even a single 32ร—32 RGB CIFAR image with 3072 scalar values.


The most important limitation comes directly from the tracking mechanism: DDLP assumes objects move only a relatively small distance between consecutive frames. This works when an existing object moves smoothly, but breaks when a completely new object enters the camera view. There is no previous particle location from which to track it. Figure 12 shows this failure explicitly. The authors suggest adding a particle birth/death process, similar to G-SWM, to dynamically create and remove tracked entities.

DDLP also assumes a mostly stationary camera. Large camera motion changes both objects and background simultaneously and can cause objects to appear or disappear in ways that the tracking model does not handle. Videos containing objects over very different spatial scales are another limitation because the model uses patches with a relatively fixed scale structure; the authors suggest a multi-scale patch architecture.

Appendix J also shows ordinary generative failure cases where objects are missed, deform, or disappear. These occur less often than in the compared baselines according to the authors, but they demonstrate that explicit object structure does not guarantee perfect temporal persistence.

More broadly, the object-centric inductive bias restricts which videos are naturally represented. DDLP is best suited to scenes that can reasonably be decomposed into persistent localized entities with relatively smooth evolution. Large appearance changes, newly created objects, scene cuts, and major camera motion violate this assumption.

DDLP sits between two major families of earlier object-centric video models. Patch-based models such as G-SWM can dynamically discover many object proposals but become computationally expensive and often require explicit proposal matching or filtering. Slot-based models such as SlotFormer provide clean object-level latents and Transformer dynamics but become costly when many slots are required and do not expose physical properties such as position as directly. DDLP's latent particles attempt to retain the compactness and explicit spatial structure of keypoints while adding enough learned attributes to represent richer objects.

For a deeper read, Sections 4.2 and 4.4 are the most important technical sections: the former explains how particle identity is maintained across frames and the latter defines PINT. Section 5.2 contains the main prediction experiments, while Sections 5.3โ€“5.4 demonstrate why explicit particle representations are useful beyond standard prediction. Section 6 and Appendix J are worth reading for the assumptions and failure cases that would matter when applying DDLP to less controlled environments.