HarmonyDream: Task Harmonization Inside World Models
Haoyu Ma, Jialong Wu, Ningya Feng, Chenjun Xiao, Dong Li, Jianye Hao, Jianmin Wang, Mingsheng Long
TL;DR
HarmonyDream investigates the dual-task nature of world models in model-based RL, identifying that domination by either observation or reward modeling can hamper sample efficiency. It proposes a lightweight harmonization mechanism, using learnable loss scales with a rectified harmonic loss, to dynamically balance the two tasks during world-model learning. Empirically, HarmonyDream improves DreamerV2 by 10–69% on visual robotic tasks and achieves a new state-of-the-art 136.5% mean human performance on Atari 100K, while also generalizing to DreamerV3 and DreamerPro. The work advances understanding of the multi-task essence of world models and offers a simple, robust method to exploit it for improved sample efficiency across diverse domains.
Abstract
Model-based reinforcement learning (MBRL) holds the promise of sample-efficient learning by utilizing a world model, which models how the environment works and typically encompasses components for two tasks: observation modeling and reward modeling. In this paper, through a dedicated empirical investigation, we gain a deeper understanding of the role each task plays in world models and uncover the overlooked potential of sample-efficient MBRL by mitigating the domination of either observation or reward modeling. Our key insight is that while prevalent approaches of explicit MBRL attempt to restore abundant details of the environment via observation models, it is difficult due to the environment's complexity and limited model capacity. On the other hand, reward models, while dominating implicit MBRL and adept at learning compact task-centric dynamics, are inadequate for sample-efficient learning without richer learning signals. Motivated by these insights and discoveries, we propose a simple yet effective approach, HarmonyDream, which automatically adjusts loss coefficients to maintain task harmonization, i.e. a dynamic equilibrium between the two tasks in world model learning. Our experiments show that the base MBRL method equipped with HarmonyDream gains 10%-69% absolute performance boosts on visual robotic tasks and sets a new state-of-the-art result on the Atari 100K benchmark. Code is available at https://github.com/thuml/HarmonyDream.
