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 · DOI

Abstract

Visual Reinforcement Learning (RL) often struggles with sample efficiency and robustness when faced with visual "distractions" such as changes in lighting or textures. We present Disentangled World Models (DisWM), a framework designed to leverage unlabeled, action-free "distracting videos" to pretrain agents. By learning to separate independent factors of variation and distilling this knowledge into a task-specific world model, DisWM significantly improves sample efficiency and enables robust cross-domain transfer in complex visual environments.

Introduction

Standard visual RL agents frequently fail to generalize when environmental appearances change, as they often conflate task-relevant features (e.g., robot position) with task-irrelevant distractors (e.g., background color). While Disentangled Representation Learning (DRL) offers a potential solution, training such models from scratch in a new environment is computationally expensive and data-intensive. DisWM addresses this by asking whether semantic knowledge about the world's physical "rules" can be extracted from existing, action-free videos before an agent begins its specific task.

Methodology

The DisWM framework operates through three primary stages:

  1. Disentangled Representation Pretraining: The model is trained on "distracting videos" containing various environmental configurations without action or reward labels. Using a $\beta$-VAE-based video prediction model, it learns a latent space where semantic attributes are disentangled.
  2. Offline-to-Online Latent Distillation: To bridge the gap between pretraining and task-specific learning, Latent Distillation is employed. This process minimizes the KL divergence between the pretrained knowledgeable latent space and the new task-specific world model, preventing the loss of learned semantic structures.
  3. Disentangled World Model Adaptation: Finally, the agent is trained in the target environment using an action-conditioned model that incorporates reward prediction while maintaining disentanglement constraints.
Overview of the DisWM framework, showing the transition from offline pretraining on distracting videos to online task-specific finetuning via latent distillation.

Experimental Setup

DisWM was evaluated on several benchmarks, including the DeepMind Control Suite (DMC) with randomized color distractors, MuJoCo Pusher for cross-domain transfer, and DrawerWorld for texture adaptability. Pretraining utilized a dataset of 1 million frames of unlabeled video from diverse environments to serve as the foundational knowledge base.

Results

DisWM demonstrates significant improvements in sample efficiency and robustness compared to state-of-the-art baselines like DreamerV2 and APV.

Performance comparison of DisWM against baselines across multiple transfer tasks, showing superior sample efficiency and episode returns.

Key findings include:

  • Superior Sample Efficiency: In the Reacher Easy → Cheetah Run task, DisWM achieved a score of 817, significantly outperforming the next best baseline, DreamerV3 (662).
  • Robustness to Domain Shift: On the difficult Walker Walk → Humanoid Walk transfer, DisWM maintained performance (147) while other baselines failed with scores near 1.
  • Qualitative Disentanglement: Latent traversals confirmed that DisWM successfully isolated attributes like robot arm color and background color into independent latent dimensions.
  • Model Efficiency: DisWM achieves these results with only 5.8M parameters, roughly half the size of DreamerV2 (12.1M).

Conclusion

DisWM provides a powerful method for transferring semantic knowledge from unlabeled video data to RL agents. While highly effective against static visual distractors, future work will explore scaling this approach to more complex, non-stationary environments and "in-the-wild" video data where variations are less controlled.

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