Diffusion for World Modeling: Visual Details Matter in Atari

Eloi Alonso, Adam Jelley, Vincent Micheli, Anssi Kanervisto, Amos Storkey, Tim Pearce, François Fleuret

TL;DR

DIAMOND (DIffusion As a Model Of eNvironment Dreams) is a reinforcement learning agent trained entirely within a high-fidelity diffusion-based world model. By operating directly in image space rather than using lossy discrete latents, DIAMOND preserves critical visual details, achieving a new state-of-the-art mean human-normalized score of 1.46 on the Atari 100k benchmark.

What Problem Does This Paper Address?

Training reinforcement learning (RL) agents in the real world is sample-inefficient and potentially dangerous. "World models"—generative simulators learned from experience—allow agents to train safely and quickly in "imagination."

However, most modern world models (like DreamerV3 or IRIS) compress environment observations into a sequence of discrete latent variables. While this helps manage compounding errors over time, it often discards tiny but vital visual details—such as a single-pixel bullet in Breakout or a distant enemy in Asterix. The authors argue that this "lossy" compression limits agent performance and that diffusion models, which have revolutionized image generation, offer a way to build world models that retain these crucial visual cues.

Methods

The authors introduce DIAMOND, which replaces the standard discrete latent transition model with a conditional diffusion model.

  • Diffusion Paradigm: Instead of the common DDPM approach, DIAMOND uses the EDM (Elucidating the Design Space of Diffusion-Based Generative Models) formulation. This choice is critical: EDM's training objective allows the model to remain stable over long temporal horizons even with very few denoising steps (as few as 1–3), which is necessary for computational efficiency during RL training.
  • Architecture: The world model uses a 2D U-Net conditioned on a history of past observations (via frame stacking) and actions (via adaptive group normalization).
  • Imagination Training: The RL agent (an actor-critic network) never sees the real environment during its primary training phase. It interacts purely with the diffusion model's predictions.
  • Autoregressive Generation: The process is autoregressive: the model predicts the next "clean" observation, which then becomes part of the conditioning for the subsequent time step.
The autoregressive imagination process in DIAMOND, where the policy takes actions and the diffusion model generates the next observation.

Datasets

  • Atari 100k: The primary benchmark consisting of 26 games, where agents are limited to only 100k interactions (roughly 2 hours of gameplay).
  • CS:GO (Counter-Strike: Global Offensive): Used to test scalability to complex 3D environments. The model was trained on 87 hours of gameplay on the "Dust II" map.
  • Motorway Driving: A dataset of human driving on US motorways used for early investigations into visual quality and robustness to user inputs.

Key Insights and Ideas

  • Visual Details Matter: The authors qualitatively show that discrete latent models like IRIS suffer from "hallucinations"—enemies might flicker into rewards and back again. DIAMOND's diffusion approach maintains much higher temporal consistency and visual fidelity, which directly translates to better credit assignment for the RL agent.
  • EDM vs. DDPM Stability: A major finding is that EDM is significantly more robust to compounding errors than DDPM when using a low number of denoising steps. DDPM-based world models quickly drift out of distribution, while EDM remains stable even for trajectories of 1,000 steps.
Figure 3: Imagined trajectories with diffusion world models based on DDPM (left) and EDM (right). The initial observation at t = 0 is common, and each row corresponds to a decreasing number of denoising steps n. We observe that DDPM-based generation suffers from compounding error, and that the smaller the number of denoising steps, the faster the error accumulates. In contrast, our EDM-based world model appears much more stable, even for n = 1.
  • The Multi-Step Necessity: While single-step denoising works for deterministic games, multi-step denoising (the authors settled on $n=3$) is required to handle multi-modal distributions. In games like Boxing, where enemy movement is unpredictable, a single-step model produces blurry "average" images, whereas multi-step denoising "picks a mode" to produce a crisp, realistic frame.
Figure 4: Single-step (top row) versus multi-step (bottom row) sampling in Boxing. Movements of the black player are unpredictable, so that single-step denoising interpolates between possible outcomes and results in blurry predictions. In contrast, multi-step sampling produces a crisp image by driving the generation towards a particular mode. Interestingly, the policy controls the white player, so his actions are known to the world model. This information removes any ambiguity, and so we observe that both single-step and multi-step sampling correctly predict the white player’s position.

Key Results

  • Atari 100k SOTA: DIAMOND achieved a Mean Human Normalized Score (HNS) of 1.46, outperforming all previous agents trained entirely within a world model (e.g., STORM at 1.26, IRIS at 1.04).
  • Efficiency: Despite using diffusion, DIAMOND is efficient. It requires only 3 function evaluations (NFE) per frame, making it faster to train than some transformer-based competitors like IRIS (which uses 16 NFE).
  • Neural Game Engine: The CS:GO experiment demonstrated that DIAMOND can act as a playable "neural game engine," generating stable 3D trajectories at 10Hz on a single consumer GPU.
Figure 2: Mean and interquartile mean human nor- malized scores. DIAMOND, in blue, obtains a mean HNS of 1.46 and an IQM of 0.64.

Limitations and Future Work

  • Memory Mechanism: Currently, DIAMOND uses simple frame stacking for memory. The authors suggest that integrating an autoregressive transformer could enable much longer-term memory and better scalability.
  • Continuous Control: The current evaluation is focused on discrete action spaces (Atari). Testing on continuous control tasks is a logical next step.
  • Integrated Models: The reward and termination models are currently separate CNN-LSTMs. Integrating these directly into the diffusion process could simplify the architecture and potentially improve performance.
  • Drift in 3D: While stable, the CS:GO model can still drift in less-visited areas of the map or "forget" the environment state when facing a wall, suggesting a need for larger models and more data.

Summary updated

BibTeX
@inproceedings{alonso2024diffusion,
  author = {Eloi Alonso and Adam Jelley and Vincent Micheli and Anssi Kanervisto and Amos Storkey and Tim Pearce and François Fleuret},
  title = {{Diffusion for World Modeling: Visual Details Matter in Atari}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=NadTwTODgC},
}
Figure