Internalizing World Models via Self-Play Finetuning for Agentic RL

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chen, Shiqi, Zhu, Tongyao, Wang, Zian, Zhang, Jinghan, Wang, Kangrui, Gao, Siyang, Xiao, Teng, Teh, Yee Whye, He, Junxian, Li, Manling
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908598590767104
author Chen, Shiqi
Zhu, Tongyao
Wang, Zian
Zhang, Jinghan
Wang, Kangrui
Gao, Siyang
Xiao, Teng
Teh, Yee Whye
He, Junxian
Li, Manling
author_facet Chen, Shiqi
Zhu, Tongyao
Wang, Zian
Zhang, Jinghan
Wang, Kangrui
Gao, Siyang
Xiao, Teng
Teh, Yee Whye
He, Junxian
Li, Manling
contents Large Language Models (LLMs) as agents often struggle in out-of-distribution (OOD) scenarios. Real-world environments are complex and dynamic, governed by task-specific rules and stochasticity, which makes it difficult for LLMs to ground their internal knowledge in those dynamics. Under such OOD conditions, vanilla RL training often fails to scale; we observe Pass@k--the probability that at least one of (k) sampled trajectories succeeds--drops markedly across training steps, indicating brittle exploration and limited generalization. Inspired by model-based reinforcement learning, we hypothesize that equipping LLM agents with an internal world model can better align reasoning with environmental dynamics and improve decision-making. We show how to encode this world model by decomposing it into two components: state representation and transition modeling. Building on this, we introduce SPA, a simple reinforcement learning framework that cold-starts the policy via a Self-Play supervised finetuning (SFT) stage to learn the world model by interacting with the environment, then uses it to simulate future states prior to policy optimization. This simple initialization outperforms the online world-modeling baseline and greatly boosts the RL-based agent training performance. Experiments across diverse environments like Sokoban, FrozenLake, and Sudoku show that our approach significantly improves performance. For example, SPA boosts the Sokoban success rate from 25.6% to 59.8% and raises the FrozenLake score from 22.1% to 70.9% for the Qwen2.5-1.5B-Instruct model.
format Preprint
id arxiv_https___arxiv_org_abs_2510_15047
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Internalizing World Models via Self-Play Finetuning for Agentic RL
Chen, Shiqi
Zhu, Tongyao
Wang, Zian
Zhang, Jinghan
Wang, Kangrui
Gao, Siyang
Xiao, Teng
Teh, Yee Whye
He, Junxian
Li, Manling
Machine Learning
Computation and Language
Large Language Models (LLMs) as agents often struggle in out-of-distribution (OOD) scenarios. Real-world environments are complex and dynamic, governed by task-specific rules and stochasticity, which makes it difficult for LLMs to ground their internal knowledge in those dynamics. Under such OOD conditions, vanilla RL training often fails to scale; we observe Pass@k--the probability that at least one of (k) sampled trajectories succeeds--drops markedly across training steps, indicating brittle exploration and limited generalization. Inspired by model-based reinforcement learning, we hypothesize that equipping LLM agents with an internal world model can better align reasoning with environmental dynamics and improve decision-making. We show how to encode this world model by decomposing it into two components: state representation and transition modeling. Building on this, we introduce SPA, a simple reinforcement learning framework that cold-starts the policy via a Self-Play supervised finetuning (SFT) stage to learn the world model by interacting with the environment, then uses it to simulate future states prior to policy optimization. This simple initialization outperforms the online world-modeling baseline and greatly boosts the RL-based agent training performance. Experiments across diverse environments like Sokoban, FrozenLake, and Sudoku show that our approach significantly improves performance. For example, SPA boosts the Sokoban success rate from 25.6% to 59.8% and raises the FrozenLake score from 22.1% to 70.9% for the Qwen2.5-1.5B-Instruct model.
title Internalizing World Models via Self-Play Finetuning for Agentic RL
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2510.15047