NNetNav: Unsupervised Learning of Browser Agents Through Environment Interaction in the Wild

Shikhar Murty, Hao Zhu, Dzmitry Bahdanau, Christopher D Manning · DOI

Abstract

We introduce NNetNav, a method for unsupervised interaction with websites that generates synthetic demonstrations for training browser agents. Given any website, NNetNav produces these demonstrations by retroactively labeling action sequences from an exploration policy. Most work on training browser agents has relied on expensive human supervision, and the limited prior work on such interaction-based techniques has failed to provide effective search through the exponentially large space of exploration. In contrast, NNetNav exploits the hierarchical structure of language instructions to make this search more tractable: Complex instructions are typically decomposable into simpler sub-tasks, allowing NNetNav to automatically prune interaction episodes when an intermediate trajectory cannot be annotated with a meaningful sub-task. Llama-3.1-8b finetuned on 10k NNetNav self-generated demonstrations obtains over 16% success rate on WebArena, and 35% on WebVoyager, an improvement of 15pts and 31pts respectively over zero-shot Llama-3.1-8b, outperforming zero-shot GPT-4 and reaching the state-of-the-art among unsupervised methods, for both benchmarks.

Introduction

Building grounded agents capable of navigating complex web environments—such as booking flights or managing forum posts—is a significant challenge in AI. Traditionally, developing these agents has required thousands of expensive, human-annotated demonstrations. While synthetic data generation has been proposed as an alternative, previous "instruction-first" approaches often fail because the generated tasks may be impossible or the agent lacks the site-specific context to execute them. Conversely, simple "interaction-first" exploration leads to an unmanageable exponential search space of aimless actions.

NNetNav bridges this gap by making unsupervised exploration tractable through a "hindsight" labeling mechanism and hierarchical pruning, allowing agents to effectively teach themselves by interacting with the web in the wild.

The NNetNav Framework

NNetNav utilizes an interaction-first approach where an agent explores a website and then retroactively assigns instructions to successful trajectories. The framework is powered by four primary LLM-based components:

  1. Exploration Policy ($\pi_{explore}$): Seeded with diverse user personas (e.g., "a budget traveler"), this policy interacts with a target website.
  2. Trajectory Labeler: Every four steps, this module analyzes the action sequence to assign a meaningful natural language sub-task.
  3. Outcome Reward Model (ORM): This evaluates whether the trajectory successfully achieved the labeled instruction.
  4. Hierarchical Pruning: If the Labeler cannot find a meaningful sub-task or the ORM provides a low score, the episode is considered aimless and is immediately pruned.
The NNetNav framework overview, illustrating the exploration, labeling, and pruning cycle across various web environments to generate high-quality synthetic training data.

Following successful exploration, a post-processing step allows an agent policy to re-generate optimal actions for the labeled instruction, removing "exploration noise" like accidental clicks before the data is added to the training set.

Hierarchical Pruning and Efficiency

A core innovation of NNetNav is using the hierarchical structure of language as a search filter. By requiring that every few steps be annotatable with a human-readable sub-task, the system effectively prunes the massive tree of possible browser interactions. This strategy is highly efficient; empirical results show that in environments like MiniWoB++, approximately 65% of unproductive episodes are pruned after just four actions, preventing the waste of computational resources on hallucinated or aimless paths.

Exploration pruning steps in MiniWoB++ and WebArena, demonstrating how the hierarchical labeling strategy effectively terminates aimless trajectories early in the exploration process.

Experimental Results

The researchers applied NNetNav to 20 websites (15 live sites like Amazon and Apple, and 5 self-hosted sites from WebArena) to collect a dataset of over 10,000 demonstrations. A Llama-3.1-8B model fine-tuned on this data achieved state-of-the-art results for unsupervised methods:

  • WebArena: Achieved a 16.3% success rate, significantly outperforming the 1.0% zero-shot performance of the base model and surpassing zero-shot GPT-4 (14.1%).
  • WebVoyager: Achieved a 35.2% success rate, a 31-point improvement over the zero-shot base model and again outperforming zero-shot GPT-4 (33.5%).

Insights and Limitations

NNetNav demonstrates that "hindsight is 20/20": it is easier for an LLM to describe what it just did than to plan a complex task from scratch. Furthermore, seeding exploration with personas is crucial for discovering a wide variety of website features.

Despite its success, the model still faces challenges with navigation efficiency (e.g., redundant loops) and extracting information from complex UI elements like large tables. Future work will focus on incorporating multi-modal inputs and developing better heuristics to minimize unnecessary actions during navigation.

Summary updated

BibTeX
@inproceedings{murty2024nnetnav,
  author = {Shikhar Murty and Hao Zhu and Dzmitry Bahdanau and Christopher D Manning},
  title = {{NNetNav: Unsupervised Learning of Browser Agents Through Environment Interaction in the Wild}},
  booktitle = {SSI-FM @ ICLR},
  year = {2024},
  doi = {10.48550/arxiv.2410.02907},
}
Figure