StateSpaceDiffuser: Bringing Long Context to Diffusion World Models

Nedko Savov, Naser Kazemi, Deheng Zhang, Danda Pani Paudel, Xi Wang, Luc Van Gool

World models are essential for training AI agents, allowing them to "imagine" the consequences of their actions in a simulated environment. Currently, the gold standard for visual quality in these models is diffusion. However, diffusion models are computationally expensive, leading researchers to use a "sliding window" approach where the model only looks at the last few frames (typically 4 to 16) to predict the next one.

This creates a massive problem: temporal drift. Because the model only sees a tiny slice of the recent past, it quickly forgets what the environment looked like earlier. If an agent walks through a maze, turns around, and returns to the start, a standard diffusion model will likely hallucinate a completely different room because the original starting point has fallen out of its short-term memory window. This lack of a "lasting environment state" makes long-term planning and consistent simulation nearly impossible.

To solve this "goldfish memory" problem, researchers introduce StateSpaceDiffuser, a hybrid world model that combines the high-fidelity image synthesis of diffusion models with the efficient, long-term memory of State-Space Models (SSMs).

The StateSpaceDiffuser Architecture

StateSpaceDiffuser splits the world modeling task into two specialized branches:

  1. The Long-Context Branch (The Memory): This branch uses a discrete State-Space Model, specifically Mamba. SSMs are mathematically designed to handle sequences of arbitrary length with linear complexity and constant per-step latency. It processes the entire history of images and actions, compressing them into a compact "hidden state" that serves as a summary of everything seen so far.
  2. The Generative Branch (The Artist): This is a high-fidelity diffusion model. Unlike standard versions that only look at the recent past, this branch is explicitly conditioned on the features from the Long-Context Branch.

Two-Stage Training: The researchers found that training the entire architecture end-to-end was unstable, as noisy gradients from the diffusion process disrupted the SSM's learning. Instead, they utilized a two-stage approach: first, training the SSM to predict future features, and then freezing the SSM to train the diffusion model to use those stable "memory" features for rendering high-quality images.

Datasets and Evaluation

The model was rigorously tested on two distinct environments to evaluate both memory retention and visual fidelity.

Long-term history sequences in CSGO and MiniGrid environments.
  • MiniGrid: A 2D maze environment used for "memory stress tests." The authors developed a "Forward-Backward" protocol where an agent navigates deep into a maze and then retraces its steps. To succeed, the model must recall the exact layout and colors of the maze seen at the very beginning of the sequence.
  • CSGO (Counter-Strike: Global Offensive): A complex 3D environment used to evaluate visual fidelity and consistency in a realistic, high-action setting. The authors created "mirrored" sequences to force the model to rely on long-term memory to reconstruct previously seen rooms and hallways.

Key Insights and Results

By decoupling memory from synthesis, StateSpaceDiffuser allows a lightweight SSM to handle the "what happened when," freeing the heavy-duty diffusion model to focus entirely on "how to make it look real." This results in extreme efficiency: at inference time, the SSM contributes less than 2% of the total computation, providing long-term memory almost for free.

StateSpaceDiffuser successfully recalls the exact layout and colors of the maze, avoiding the temporal drift seen in baseline models.
  • Quantitative Superiority: On the MiniGrid memory task, StateSpaceDiffuser achieved a 51.9% improvement in PSNR (Peak Signal-to-Noise Ratio) over the diffusion-only baseline.
  • Long-Term Coherence: While standard diffusion models began to drift and hallucinate new content within a few dozen steps, StateSpaceDiffuser maintained a coherent visual context for an order of magnitude more steps.
  • Zero-Shot Generalization: A model trained on a context length of 50 frames successfully generalized to 150 frames during testing without any fine-tuning, suggesting the SSM-diffusion hybrid is inherently robust to longer horizons.
  • Human Preference: In a user study on the complex CSGO environment, human participants overwhelmingly preferred the generations from StateSpaceDiffuser, noting that it accurately recalled visual cues (like a specific red roof or a door) that the baseline model completely forgot.

Limitations and Future Work

While a major step forward, the authors note a few areas for improvement. The current implementation uses a lightweight decoder to keep speeds high, which can sometimes result in blurry details or artifacts during very long "imagination" rollouts. Furthermore, for even more complex open-world environments, the single-layer SSM might need to be scaled up to capture higher-frequency details over time. Finally, while the model is much more stable than previous versions, errors in autoregressive "imagination" mode can still accumulate over extremely long horizons—a classic, ongoing challenge in world modeling.

Summary updated

BibTeX
@inproceedings{savov2025statespacediffuser,
  author = {Nedko Savov and Naser Kazemi and Deheng Zhang and Danda Pani Paudel and Xi Wang and Luc Van Gool},
  title = {{StateSpaceDiffuser: Bringing Long Context to Diffusion World Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=g52NwTQj0Q},
}
Figure