Masked World Models for Visual Control

Younggyo Seo, Danijar Hafner, Hao Liu, Fangchen Liu, Stephen James, Kimin Lee, Pieter Abbeel

Abstract

Visual model-based reinforcement learning (RL) has the potential to enable sample-efficient robot learning from visual observations. Yet the current approaches typically train a single model end-to-end, which often struggles to capture the fine-grained visual details necessary for high-precision tasks. We present Masked World Models (MWM), a framework that decouples visual representation learning from dynamics learning. By utilizing a masked autoencoder with convolutional features and an auxiliary reward prediction task, MWM captures essential spatial details, significantly outperforming state-of-the-art end-to-end models like DreamerV2.

Introduction

In the quest to make robots as capable as humans, visual model-based reinforcement learning (MBRL) is a front-runner. The core idea is to teach a robot to build an internal "world model" of its environment and then use that model to imagine the outcomes of its actions. However, standard approaches often stumble when tasks require high precision—like picking up a tiny needle or pressing a small button.

Most current visual MBRL agents, such as the Dreamer series, are trained end-to-end. This creates a fundamental trade-off: the model struggles to balance learning broad environmental dynamics with the tiny, high-frequency visual details needed to interact with small objects. Masked World Models (MWM) proposes a decoupled architecture to resolve this "blurry vision" problem.

Methods: Decoupling Representation and Dynamics

MWM introduces a two-stage framework that separates the learning of visual features from the learning of temporal transitions.

The MWM architecture decouples visual representation learning via masked convolutional features from dynamics learning.

Visual Representation Learning

Instead of standard pixel-patch masking, MWM uses a Convolutional Stem. It processes the image through initial convolutional layers, then masks out these convolutional features before passing them to a Vision Transformer (ViT). This allows the model to capture fine-grained spatial details that pixel-level masking might miss. A high masking ratio (75%) is used to force the model to build a robust internal representation rather than finding simple interpolation shortcuts.

Auxiliary Reward Prediction

To ensure the latent space is task-relevant, the autoencoder is tasked with predicting the immediate reward alongside reconstructing the image. This "focus mechanism" ensures the model pays attention to task-critical objects, even if they occupy only a few pixels in the original observation.

Latent Dynamics Learning

Once the visual encoder is trained, its parameters are frozen. A separate latent dynamics model (a variant of the Recurrent State Space Model) is then trained to predict how these frozen representations evolve over time based on the robot's actions.

Evaluation and Results

The researchers evaluated MWM on three major benchmarks: Meta-world (50 distinct manipulation tasks), RLBench (high-precision tasks with sparse rewards), and the DeepMind Control Suite.

Examples of high-precision manipulation tasks from Meta-world and RLBench used for evaluation.

MWM demonstrated a significant leap over the previous state-of-the-art, DreamerV2:

  • Meta-world Success: MWM achieved an 81.7% success rate across 50 tasks, compared to DreamerV2’s 67.9%.
  • Precision Tasks: On the "Pick Place" task in Meta-world, MWM achieved over 80% success, while DreamerV2 essentially failed to solve it.
  • RLBench Performance: In the "Reach Target" task, MWM solved it with >80% success, while the baseline struggled to stay above 20%.
  • Qualitative Superiority: Visualizations show that MWM’s predicted future frames accurately track small target objects, whereas end-to-end models often lose the object entirely as the sequence progresses.

Conclusion

MWM demonstrates that decoupling vision from dynamics avoids the optimization interference that plagues end-to-end models. By allowing the vision system to focus on pixels and the dynamics system to focus on transitions, robots can achieve the precision necessary for complex manipulation. Future work may involve pre-training the visual encoder on massive video datasets to further improve sample efficiency and bring us closer to "plug-and-play" robotic intelligence.

Summary updated

BibTeX
@inproceedings{seo2022masked,
  author = {Younggyo Seo and Danijar Hafner and Hao Liu and Fangchen Liu and Stephen James and Kimin Lee and Pieter Abbeel},
  title = {{Masked World Models for Visual Control}},
  booktitle = {Conference on Robot Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=e5zzPG1435},
}
Figure