Disentangled World Models: Learning to Transfer Semantic Knowledge from Distracting Videos for Reinforcement Learning

Qi Wang, Zhipeng Zhang, Baao Xie, Xin Jin, Yunbo Wang, Shiyu Wang, Liaomo Zheng, Xiaokang Yang, Wenjun Zeng · OpenReview

TL;DR

This paper introduces Disentangled World Models (DisWM), a novel framework that leverages "distracting" videos to pre-train a world model. This pre-training transfers semantic knowledge, significantly improving sample efficiency and robustness for reinforcement learning agents in new, potentially visually varied environments.

What Problem Does This Paper Address?

Reinforcement learning (RL) agents, especially those learning from visual input, often struggle with sample efficiency. This means they require a vast amount of data to learn effective policies. This problem is exacerbated in real-world scenarios where environments can be volatile and visually complex, with minor changes (like lighting or object appearance) leading to significant performance degradation. Existing methods that try to address this by learning "disentangled" representations (i.e., separating different factors of variation) typically start from scratch, lacking any prior understanding of the world. This paper tackles the challenge of how to equip RL agents with a foundational understanding of the world before they encounter a specific task, thereby improving their ability to learn quickly and adapt to variations.

Methods

The core of Disentangled World Models (DisWM) lies in a two-phase approach:

  1. Disentangled Representation Pretraining (Offline):
    • The framework first trains an action-free video prediction model on a large dataset of "distracting" videos. These videos are chosen because they contain diverse visual variations but don't necessarily relate to the target task.
  2. A key technique here is disentanglement regularization. This encourages the model to learn a latent representation where different dimensions capture distinct factors of variation (e.g., object color, background, object position) independently. This is achieved using a modified B-VAE (beta-Variational Autoencoder) architecture.
  3. The goal is to extract general semantic knowledge about visual variations from these distracting videos.
  4. Offline-to-Online Latent Distillation and World Model Adaptation (Online):
    • The learned disentangled representations from the pre-trained model are then transferred to a world model for the downstream task. This transfer happens via latent distillation, where the latent distributions of the pre-trained model and the new world model are encouraged to be similar. This bridges the gap between the general knowledge and the specific task.
  5. The world model is then finetuned online in the target environment. Crucially, it's equipped with dual constraints:
  6. Disentanglement Regularization: This constraint is applied to the world model's latent representations to maintain the disentangled nature learned during pre-training.
  7. Latent Distillation: This continues to enforce the transfer of knowledge from the pre-trained model.
  8. The incorporation of actions and rewards from online interactions during finetuning further enriches the data diversity, strengthening the disentangled representation learning.

Datasets

  • Distracting Videos: The paper uses videos from the DeepMind Control Suite (DMC) as a source of distracting videos for pre-training. These videos are modified with color distractors.
  • Downstream Tasks: The framework is evaluated on tasks from:
  • DeepMind Control Suite (DMC): Specifically, tasks like Walker Walk, Cheetah Run, Hopper Stand, Finger Spin, and Cartpole Swingup.
  • MuJoCo Pusher: A robotic manipulation task.
  • DrawerWorld: A benchmark modified to evaluate texture adaptability.

The paper highlights that the pre-training videos do not need to be from the same domain as the downstream tasks, demonstrating cross-domain transfer.

Key Insights and Ideas

  • Leveraging "Distracting" Data: The core idea is that diverse, even irrelevant, visual data can be incredibly valuable for learning robust, disentangled representations of visual variations. This "distracting" data acts as a rich source of prior knowledge.
  • Pretraining for Generalization: By pre-training a world model on general visual variations, the agent gains a foundational understanding that makes it more adaptable to new tasks and less susceptible to minor environmental changes.
  • Bridging Domains with Latent Distillation: Latent distillation is a crucial mechanism for transferring the learned disentangled representations from the pre-trained model to the downstream task's world model, even when the domains differ significantly.
  • Dual Constraints for Robustness: Applying both disentanglement regularization and latent distillation during the online finetuning phase ensures that the world model not only learns the task but also retains and refines its ability to understand underlying visual factors.

Key Results

  • Improved Sample Efficiency: DisWM consistently outperforms strong baselines like DreamerV2, APV, and TED in terms of sample efficiency, meaning it achieves higher performance with fewer environment interactions. For example, in the "Cheetah Run → Walker Walk" task, DisWM shows significantly faster learning curves.
  • Robustness to Variations: The framework demonstrates superior performance, especially in scenarios with large data distribution shifts between source and target domains, where other methods struggle.
  • Effective Disentanglement: Qualitative results (Figure 5 and 6) show that the pre-trained model successfully disentangles various visual attributes (color, object, background), and the finetuned world model can also disentangle these variations in the target task.
  • Cross-Domain Transfer: DisWM benefits from pretraining even when the distracting videos are from different environments than the target task (e.g., using DMC frames for MuJoCo Pusher).

Limitations and Future Work

  • Complex Environments: The authors acknowledge that disentangled representation learning can still be challenging in highly complex environments.
  • Non-Stationary Environments: They suggest that exploring non-stationary environments with more intricate variations, such as time-varying backgrounds, could further highlight the potential of their approach.
  • Hyperparameter Sensitivity: While not explicitly stated as a limitation, the sensitivity analyses (Figure 7) suggest that hyperparameters like the disentanglement scale ($\beta$) and latent distillation weight ($\eta$) require careful tuning for optimal performance. Future work could explore more automated or robust hyperparameter selection methods.

Summary updated

BibTeX
@inproceedings{wang2025disentangled,
  author = {Qi Wang and Zhipeng Zhang and Baao Xie and Xin Jin and Yunbo Wang and Shiyu Wang and Liaomo Zheng and Xiaokang Yang and Wenjun Zeng},
  title = {{Disentangled World Models: Learning to Transfer Semantic Knowledge from Distracting Videos for Reinforcement Learning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure