Reinforcement World Model Learning for LLM-based Agents
Xiao Yu, Baolin Peng, Ruize Xu, Yelong Shen, Pengcheng He, Suman Nath, Nikhil Singh, Jiangfeng Gao, Zhou Yu
TL;DR
RWML introduces a self-supervised method to endow LLM-based agents with robust world knowledge by learning action-conditioned transitions through sim-to-real alignment in a pretrained embedding space. By optimizing a cosine-similarity reward between predicted and observed next states via GRPO, RWML avoids brittle next-token prediction and scales without expert data. Empirical results on ALFWorld and τ^2 Bench show substantial performance gains, and when combined with task-success RL, RWML surpasses baselines and matches expert-data training, while exhibiting less forgetting and more stable parameter updates. The approach demonstrates that strengthening internal world models prior to policy RL can markedly improve long-horizon decision-making in agentic settings. This work paves the way for scalable, self-supervised pretraining of environment understanding to enhance LLM-driven agents in complex tasks.
Abstract
Large language models (LLMs) have achieved strong performance in language-centric tasks. However, in agentic settings, LLMs often struggle to anticipate action consequences and adapt to environment dynamics, highlighting the need for world-modeling capabilities in LLM-based agents. We propose Reinforcement World Model Learning (RWML), a self-supervised method that learns action-conditioned world models for LLM-based agents on textual states using sim-to-real gap rewards. Our method aligns simulated next states produced by the model with realized next states observed from the environment, encouraging consistency between internal world simulations and actual environment dynamics in a pre-trained embedding space. Unlike next-state token prediction, which prioritizes token-level fidelity (i.e., reproducing exact wording) over semantic equivalence and can lead to model collapse, our method provides a more robust training signal and is empirically less susceptible to reward hacking than LLM-as-a-judge. We evaluate our method on ALFWorld and $τ^2$ Bench and observe significant gains over the base model, despite being entirely self-supervised. When combined with task-success rewards, our method outperforms direct task-success reward RL by 6.9 and 5.7 points on ALFWorld and $τ^2$ Bench respectively, while matching the performance of expert-data training.
