Context and Diversity Matter: The Emergence of In-Context Learning in World Models
Fan Wang, ZHIYUAN CHEN, YUXUAN ZHONG, Sunjian Zheng, Pengtao Shao, Bo Yu, Shaoshan Liu, Jianan Wang, Ning Ding, Yang Cao, Yu Kang
Abstract
The capability of predicting environmental dynamics underpins both biological neural systems and general embodied AI in adapting to their surroundings. Yet prevailing approaches rest on static world models that falter when confronted with novel or rare configurations. We investigate in-context learning (ICL) of world models, shifting attention from zero-shot performance to the growth and asymptotic limits of the world model. Our contributions are three-fold: (1) we formalize ICL of a world model and identify two core mechanisms: environment recognition (ER) and environment learning (EL); (2) we derive error upper-bounds for both mechanisms that expose how the mechanisms emerge; and (3) we empirically confirm that distinct ICL mechanisms exist in the world model, and we further investigate how data distribution and model architecture affect ICL in a manner consistent with theory. These findings demonstrate the potential of self-adapting world models and highlight the key factors behind the emergence of EL/ER, most notably the necessity of long context and diverse environments. The codes are available at https://github.com/airs-cuhk/airsoul/ tree/main/projects/MazeWorld .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers1
Ask how each one uses itBuilds on41
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Dream to Control: Learning Behaviors by Latent ImaginationDanijar Hafner, Timothy P. Lillicrap, Jimmy Ba, Mohammad NorouziICLR 2020 · 1,852 citations
- An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 citations
- Model Based Reinforcement Learning for AtariLukasz Kaiser, Mohammad Babaeizadeh, Piotr Milos, Blazej Osinski et al.ICLR 2020 · 969 citations
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
Related papers
- Investigating the Pre-Training Dynamics of In-Context Learning: Task Recognition vs. Task LearningXiaolei Wang, Xinyu Tang, Junyi Li, Xin Zhao et al.ICLR 2025
- World Model Implanting for Test-time Adaptation of Embodied AgentsMinjong Yoo, Jinwoo Jang, Sihyung Yoon, Honguk WooICML 2025
- Test-Time Mixture of World Models for Embodied Agents in Dynamic EnvironmentsJinwoo Jang, Minjong Yoo, Sihyung Yoon, Honguk WooICLR 2026 · 2 citations
- Dynamics-Aligned Latent Imagination in Contextual World Models for Zero-Shot GeneralizationFrank Röder, Jan Benad, Manfred Eppe, Pradeep Kr. BanerjeeNeurIPS 2025 · 9 citations
- Self-ICL: Zero-Shot In-Context Learning with Self-Generated DemonstrationsWei-Lin Chen, Cheng-Kuang Wu, Yun-Nung Chen, Hsin-Hsi ChenEMNLP 2023 · 8 citations
