Abstract
Building effective digital agents for web navigation is currently bottlenecked by a "data drought." High-quality human demonstrations are expensive and difficult to scale, while reinforcement learning in complex web environments remains brittle. This paper introduces Synatra, a novel data synthesis framework that transforms "indirect knowledge"—such as wikiHow tutorials and random web snapshots—into millions of "direct demonstrations" (state-action trajectories). By fine-tuning a 7B CodeLlama on 100,000 of these synthetic examples, we demonstrate that a relatively small model can outperform GPT-3.5 on complex web-browsing benchmarks at a fraction of the cost of human-annotated data.
1. Introduction
Digital agents capable of executing complex tasks on the web (e.g., "Cancel my PayPal subscription" or "Book a flight with specific layover requirements") require massive amounts of supervised data. Specifically, these agents need direct demonstrations: sequences of specific User Interface (UI) observations paired with exact executable actions, such as clicks and keystrokes.
Currently, researchers face two primary obstacles in data collection. First, human-annotated data is prohibitively expensive, often costing nearly a dollar per trajectory. Second, training agents via trial-and-error (Reinforcement Learning) requires complex, sandboxed environments that rarely capture the diversity and unpredictability of the live internet. Synatra addresses these challenges by leveraging the vast amount of "indirect knowledge" already available on the web—tutorials written for humans that describe how to perform tasks without providing the underlying code or precise coordinates an AI requires.
2. The Synatra Pipeline
Synatra bridges the gap between human-readable instructions and machine-executable actions through two primary synthesis paths, resulting in a 100,000-sample training dataset.
2.1 Synthesizing from Procedural Tutorials (wikiHow)
The first path utilizes approximately 25,000 wikiHow articles related to digital tasks. Because these articles provide high-level logic but lack technical UI data, the pipeline uses a Large Language Model (LLM) to:
- Rewrite abstract instructions into a "hypothetical trajectory" using a Python-like program format (e.g.,
click(element="Login")). - "Hallucinate" simplified HTML or Accessibility trees that would logically exist between steps to provide the necessary state observations.
2.2 Synthesizing from Random Observations (ClueWeb)
The second path uses real-world web snapshots from the ClueWeb dataset. While these snapshots provide authentic UI data, they lack associated tasks or goals. To solve this, the LLM:
- "Brainstorms" potential tasks that could be performed on a specific page.
- Generates the "past actions" that would have led a user to that page and the "next action" required to progress toward the brainstormed goal.
2.3 Trajectories as Programs
Departing from standard natural language action descriptions, Synatra represents agent actions as Python functions. This approach allows the model to leverage its pre-existing code-reasoning capabilities. Furthermore, the use of Python comments enables Chain-of-Thought (CoT) reasoning, helping the model process its logic before executing an action.
2.4 Quality Control and Filtering
To maintain dataset integrity, the authors implemented a "next state prediction" filter. If a synthesized action does not result in a meaningful or logical change to the predicted next state of the UI, the sample is discarded, ensuring the model learns from functional trajectories.
3. Key Insights: The "Knowledge Swap"
A central finding of the Synatra framework is the complementary nature of its data sources. Tutorials provide strong procedural logic but "fake" UI observations, while random web pages provide "real" UI observations but require invented logic. The authors found that models trained on a combination of both sources significantly outperformed those trained on either source in isolation.
Furthermore, the results suggest that diversity of environment is more critical for agentic pre-training than perfect authenticity. Synthetic data with broad domain coverage proved more effective than an equivalent amount of human data collected from a narrow set of websites.
4. Experimental Results
The Synatra-CodeLlama (7B) model was evaluated against several benchmarks, including Mind2Web, MiniWoB++, and WebArena.
- Performance: On WebArena, a realistic environment containing full functional websites like GitLab, the 7B model achieved a 6.28% success rate, surpassing GPT-3.5 (6.16%) and significantly larger open-source models like Lemur-70B.
- Accuracy: On Mind2Web, the model showed a 139% relative improvement in step accuracy over the base CodeLlama-7B-Instruct model.
- Hallucination Reduction: The base model frequently attempted to interact with non-existent UI elements (95% error rate). Synatra reduced this hallucination rate to just 0.7%.
- Cost Efficiency: Synthetic samples produced via Synatra cost approximately $0.031 each, representing a 25x reduction compared to the ~$0.80 cost of human-annotated samples.
5. Conclusion and Future Work
Synatra demonstrates that high-quality synthetic data can effectively substitute for expensive human demonstrations in training digital agents. By treating browsing sessions as code and leveraging indirect web knowledge, the framework enables the creation of specialized models that rival general-purpose LLMs in task execution.
Future work remains to reduce the dependency on powerful "teacher" models (like GPT-4) for data generation and to improve the handling of highly dynamic JavaScript-heavy web elements. Additionally, the authors suggest expanding indirect knowledge sources to include video tutorials and extending the agent's reach beyond the browser to general operating system navigation.
Summary updated