TL;DR
MemLearner introduces a learning-based, adaptive context memory mechanism for video world models to ensure long-term scene consistency. By embedding learnable query tokens directly into a pre-trained video diffusion transformer, it eliminates the need for rigid, rule-based frame retrieval and avoids the failure modes of training separate memory modules from scratch. The result is a model that maintains remarkable visual and geometric consistency over long durations, even in complex environments filled with moving objects and heavy occlusions.
What Problem Does This Paper Address?
Video World Models act as interactive simulators, predicting future video frames based on past history and user actions (like camera movements). However, generating long, consistent videos remains a major hurdle. As time passes, models suffer from "amnesia," forgetting the layout of previously visited rooms or the appearance of objects once they go out of frame.
To solve this, prior methods used context retrieval—essentially searching through history to find relevant frames to condition the next generation. But existing approaches rely on hard-coded rules, such as Field-of-View (FOV) overlap or point-cloud matching. These rules break down in the real world: FOV overlap can't see through an occluding wall, and point clouds struggle to accurately track dynamic, moving objects.
Methods
Instead of relying on hand-crafted rules to select past frames, the authors propose MemLearner, an end-to-end framework that learns what to look for in the history.
1. Adaptive Query Tokens (Q-Tokens)
The core architecture introduces learnable query tokens ($Q$) to act as an information bridge between historical context tokens ($C$) and the future tokens to be predicted ($P$). As shown in the token interaction diagram:
- $Q$ tokens attend to $C$ tokens to adaptively extract relevant historical info.
- $P$ tokens attend to $Q$ tokens to condition the generation.
2. In-Model Context Querying
A key discovery was that adding a separate, scratch-trained module to handle this querying fails completely because it struggles to propagate gradients effectively. Instead, MemLearner feeds $C$, $Q$, and $P$ tokens directly into the pre-trained Video Diffusion Transformer (DiT) itself, leveraging its rich, pre-trained visual priors.
3. Efficiency Strategies
Processing long video histories inside a heavy transformer is computationally expensive. MemLearner mitigates this with two clever tricks:
- Layer Splitting: The network is divided into a few shallow Query Layers (where $C$, $Q$, and $P$ all interact) and many deep Generative Layers (where the long $C$ tokens are dropped, and only $Q$ and $P$ interact).
- Attention Pruning: Unnecessary attention paths (like context tokens acting as queries) are completely blocked, drastically reducing computational overhead.
Datasets
To train a model to handle complex environments, the authors needed a dataset with long videos, precise camera poses, dynamic objects, and occlusions. Finding none that met all criteria, they built their own:
- Our UE Dataset: A newly collected dataset using Unreal Engine containing 100 long videos across 13 highly detailed scenes (factories, streets, etc.), totaling 16.7 hours. It features automated camera trajectories with obstacle avoidance and diverse moving characters/animals.
- Multi-Dataset Training: To bridge the gap between simulation and reality, they co-trained on real-world datasets (SpatialVid and Sekai-real). They used a multi-encoder strategy where unannotated real-world videos are fed with zeroed-out camera parameters, preventing noisy or missing real-world poses from degrading the precise training learned from the simulator.
- Evaluation Benchmarks: Evaluated on their custom dataset, the standard CaM dataset, and out-of-distribution real-world data (Epic-Kitchens).
Key Insights and Ideas
- The "Scratch" Module Trap: Trying to train a separate context query module from scratch results in near-zero attention weights. The generation network simply learns to ignore it and degrades into a standard text-to-video model. Reusing the generation model's own layers for querying solves this optimization bottleneck.
- Denoising Dynamics: Attention analysis revealed that the model naturally shifts its memory needs during generation. In early diffusion timesteps, $Q$ tokens look broadly at the context to capture global scene layout. In later timesteps, they focus on fine-grained local correspondences.
- Implicit Geometry: Surprisingly, the authors found that injecting camera poses into the historical context tokens ($C$) wasn't necessary (see Table 5). The pre-trained video model is already capable of implicitly learning geometric correspondences across frames.
Key Results
MemLearner significantly outperforms existing state-of-the-art video world models across both pixel-level consistency (PSNR/LPIPS) and video quality (FID/FVD) metrics.
On the challenging occlusion/dynamic dataset (Table 2):
- Ground Truth Comparison: MemLearner achieved a PSNR of 21.23 and LPIPS of 0.2904, comfortably beating the previous best rule-based method, CaM (PSNR: 19.85, LPIPS: 0.3475).
- Revisit Consistency: When returning to a previously seen area after a long loop, MemLearner maintained much higher consistency (LPIPS: 0.3230) compared to CaM (LPIPS: 0.3934).
Furthermore, zero-shot transfer tests on the real-world Epic-Kitchens dataset proved that the learned memory mechanism generalizes well to real, unseen environments without overfitting to the simulator.
Limitations and Future Work
While a major step forward, the authors note two primary limitations:
- Scale Constraints: At the current 1B parameter scale, the model's capacity saturates when tracking too many moving elements. If more than five characters interact simultaneously in a large environment, the model still suffers from inconsistent character appearances upon revisits.
- Linear Memory Scaling: Currently, the framework stores the full context history. As videos grow infinitely long, this becomes unsustainable. Future work will need to explore context compression, summarization, and selective forgetting mechanisms.
Summary updated