arXiv:2510.15047cs.LGcs.CL2025-10被引 26

让语言模型学会模拟环境,提升复杂任务中的决策能力。

Internalizing World Models via Self-Play Finetuning for Agentic RL

  • 用自对弈监督微调构建内部世界模型,分状态表征与动态预测两部分。
  • 在Sokoban和FrozenLake任务中,成功率从25.6%提升至59.8%,显著改善。
  • 适合追求鲁棒智能体的RL研究者,尤其关注真实场景泛化问题。

大型语言模型作为智能体在分布外(OOD)场景下表现不佳。现实环境复杂多变,受特定任务规则与随机性驱动,使语言模型难以将其内部知识与环境动态对齐。在这些条件下,传统强化学习训练难以扩展;我们观察到Pass@k——即从k条采样轨迹中至少有一条成功概率——随训练步骤显著下降,表明探索脆弱且泛化能力有限。受基于模型的强化学习启发,我们假设赋予语言模型内部世界模型可更好对齐推理与环境动态,从而提升决策能力。我们提出将世界模型分解为状态表示与转移建模两部分,并引入SPA框架:先通过自对弈监督微调冷启动策略,学习环境交互中的世界模型,再利用该模型在策略优化前模拟未来状态。此简单初始化方法优于在线世界建模基线,大幅提高基于强化学习的智能体性能。在Sokoban、FrozenLake和Sudoku等多样化环境中实验显示,该方法显著提升表现。例如,SPA将Qwen2.5-1.5B-Instruct模型在Sokoban任务的成功率从25.6%提升至59.8%,在FrozenLake任务中从22.1%提升至70.9%。

原文摘要 · Abstract (English)

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.

强化学习世界模型智能体自对弈

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。