DINO-WM: World Models on Pre-trained Visual Features enable Zero-shot Planning Gaoyue Zhou 1 Hengkai Pan 1 Yann LeCun1 2 Lerrel Pinto 1 Abstract The ability to predict future outcomes given con- trol actions is fundamental for physical reasoning. However, such predictive models, often called world models, remains challenging to learn and are typically developed for task-specific solutions with online policy learning. To unlock world mod- els’ true potential, we argue that they should 1) be trainable on offline, pre-collected trajectories, 2) support test-time behavior optimization, and 3) facilitate task-agnostic reasoning. To this end, we present DINO World Model (DINO-WM), a new method to model visual dynamics without reconstructing the visual world. DINO-WM lever- ages spatial patch features pre-trained with DI- NOv2, enabling it to learn from offline behavioral trajectories by predicting future patch features. This allows DINO-WM to achieve observational goals through action sequence optimization, fa- cilitating task-agnostic planning by treating goal features as prediction targets. We demonstrate that DINO-WM achieves zero-shot behavioral so- lutions at test time on six environments without expert demonstrations, reward modeling, or pre- learned inverse models, outperforming prior state- of-the-art work across diverse task families such as arbitrarily configured mazes, push manipula- tion with varied object shapes, and multi-particle scenarios. 1. Introduction Robotics and embodied AI have seen tremendous progress in recent years. Advances in imitation learning and rein- forcement learning have enabled agents to learn complex behaviors across diverse tasks (Agarwal et al., 2022; Zhao et al., 2023; Lee et al., 2024; Ma et al., 2024; Hafner et al., 2024; Hansen et al., 2024; Haldar et al., 2024; Jia et al., 1Courant Institute, New York University 2Meta AI. Correspon- dence to: Gaoyue Zhou . 2024). Despite this progress, generalization remains a ma- jor challenge (Zhou et al., 2023). Existing approaches pre- dominantly rely on policies that, once trained, operate in a feed-forward manner during deployment—mapping ob- servations to actions without any further optimization or reasoning. Under this framework, successful generalization inherently requires agents to possess solutions to all possi- ble tasks and scenarios once training is complete, which is only possible if the agent has seen similar scenarios during training (Reed et al., 2022; Brohan et al., 2023b;a; Etukuru et al., 2024). However, it is neither feasible nor efficient to learn solutions for all potential tasks and environments in advance. Instead of learning the solutions to all possible tasks dur- ing training, an alternate is to fit a dynamics model on training data and optimize task-specific behavior at runtime. These dynamics models, also called world models (Ha & Schmidhuber, 2018), have a long history in robotics and control (Sutton, 1991; Todorov & Li, 2005; Williams et al., 2017). More recently, several works have shown that world models can be trained on raw sensory data (Hafner et al., 2019; Micheli et al., 2023; Robine et al., 2023; Hansen et al., 2024; Hafner et al., 2024). This enables flexible use of model-based optimization to obtain policies as it circum- vents the need for explicit state-estimation. Despite this, significant challenges remains in its use for solving general- purpose tasks. To understand the challenges in world modeling, let us con- sider the two broad paradigms in learning world models: online and offline. In the online setting, access to the envi- ronment is often required so data can be continuously col- lected to improve the world model, which in turn improves the policy and the subsequent data collection. However, the online world model is only accurate in the cover of the policy that was being optimized. Hence, while it can be used to train powerful task-specific policies, it requires re- training for every new task even in the same environment. Instead, in the offline setting, the world model is trained on an offline dataset of collected trajectories in the environ- ment, which removes its dependence on the task specificity given sufficient coverage in the dataset. However, when required to solve a task, methods in this domain require 1 arXiv:2411.04983v2 [cs.RO] 1 Feb 2025 DINO-WM: World Models on Pre-trained Visual Features enable Zero-shot Planning strong auxiliary information which can take the form of ex- pert demonstrations (Pathak et al., 2018; Wang et al., 2023), structured keypoints (Ko et al., 2023; Wen et al., 2024), ac- cess to pretrained inverse models (Du et al., 2023; Ko et al., 2023) or dense reward functions (Ding et al., 2024), all of which reduce the generality of using offline world models. The central question to building better offline world models is if there is alternate auxiliary information that does not compromise its generality? In this work, we present DINO-WM , a new and simple method to build task-agnostic world models from an offline dataset of trajectories. DINO-WM models the world dy- namics on compact embeddings of the world, rather than the raw observations themselves. For the embedding, we use pretrained patch-features from the DINOv2 model, which provides both a spatial and object-centric representation prior. We conjecture that this pretrained representation en- ables robust and consistent world modeling, which relaxes the necessity for task-specific data coverage. Given these visual embeddings and actions, DINO-WM uses the ViT architecture to predict future embeddings. Once this model is trained on the offline dataset, planning to solve tasks is constructed as visual goal reaching, i.e. to reach a future desired goal given the current observation. Since the pre- dictions by DINO-WM are high quality (see Figure 4), we can simply use model predictive control with inference- time optimization to reach desired goals without any extra information during testing. DINO-WM is experimentally evaluated on six environ- ment suites spanning maze navigation, sliding manipulation, robotic arm control, and deformable object manipulation tasks. Our experiments reveal the following findings: • DINO-WM produce high-quality future world modeling that can be measured by improved visual reconstruction from trained decoders. On LPIPS metrics for our hardest tasks, this improves upon prior state-of-the-art work by 56% (See Section 4.7). • Given the latent world models trained using DINO-WM , we show high success for reaching arbitrary goals on our hardest tasks, improving upon prior work by 45% on average (See Section 4.3). • DINO-WM can be trained across environment variations within a task family (e.g. different maze layouts for nav- igation or different object shapes for manipulation) and achieve higher rates of success compared to prior work (See Section 4.5). Code and models for DINO-WM are open-sourced to ensure reproducibility and videos of planning are made available on our anonymous project website: https: //dino-wm.github.io. 2. Related Work We build on top of several works in developing world mod- els, optimizing behaviors from them, and leveraging com- pact visual representations. For conciseness, we only dis- cuss the ones most relevant to DINO-WM. Model-based Learning: Learning from models of dynam- ics has a rich literature spanning the fields of control, plan- ning, and robotics (Sutton, 1991; Todorov & Li, 2005; As- tolfi et al., 2008; Holkar & Waghmare, 2010; Williams et al., 2017). Recent works have shown that modeling dynam- ics and predicting future states can significantly enhance vision-based learning for embodied agents across various ap- plications, including online reinforcement learning (Micheli et al., 2023; Robine et al., 2023; Hansen et al., 2024; Hafner et al., 2024), exploration (Sekar et al., 2020; Mendonca et al., 2021; 2023a), planning (Watter et al., 2015; Finn & Levine, 2017; Ebert et al., 2018; Hafner et al., 2019), and imitation learning (Pathak et al., 2018). Several of these approaches initially focused on state-space dynamics (Deisenroth & Rasmussen, 2011; Lenz et al., 2015; Chua et al., 2018; Nagabandi et al., 2019), and have since been extended to handle image-based inputs, which we address in this work. These world models can predict future states in either pixel space (Finn & Levine, 2017; Ebert et al., 2018; Ko et al., 2023; Du et al., 2023) or latent representation space (Yan et al., 2021). Predicting in pixel space, however, is computationally expensive due to the need for image re- construction and the overhead of using diffusion models (Ko et al., 2023). On the other hand, latent-space prediction is typically tied to objectives of reconstructing images (Hafner et al., 2019; Micheli et al., 2023; Hafner et al., 2024), which raises concerns about whether the learned features contain sufficient information about the task. Moreover, many of these models incorporate reward prediction (Micheli et al., 2023; Robine et al., 2023; Hafner et al., 2024), or use reward prediction as auxiliary objective to learn the latent represen- tation (Hansen et al., 2022; 2024), inherently making the world model task-specific. In this work, we aim to decou- ple task-dependent information from latent-space prediction, striving to develop a versatile and task-agnostic world model capable of generalizing across different scenarios. Generative Models as World Models: With the recent excitement of large scale foundation models, there have been initiatives on building large-scale video generation world models conditioned on agent’s actions in the do- main of self-driving (Hu et al., 2023), control (Yang et al., 2023; Bruce et al., 2024), and general-purpose video gen- eration (Liu et al., 2024). These models aim to generate video predictions conditioned on text or high-level action sequences. While these models have demonstrated utility in downstream tasks like data augmentations, their reliance on language conditioning limits their application when precise 2 DINO-WM: World Models on Pre-trained Visual Features enable Zero-shot Planning Figure 1. We present DINO-WM , a method for training visual models by using pretrained DINOv2 embeddings of image frames (a). Once trained, given a target observation oT , we can directly optimize agent behavior by planning through DINO-WM using model predictive control (b). The use of pretrained embeddings significantly improves performance over prior state-of-the-art world models (c). visually indicative goals need to be reached. Additionally, the use of diffusion models for video generation makes them computationally expensive, further restricting their applica- bility for test-time optimization techniques such as MPC. In this work, we aim to build a world model in latent space instead of raw pixel space, enabling more precise planning and control. Pretrained Visual Representations: Significant advance- ments have been made in the field of visual representa- tion learning, where compact features that capture spatial and semantic information can be readily used for down- stream tasks. Pre-trained models like ImageNet pre-trained ResNet (He et al., 2016), I-JEPA (Assran et al., 2023), and DINO (Caron et al., 2021; Oquab et al., 2024) for images, as well as V-JEPA (Bardes et al., 2024) for videos, and R3M (Nair et al., 2022), MVP (Xiao et al., 2022) for robotics have allowed fast adaptation to downstream tasks as they contain rich spatial and semantic information. While many of these models represent images using a single global feature, the introduction of Vision Transformers (ViTs) (Dosovitskiy et al., 2021) has enabled the use of pre-trained patch fea- tures, as demonstrated by DINO (Caron et al., 2021; Oquab et al., 2024). DINO employs a self-distillation loss that allows the model to learn representations effectively, captur- ing semantic layouts and improving spatial understanding within images. In this work, we leverage DINOv2’s patch embeddings to train our world model, and demonstrate that it serves as a versatile encoder capable of handling various precise tasks. 3. DINO World Models Overview and Problem formulation: Our work follows the vision-based control task framework, which models the environment as a partially observable Markov decision process (POMDP). The POMDP is defined by the tuple (O, A, p), where O represents the observation space, and A denotes the action space. The dynamics of the environment is modeled by the transition distribution p(ot+1 | o≤t, a≤t), which predicts future observations based on past actions and observations. In this work, we aim to learn task-agnostic world models from precollected offline datasets, and use these world mod- els to perform visual reasoning and control at test time. At test time, our system starts from an arbitrary environment state and is provided with a goal observation in the form of an RGB image, in line with prior works (Ebert et al., 2018; Wu et al., 2020; Mendonca et al., 2023b), and is asked to perform a sequence of actions a0, ..., aT to reach the goal state. This approach differs from the world models used in online reinforcement learning (RL) where the objective is to optimize the rewards for a fixed set of tasks at hand (Hafner et al., 2024; Hansen et al., 2024), or from text-conditioned world models, where the goals are specified through text prompts (Du et al., 2023; Ko et al., 2023). 3.1. DINO-based World Models (DINO-WM) We model the dynamics of the environment in the latent space. More specifically, at each time step t, our world model consists of the following components: Observation model: zt ∼ encθ(zt | ot) Transition model: zt+1 ∼ pθ(zt+1 | zt−H:t, at−H:t) Decoder model: ˆot ∼ qθ(ot | zt) (optional for visualization) where the observation model encodes image observations to latent states zt, and the transition model takes in a history of past latent states of length H. The decoder model takes in a latent zt, and reconstructs the image observation ot. We use 3 DINO-WM: World Models on Pre-trained Visual Features enable Zero-shot Planning at at+1 aT−1 zt−k zt ̂zt+1 ̂zt+2 ̂zT pθ pθ pθ DINOv2 ot−k ⋯ot ⋯ ⋯ DINOv2 Planning loss og zg Actions optimized at test-time ⋯ Figure 2. Architecture of DINO-WM . Given observations ot−k:t, we optimize the sequence of actions at:T −1 to minimize the predicted loss to the desired goal og. All forward computation is done in the latent space z. Here pθ indicates DINO-WM ’s dynamics model, which is used for making future predictions. θ to denote the parameters of these models. Note that our decoder is entirely optional, as the training objectives for the decoder is independent for training the rest part of the world model. This eliminates the need to reconstruct images both during training and testing, which reduces computational costs compared to otherwise coupling together the training of the observational model and the decoder, as in (Micheli et al., 2023; Hafner et al., 2024). We ablate and show the effectiveness of this choice in Appendix A.4.3. DINO-WM models only the information available from offline trajectory data in an environment, in contrast to re- cent online RL world models that also require task-relevant information, such as rewards (Hafner et al., 2020; Hansen et al., 2022; 2024), discount factors (Hafner et al., 2022; Robine et al., 2023), and termination conditions (Micheli et al., 2023; Hafner et al., 2024). 3.1.1. O BSERVATION MODEL To learn a generic world model across many environments and the real world, we argue that the observation model should 1) be task and environment independent, and 2) capture rich spatial information for navigation and manip- ulation. Contrary to previous works where the observation model is always learned for the task at hand (Hafner et al., 2024), we argue instead that it can be inefficient and often not possible to learn a good observation model from scratch when facing a new environment, as perception is a general task that benefits from large-scale internet data. Therefore, we use the pre-trained DINOv2 model as our world model’s observation model, leveraging its strong spatial understand- ing for tasks like object detection, semantic segmentation, and depth estimation (Oquab et al., 2024). The observa- tion model remains frozen during training and testing. At each time step t, it encodes an image ot to patch embed- dings zt ∈ RN ×E, where N denotes the number of patches, and E denotes the embedding dimension. This process is visualized in Figure 2. 3.1.2. T RANSITION MODEL We adopt the ViT architecture (Dosovitskiy et al., 2021) for the transition model due to its suitability for processing patch features. We remove the tokenization layer, as it operates on patch embeddings, effectively transforming it into a decoder-only transformer. We further make a few modifications to the architecture to allow for additional conditioning on proprioception and controller actions. Our transition model takes in a history of past latent states zt−H:t−1 and actions at−H:t−1, where H is a hyperparam- eter denoting the context length of the model, and predicts the latent state at next time step zt. To properly capture the temporal dependencies, where the world state at time t should only depend on previous observations and actions, we implement a causal attention mechanism in the ViT model, enabling the model to predict latents autoregres- sively at a frame level. Specifically, each patch vector zit for the latent state zt attends to {zit−H:t−1}Ni=1. This is different from past work IRIS (Micheli et al., 2023) which similarly represents each observation as a sequence of vec- tors, but autoregressively predict zit at a token level, attend- ing to {zit−H:t−1}Ni=1 as well as {zit}