Introduction
The development of digital agents capable of autonomously navigating web and mobile interfaces is a cornerstone of modern AI research. However, training these agents requires massive quantities of high-quality interaction trajectories. Current data collection methods face a significant bottleneck: human annotation is prohibitively slow—designing a few hundred tasks can take thousands of hours—and executing agents in live environments is often hampered by network latency and infrastructure instability.
Furthermore, agents trained on a narrow set of real-world environments often struggle with the diversity of the open web. To overcome these limitations, we present UI-Simulator, a framework that utilizes Large Language Models (LLMs) as scalable, general-purpose world models to synthesize diverse training data.
UI-Simulator: LLMs as World Models
UI-Simulator capitalizes on the fact that LLMs are pre-trained on vast amounts of structural code and procedural knowledge (e.g., HTML, WikiHow, How-To-Geek). This pre-training allows LLMs to internally learn the dynamics of the UI digital world without additional fine-tuning.
The simulation process follows a structured three-step pipeline:
- Overview Prediction: The LLM predicts a high-level summary of the next state (e.g., "a checkout page").
- Rich Draft Generation: The model generates a detailed natural language description of all UI elements.
- Structured Formatting: This draft is converted into a structured accessibility tree, providing the agent with a text-based representation of the UI including spatial coordinates.
The system can operate in two distinct modes to balance creativity and grounding:
- Retrieval-Free Simulator: Generates creative next states purely from the LLM's internal knowledge, maximizing diversity.
- Retrieval-Augmented Simulator: Uses a limited amount of prior experience from the target environment to ground the synthesis, improving accuracy in specific domains.
UI-Simulator-Grow: Targeted Scaling
To further optimize training, we introduce UI-Simulator-Grow, a strategy for "targeted scaling." Rather than generating data indiscriminately, this method identifies "Goldilocks" tasks—those that are neither trivial nor impossible for the current agent. By focusing synthesis on tasks within the 25th–75th percentile of difficulty (measured by teacher-forcing loss), UI-Simulator-Grow accelerates agent improvement and achieves higher data efficiency than standard scaling.
Evaluation and Key Results
We evaluated the framework on the WebArena and AndroidWorld benchmarks, training 8B-parameter student models (Llama-3 and Qwen-2.5) using GPT-4o-mini as the teacher simulator.
- Superior Performance: Agents trained on simulated environments frequently outperformed those trained on real-world data. This is attributed to the "imagined" environments' greater diversity, which prevents the agent from over-fitting to specific test accounts or layouts.
- Scaling Efficiency: UI-Simulator-Grow achieved performance parity with standard scaling while using only 66% of the training data.
- Matching Large Models: On WebArena, a Llama-3-8B agent trained with our targeted scaling matched the success rate (7.14%) of the much larger Llama-3-70B-Instruct model.
- Robustness: The agents demonstrated significantly higher robustness to UI perturbations, such as shuffled layouts, compared to baselines.
Conclusion and Future Work
UI-Simulator proves that LLMs can act as effective, scalable simulators for digital agent training, bridging the gap between limited real-world data and the need for diverse training environments. While the current text-based approach is highly effective, future work will focus on pixel-level simulation to support multimodal agents and further reduce the sim-to-real gap.
Summary updated