Dynamics-Aligned Latent Imagination in Contextual World Models for Zero-Shot Generalization

Frank Röder, Jan Benad, Manfred Eppe, Pradeep Kr. Banerjee
8/27/2025
cs.LGcs.AI

No official code found. Best implementation: frankroeder/DALI (6 stars, MIT, last commit 2026-01-17).

Abstract

Real-world reinforcement learning demands adaptation to unseen environmental conditions without costly retraining. Contextual Markov Decision Processes (cMDP) model this challenge, but existing methods often require explicit context variables (e.g., friction, gravity), limiting their use when contexts are latent or hard to measure. We introduce Dynamics-Aligned Latent Imagination (DALI), a framework integrated within the Dreamer architecture that infers latent context representations from agent-environment interactions. By training a self-supervised encoder to predict forward dynamics, DALI generates actionable representations conditioning the world model and policy, bridging perception and control. We theoretically prove this encoder is essential for efficient context inference and robust generalization. DALI's latent space enables counterfactual consistency: Perturbing a gravity-encoding dimension alters imagined rollouts in physically plausible ways. On challenging cMDP benchmarks, DALI achieves significant gains over context-unaware baselines, often surpassing context-aware baselines in extrapolation tasks, enabling zero-shot generalization to unseen contextual variations.

View on arXivView PDF

Code Implementations(1)

frankroeder/DALICommunity71%
MIT

Dynamics-Aligned Latent Imagination in Contextual World Models for Zero-Shot Generalization

61Shell, PythonJun 16, 20259 months agoMIT
contextual-reinforcement-learningcounterfactual-consistencycounterfactualsdreamerneurips-2025+3 more

Similar Papers

Cite this paper

@article{rder2025dynamicsaligned,
  title  = {Dynamics-Aligned Latent Imagination in Contextual World Models for Zero-Shot Generalization},
  author = {Frank Röder and Jan Benad and Manfred Eppe and Pradeep Kr. Banerjee},
  year   = {2025},
  eprint = {2508.20294},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.20294v1},
  journal = {NEURIPS 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.20294.svg)](https://codeofpaper.com/paper/2508.20294)

Discussion