Flow Equivariant World Models: Structured Memory for Dynamic Environments


Flow Equivariant World Models (FloWM) predict 3D dynamics in partially observable environments by maintaining a latent memory map equivariant to external motion (flows) and self-motion (agent movement).

Abstract

The natural world is richly structured over space and time. Much of this structure arises from the interplay between spatial geometry and motion. However, most existing world models ignore this structure, leading to an inability to generalize in dynamic environments.

In this work, we show that enforcing equivariance between an agent's representations and the world's dynamics necessarily induces an efficient, structured memory. Concretely, we introduce Flow Equivariant World Modeling, a framework in which both self-motion and external object motion are unified as one-parameter Lie-group ``flows'' acting on a latent world memory; and models are built to be equivariant with respect to these transformations.

On 2D and 3D partially observed video world modeling benchmarks, we demonstrate that Flow Equivariant World Models significantly outperform comparable state-of-the-art diffusion-based and memory-augmented world modeling architectures in their ability to track and predict the locations of moving objects over long horizons.


In summary, FloWM is an action-conditioned video world model that can simulate future dynamics within its memory representation using flow and self-motion equivariance, surpassing prior unstructured video world models on video prediction in partially observed dynamic settings.

Below, we overview the 3D FloWM model, the 2D FloWM model, present 3D Blockworld results, and 2D MNIST World results.


FloWM Model (3D)

Model Comparison

Comparison between different world modeling frameworks: a) Standard diffusion forcing uses a fixed length sliding window to generate video autoregressively. Frames must be evicted if they exceed the window. b) When there are information dependencies between past observations and the generated frame, without a memory mechanism, DFoT is not able to generate consistently. c) Existing memory solutions are view-dependent, and cannot handle dynamic scenes, still resulting in inconsistent generation. d) In FloWM, past frames are remembered in the spatial latent memory and continually updated through FloWM's internal dynamics, resulting in consistent generation.


missing

FloWM Model Diagram

FloWM Recurrence relation in 3D: a) Information passes from the image observations to the hidden state through a ViT encoder. b) The new updates are combined with the existing hidden state, and the action and internal flows roll the hidden state to the next timestep. c) The updated hidden state is used to predict the next timestep observation.


missing

3D Blockworld Results

Below we provide full rollouts on the Dynamic, Textured, and Static splits of the 3D Blockworld Dataset

Dynamic Blockworld Rollouts

3D Dynamic Block World Rollout #1
3D Dynamic Block World Rollout #2
3D Dynamic Block World Rollout #3

We visualize failure cases of our model, in comparison to DFoT and DFoT SSM by visualizing low PSNR rollouts:


3D Dynamic Block World Rollout (Medium PSNR)

3D Dynamic Block World Rollout (Low PSNR)


Textured Blockworld Rollouts

Textured Dynamic Blockworld Rollout #1
Textured Dynamic Blockworld Rollout #2
Textured Dynamic Blockworld Rollout #3


Frame-wise rollout visualizations and result tables

Rollout Visualization on Dynamic Textured Blockworld.

missing
Note that FloWM remains consistent while SSM and DFoT hallucinate.
Rollout Visualization on Dynamic Blockworld.

missing
Note that FloWM remains consistent while SSM and DFoT hallucinate. Ablations also begin predicting poor visual results.

Validation Metrics on 3D Dynamic Block World

missing

Columns show mean metrics (MSE, PSNR, SSIM) of generated frames over the first 70 frames (matches training distribution) vs. 210 frames (length generalization). 70 frames are passed in as context.

Validation Metrics on 3D Dynamic Textured Block World

missing

Columns show mean metrics (MSE, PSNR, SSIM) of 70 generated frames vs 210 frames, with 70 frames passed in as context.


Activation Probe Experiments

We train simple probe models on the activation spaces of FloWM and baselines on Dynamic Block World to see whether the representation readiliy contains the position of each block at each timestep. a) FloWM can make practically perfect predictions, even while the agent is moving around and the blocks are moving. This demonstrates the accuracy of the learned latent space. b) The DFoT baseline makes sporadic predictions of each of the blocks, demonstrating its unprincipled representation space.


missing

The same example rollout of predicted spatial positions by the probe models in Dynamic Block World is visualized here as a prediction through time. a) FloWM can make predictions accurately through time, while b) DFoT cannot.


missing


We find that the probe can accurately predict the correct block position ~96% of the time for FloWM, while the accuracy prediction of the probe is less than 1% for DFoT. Further, the L2 distance between predicted positions, which can be seen as a proxy for testing whether the FloWM model has learned to be flow equivariant, is significantly lower (0.22) for FloWM, while remaining high for DFoT (2.36, much better than an untrained model at 6.96, but significantly worse than FloWM). See the paper for more details!


Dreamer V3 RSSM Baseline (New!)

We present new results on an additional baseline, an RSSM model based on the Dreamer V3 architecture. Two variants are trained, one with 50M parameters and one with 400M parameters, following the description and hyperparameters in the paper. They are trained for 300k steps, the same as the other baselines. In the table below, we can see that the RSSM model performs poorly, approximately matching the performance of the other baselines. Further, model scale improves the quantitative metrics slightly but not significantly, and perceptually the videos still look quite poor, reinforcing our hypothesis that structured memory is important for solving partially observed dynamic world modeling problems.


