From Context to Action: Analysis of the Impact of State Representation and Context on the Generalization of Multi-Turn Web Navigation Agents

Nalin Tiwary, Vardhan Dongre, Sanil Arun Chawla, Ashwin Lamani, Dilek Hakkani-Tür · DOI

Introduction

Navigating the modern web presents a significant challenge for artificial intelligence. Webpages are often dense, noisy environments represented by complex Document Object Model (DOM) structures. While previous research has largely focused on single-turn tasks, real-world applications require Conversational Web Agents (CWAs) to handle multi-turn dialogues, necessitating a robust "memory" or state representation. The core challenge lies in balancing the amount of context provided: too little leads to ambiguity, while too much can overwhelm the model with noise or exceed token limits.

Methodology: The Navigation Pipeline

The researchers analyze a two-stage navigation pipeline designed to manage this complexity. The first stage, Dense Markup Ranking (DMR), uses a dual-encoder model to rank and select the most relevant DOM elements based on the user's query and interaction history. This prevents the Large Language Model (LLM) from being flooded with the entire HTML page. The second stage, the Action Model, utilizes these top-ranked elements along with screenshots and history to predict the next logical action, such as clicking a button or submitting a form.

The two-stage navigation pipeline involving Dense Markup Ranking (DMR) and an Action Model.

The study specifically investigates two critical variables:

  1. Interaction History Length: Evaluating the optimal number of previous turns (5, 10, or 15) to maintain in memory.
  2. Representation Truncation: Testing the impact of token limits (100, 200, 400, or unlimited) on individual HTML element descriptions.

Experimental Setup

The study utilizes the WebLINX dataset, comprising 100,000 interactions from over 2,300 human-led web navigation demonstrations. To test the agents' ability to generalize, evaluations were conducted on four Out-of-Distribution (OOD) splits:

  • Test-Web: Unseen websites.
  • Test-Cat: New website categories.
  • Test-Geo: Websites from different geographic regions.
  • Test-Vis: Scenarios lacking visual cues (screenshots).

Key Insights and Results

The systematic analysis revealed several critical findings regarding agent performance and generalization.

The 10-Turn "Sweet Spot"

A primary finding was that increasing interaction history from 5 to 10 turns significantly improved performance. However, expanding this to 15 turns led to a decrease in accuracy. This indicates a "context dilution" effect, where excessive history introduces irrelevant details that distract the model from the current task.

Impact of interaction history length on Recall@10 across various OOD test sets.

The Importance of DOM Completeness

Contrary to common practices of capping HTML element descriptions at low token counts (e.g., 200), the authors found that relaxing these constraints to 400 tokens or removing them entirely improved the model's understanding of complex elements. This suggests that truncated descriptions often omit vital information necessary for correct navigation.

Performance Gains

By optimizing history length and relaxing token constraints, the researchers achieved a 4.37% improvement in Recall@10 across all OOD scenarios. Furthermore, the action-prediction model's score on the WebLINX benchmark rose from 14.99 to 16.16. Notably, their optimized MiniLM model rivaled larger cross-encoder models like RoBERTa while being five times faster, offering a path toward efficient, real-time web agents.

Conclusion and Future Work

This research demonstrates that smarter context management is as vital as model scale for web navigation. While the study established fixed optimal boundaries, future work should explore dynamic context management—mechanisms that can prune or prioritize history on-the-fly. Additionally, bridging the gap between element retrieval and final action selection remains a key area for improving agent reliability in complex, multi-modal environments.

Summary updated

BibTeX
@inproceedings{tiwary2024from,
  author = {Nalin Tiwary and Vardhan Dongre and Sanil Arun Chawla and Ashwin Lamani and Dilek Hakkani-Tür},
  title = {{From Context to Action: Analysis of the Impact of State Representation and Context on the Generalization of Multi-Turn Web Navigation Agents}},
  booktitle = {OWA @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=8ocBIbsN6I},
}
Figure