Diffusion for World Modeling: Visual Details Matter in Atari† Eloi Alonso∗ University of Geneva Adam Jelley∗ University of Edinburgh Vincent Micheli University of Geneva Anssi Kanervisto Microsoft Research Amos Storkey University of Edinburgh Tim Pearce‡ Microsoft Research François Fleuret‡ University of Geneva Abstract World models constitute a promising approach for training reinforcement learning agents in a safe and sample-efficient manner. Recent world models predominantly operate on sequences of discrete latent variables to model environment dynamics. However, this compression into a compact discrete representation may ignore visual details that are important for reinforcement learning. Concurrently, diffusion models have become a dominant approach for image generation, challenging well-established methods modeling discrete latents. Motivated by this paradigm shift, we introduce DIAMOND (DIffusion As a Model Of eNvironment Dreams), a reinforcement learning agent trained in a diffusion world model. We analyze the key design choices that are required to make diffusion suitable for world modeling, and demonstrate how improved visual details can lead to improved agent performance. DIAMOND achieves a mean human normalized score of 1.46 on the competitive Atari 100k benchmark; a new best for agents trained entirely within a world model. We further demonstrate that DIAMOND ’s diffusion world model can stand alone as an interactive neural game engine by training on static Counter-Strike: Global Offensive gameplay. To foster future research on diffusion for world modeling, we release our code, agents, videos and playable world models at https://diamond-wm.github.io. 1 Introduction Generative models of environments, or “world models" (Ha and Schmidhuber, 2018), are becoming increasingly important as a component for generalist agents to plan and reason about their environment (LeCun, 2022). Reinforcement Learning (RL) has demonstrated a wide variety of successes in recent years (Silver et al., 2016; Degrave et al., 2022; Ouyang et al., 2022), but is well-known to be sample inefficient, which limits real-world applications. World models have shown promise for training reinforcement learning agents across diverse environments (Hafner et al., 2023; Schrittwieser et al., 2020), with greatly improved sample-efficiency (Ye et al., 2021), which can enable learning from experience in the real world (Wu et al., 2023). Recent world modeling methods (Hafner et al., 2021; Micheli et al., 2023; Robine et al., 2023; Hafner et al., 2023; Zhang et al., 2023) often model environment dynamics as a sequence of discrete latent variables. Discretization of the latent space helps to avoid compounding error over multi-step time horizons. However, this encoding may lose information, resulting in a loss of generality and reconstruction quality. This may be problematic for more real-world scenarios where the information †To prevent confusion, this is the final version of (Alonso et al., 2023) and is not related to (Ding et al., 2024). ∗Equal contribution. ‡Equal supervision. Contact: eloi.alonso@unige.ch and adam.jelley@ed.ac.uk 38th Conference on Neural Information Processing Systems (NeurIPS 2024). arXiv:2405.12399v2 [cs.LG] 30 Oct 2024 AAAAat−1 AAAAat AAAAaT −1 x0t−1 ... ... at xTt xτt x0t x0t ... ... at+1 xTt+1 xτt+1 x0t+1 x0T −1 ... ... xTT xτT x0Tπϕ πϕ Dθ Dθ Dθ Dθ Dθ Dθ . . . Environment time (t) Denoising time (τ)Conditioning Figure 1: Unrolling imagination of DIAMOND over time. The top row depicts a policy πϕ taking a sequence of actions in the imagina- tion of our learned diffusion world model Dθ. The environment time t flows along the hori- zontal axis, while the vertical axis represents the denoising time τ flowing backward from T to 0. Concretely, given (clean) past obser- vations x0