missing

Rollouts of 70 context frames with 210 generated frames are visualized below for the 50M and 400M RSSM models on the Dynamic Blockworld dataset. The ground truth is on the left, and the generated frames are on the right (yellow border means they are context frames). We can see that after the generation period begins, the RSSM model is not able to keep coherent predictions, instead predicting some sort of dataset average. This provides evidence for our hypothesis that structured memory representations enable better learning for environments such as Blockworld; to compare, see rollouts for FloWM above.

RSSM 50M Rollout
RSSM 400M Rollout

Blockworld Planning Experiments (New!)

Figure and Table caption: we present results on downstream planning experiments in the Blockworld environment using the existing pretrained world models. The task is to maximize the amount of red pixels on the screen, analogous to being as close to the red block (in this experiment there is one of each color) as possible without being on top of it (reward is maximized at distance of 2 away). We use exhaustive search in an MPC framework with a horizon of 3 and a rollout of length 70 after feeding in 70 observed frames. In total the experiment is run across 8 episodes, requiring no additional trained parameters. In the figure below, we can see that FloWM quickly finds its way to the red block, while the baselines stay at far away. In the table below we can see that the final absolute distance is far lower for FloWM compared to the baselines. Example visualizations of the rollouts for each model are also available below. Though this is a preliminary simple planning experiment, we believe it demonstrates the downstream utility of being able to properly predict dynamics in partially observed settings.


missing

missing

MPC Planning Algorithm

repeat until episode ends:
  - from the current real context, use the world model to generate predicted future observations for many action sequences of length H
  - compute predicted reward for each imagined rollout (amount of red pixels in the predicted observations)
  - choose the highest-scoring action sequence, and execute the first action in the real environment
  - observe the real next frame and update the model context
  - replan
          

Rollouts of the generated 70 frames, for each of the FloWM, DFoT, and DreamerV3 RSSM models, are shown below. We execute the action chosen by the policy in the real environment, and also in the world model. The real top-down map from the environment simulator after each action is shown on the left, the ground truth next observation from the simulator after the action is taken is shown in the middle, and the generated next observation from the world model is shown on the right. We can see that the baselines may choose a particular action due to a hallucinated red block or red frame, whereas FloWM stays consistent with its generations throughout the entire trajectory, similar to the pure generation results. On the top down map, we can see that FloWM learns to follow the red block, while the others perform actions that are deemed good by the world model but in reality do not maximize the objective.

FloWM Planning Rollout
DFoT Planning Rollout
DreamerV3 RSSM Planning Rollout

FloWM Model (2D)

FloWM Model Diagram

a) FloWM Recurrence relation in 2D. Velocity channels are plotted as rows. At each timestep, the internal flow and action flow compose and act upon the latent memory map representation, which is used to predict the observation at the next timestep. b) Rollout error over time, for FloWM and ablations, and baselines. c) Training loss across batches, demonstrating how the full equivariance allows the model to learn significantly quicker.


missing

2D MNIST World Results

Below we provide full rollouts on the Dynamic Partially observed, Static partially observed, and dynamic fully observed splits of the 2D MNIST World Dataset.

Rollouts

Dynamic Partially Observed Rollout
Static Partially Observed Rollout

* Since the world has no velocity, the velocity channels are redundant and only add noise in this case.

Dynamic Fully Observed Rollout

* For fully observable cases, the World View (GT) is same as Agent View (GT).



Frame-wise rollout visualizations and result tables

Rollout Visualization on Dynamic Partially Observed MNIST World

missing
Note that FloWM remains consistent while SSM and DFoT hallucinate or fade to black. The agent view is a partial view of the whole world view.

Validation Metrics on 2D Dynamic Partially Observable MNIST World

missing

Columns show mean metrics (MSE, PSNR, SSIM) of frames over the first 20 generated frames (matches training distribution) vs. 150 generated frames (length generalization). 50 frames are passed in as context.


FloWM Compute / Memory Analysis (New!)

Below we report the compute and memory cost of rollouts with FloWM, DFoT, and DFoT-SSM models. We evaluate each model at batch size 8 on the Dynamic Blockworld Validation set on a single H200 GPU. We evaluate the each model under two different settings: one for one step of autoregressive generation (1 frame), and one for the inference setting we actually use (70 frames). We report the rollout time in seconds, the throughput, the resident allocated memory (GiB allocated before the generation begins), and the peak delta (measuring the additional memory allocated during rollout above the resident alloc baseline). We can see that FloWM remains substantially more efficient than the baselines as the sequence length increases, due to the recurrent nature of the model. Importantly, memory usage grows much slower with sequence length than the other baselines.

Sequence length scaling of rollout compute and memory usage

missing

The below table reports the difference in memory allocation and rollout time depending on the map and FoV size. The default configuration uses a 33x33 spatial map and a 60 degree field of view. We can see that map size and FoV have an impact on the Peak Delta, and the throughput, but not the resident alloc; this originates through difference in the KV and Map update tokens. Through this we can understand the scaling and tradeoff of having a particular size map and FoV.

Scaling of spatial memory and field of view size in FloWM

missing

Additional Figure About Baseline Metric Scores (New!)


missing