Web Agents with World Models: Learning and Leveraging Environment Dynamics in Web Navigation

Hyungjoo Chae, Namyoung Kim, Kai Tzu-iunn Ong, Minju Gwak, Gwanwoo Song, Jihoon Kim, Sunghwan Kim, Dongha Lee, Jinyoung Yeo

TL;DR

Current Large Language Model (LLM)-based web agents often fail because they lack a "world model"—the ability to foresee the consequences of their actions before committing to them. This paper introduces the World-Model-Augmented (WMA) agent, which uses a specialized world model to simulate action outcomes in natural language. This approach leads to significant performance gains and superior cost-efficiency compared to state-of-the-art tree-search methods.

What Problem Does This Paper Address?

While LLMs are increasingly used as autonomous web agents, they struggle with long-horizon tasks and "irreversible" mistakes (e.g., accidentally clicking a non-refundable "Buy" button). Humans naturally avoid these pitfalls by mentally simulating the future before acting.

The authors' preliminary analysis reveals two critical gaps in current systems:

  1. Absence of World Models: Even state-of-the-art models like GPT-4o and Claude-3.5-Sonnet are surprisingly poor at predicting the next state of a webpage after an action is taken, performing barely above random chance.
  2. The "Outcome" Advantage: If you provide an LLM with the actual next state of several candidate actions, its ability to select the correct action improves dramatically—by up to 38%.
Accuracy improvement with next state information

The challenge lies in training an LLM to act as a world model. Naively predicting the next raw HTML or accessibility tree is computationally expensive and suffers from "low information gain," as the vast majority of a webpage remains identical between steps.

Methods

To overcome these challenges, the authors propose a three-step framework to build and leverage a world model:

The World-Model-Augmented (WMA) framework
  1. Harvesting Trajectories: The researchers collect agent-environment interaction data from web navigation benchmarks like WebArena and Mind2Web.
  2. Transition-focused Observation Abstraction: This is the core innovation. Instead of predicting the entire next state, the model is trained to predict a free-form natural language description of the changes between states. They use the Hungarian algorithm to match elements between time steps and identify what was ADDED, DELETED, or UPDATED. An LLM then converts these "diffs" into a concise summary (e.g., "The 'To' textbox will now have focus...").
  3. Inference-time Policy Optimization: During navigation, the agent:
  4. Samples $k$ candidate actions from a frozen policy model.
  5. Uses the trained World Model (a Llama-3.1-8B) to simulate the outcome of each action.
  6. Uses a Value Function (another LLM) to score these simulated outcomes.
  7. Executes the action with the highest estimated reward.

Key Insights and Ideas

  • Predicting Diffs > Predicting States: By focusing on the transition rather than the full state, the world model avoids the "excessively long sequence length" problem of HTML and focuses its attention on the elements that actually change.
  • Simulation is Cheaper than Exploration: Unlike tree-search agents that must actually execute multiple paths in the live environment (which is slow and expensive), WMA simulates these paths internally. This makes WMA 6.8x cheaper and 5.3x faster than competitive tree-search baselines.
  • Zero-Shot Policy Improvement: The world model improves the agent's performance without any fine-tuning of the underlying policy model (e.g., GPT-4o). It acts as a plug-and-play "look-ahead" module.

Key Results

The researchers evaluated their approach on two major benchmarks: WebArena (a highly realistic environment with 812 tasks) and Mind2Web (a large-scale dataset covering over 2,000 tasks across 137 websites).

  • New SOTA on Mind2Web: WMA achieved a Success Rate (SR) of 25.4% on cross-task tests, nearly doubling the performance of the previous best method (AWM at 15.3%).
  • WebArena Gains: On WebArena, WMA provided a +29.7% relative improvement over vanilla Chain-of-Thought (CoT) for GPT-4o.
  • Domain Specifics: The model showed massive gains in structured domains like Gitlab (+181%) and Maps (+92%), though improvements in Shopping were more modest due to the vast and diverse state space of product listings.

Limitations and Future Work

  • Counterfactual Imagination: The most common error type for the world model (42% of errors) is "imagining" elements that shouldn't exist (e.g., hallucinating a specific product in a store).
  • Multi-step Drift: While effective for one-step look-ahead, prediction errors accumulate quickly when trying to plan many steps into the simulated future.
  • Multimodal Potential: The current work is primarily text-based (accessibility trees). The authors briefly experimented with a multimodal version (using Qwen2-VL) and found that adding visual information further boosted Success Rates on Mind2Web from 25.4% to 36.7%, suggesting a highly promising path for future research.

Summary updated

BibTeX
@inproceedings{chae2025web,
  author = {Hyungjoo Chae and Namyoung Kim and Kai Tzu-iunn Ong and Minju Gwak and Gwanwoo Song and Jihoon Kim and Sunghwan Kim and Dongha Lee and Jinyoung Yeo},
  title = {{Web Agents with World Models: Learning and Leveraging Environment Dynamics in Web Navigation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=moWiYJuSGF},
}
Figure