Weasel: Out-of-Domain Generalization for Web Agents via Importance-Diversity Data Selection
Summary
Weasel is a novel trajectory selection method designed to enhance out-of-domain generalization and computational efficiency for large language model (LLM)-based web agents. Addressing issues like poor generalization from fine-tuned agents and compute-intensive offline training due to noisy, redundant data, Weasel selects a fixed-budget subset of trajectory steps. It optimizes an objective balancing unary importance with pairwise diversity across states, websites, and interaction patterns, solved efficiently via a greedy algorithm. The method also incorporates target-centered AXTree pruning, which retains only action-relevant content, and replaces expert traces with model-generated, style-consistent rationales for reasoning-native models. Evaluated across AgentTrek and NNetNav datasets, and benchmarks like WebArena, WorkArena, and MiniWob with models such as Qwen2.5-7B, Gemma3-4B, and Qwen3-8B, Weasel demonstrates 9.7-12.5x training speedups and improved out-of-domain performance, including a +4.8 gain in zero-shot transfer for Qwen3-8B.
Key takeaway
For Machine Learning Engineers developing web agents that must generalize across diverse online environments, you should re-evaluate traditional offline training methods. Weasel demonstrates that curating training data for importance and diversity, combined with target-centered AXTree pruning and self-reasoning synthesis, can yield 9.7-12.5x training speedups and substantially improve out-of-domain performance. Integrate these data selection and processing techniques to build more robust and efficient web agents.
Key insights
Weasel enhances web agent generalization and efficiency through importance-diversity trajectory selection and state pruning.
Principles
- Prioritize data diversity to mitigate overfitting.
- Balance step importance with state diversity for curation.
- Ensure reasoning trace style matches the fine-tuned model.
Method
Weasel employs a greedy algorithm for fixed-budget trajectory subset selection, optimizing unary importance and pairwise diversity, complemented by AXTree pruning and self-reasoning synthesis.
In practice
- Implement importance-diversity data selection for web agents.
- Use target-centered AXTree pruning for state efficiency.
- Synthesize style-consistent reasoning traces for LLM fine-tuning.
Topics
- Web Agents
- Out-of-Domain Generalization
- Trajectory Selection
- Data Curation
- AXTree Pruning
- Large Language Models
Code references
Best for: Research Scientist, AI Scientist, Machine Learning Engineer, AI Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.LG updates on arXiv.org.