Learning Shared Dynamics with Meta-World Models

Lisheng Wu, Minne Li, Jun WangarXiv 2018

Abstract

Standard Reinforcement Learning (RL) agents often struggle with visual generalization, treating every new visual scene as a novel environment. This paper introduces a "Meta-World Model" framework that learns the underlying physics of an environment independently of its visual appearance. By training on multiple visually distinct versions of Atari Pong, the model learns to unify diverse visual inputs into a single shared latent representation of dynamics. The proposed architecture demonstrates successful cross-decoding between environments and exhibits a form of artificial self-awareness by distinguishing controlled entities from opponents through mirrored dynamics.

Introduction

Reinforcement Learning is notoriously data-hungry because agents typically fail to recognize that the "physics" of a world—how objects move and interact—remains constant even if lighting, colors, or perspectives change. While traditional World Models learn internal simulations of an environment, they are usually specialized to a single visual task. This research addresses the challenge of building AI that captures shared dynamics across visually diverse environments, allowing for a more robust, human-like understanding of the world where a player can generalize their skills regardless of visual "skinning."

Methods

The architecture builds upon the World Model framework (Ha & Schmidhuber, 2018), which utilizes a Vision Model (V) for image compression and a Memory Model (M) for state prediction. The "Meta" approach introduces several key innovations:

  • Shared Memory, Separate Vision: A single global Memory Model (LSTM) learns the core dynamics, while each environment variant is assigned its own Vision Model (VAE).
  • Latent Unification: To ensure different Vision Models utilize a consistent latent space, Maximum Mean Discrepancy (MMD) loss is employed to regularize latent distributions across environments.
  • Cross-Decoding Validation: The model's ability to unify worlds is tested by encoding a frame from one environment and decoding it using the decoder of another. Success in this task proves the model has successfully abstracted the game's state from its visual representation.
The Meta-World Model architecture showing (a) reconstruction through VAEs and (b) prediction using a shared LSTM memory model.

Experimental Setup

The study utilizes Atari Pong as a baseline and introduces five "mutant" variants to test the model's generalization capabilities:

  1. Transposed ($\Gamma_t$): Rotated 90° and flipped.
  2. Horizontal-swapped ($\Gamma_h$): Left and right halves of the screen are swapped.
  3. Inverse ($\Gamma_c$): Background and foreground colors are inverted.
  4. Mirror-symmetric ($\Gamma_m$): A standard horizontal flip.
  5. Vertical-swapped ($\Gamma_v$): Top and bottom halves are swapped, introducing non-standard "teleportation" dynamics.
Visual variants of the Atari Pong environment used to test the model's ability to learn shared dynamics across diverse appearances.

Key Insights and Results

  • Successful Cross-Decoding: Transformation loss converged to levels comparable to standard reconstruction loss, indicating the model could accurately "visualize" states in one world based on inputs from another.
  • Latent Sparsity: Analysis revealed that only a small subset of latent neurons (specifically indices 7, 13, 19, 20, and 21) carried the essential physics information (paddle and ball positions), while others captured static features or noise.
  • Digital Mirror Test: By training on mirrored versions, the agent learned to distinguish its own paddle from the opponent's by correlating its actions with movements in the latent space—effectively passing a digital version of the Mirror Self-Recognition (MSR) test.
  • Robustness and Limits: The model ignored drastic pixel changes (like color inversion) but struggled with the Vertical-swapped variant. The "teleportation" of paddles introduced topological changes that were harder to unify than simple visual transformations.

Conclusion and Future Work

The Meta-World Model successfully demonstrates that shared dynamics can be learned across visually disparate tasks without explicit correspondence between states. While currently limited to variants of a single game, future work aims to integrate these models with model-free RL to accelerate learning on novel tasks and apply the framework to more complex, multi-modal environments beyond Atari.

Summary updated

BibTeX
@misc{wu2018learning,
  author = {Lisheng Wu and Minne Li and Jun Wang},
  title = {{Learning Shared Dynamics with Meta-World Models}},
  year = {2018},
  eprint = {1811.01741},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.01741},
}
Figure