arXiv:2605.20291cs.LG2026-05

通过重要性与多样性选择,提升网页代理在陌生场景下的泛化能力。

Weasel: Out-of-Domain Generalization for Web Agents via Importance-Diversity Data Selection

论文配图:Weasel: Out-of-Domain Generalization for Web Agents via Importance-Diversity Data Selection
图 1 · 摘自论文原文
  • 基于状态、网站和交互模式的多样性与重要性,贪心筛选训练轨迹。
  • 在多个数据集上实现9.7-12.5倍训练加速,同时提升跨域性能。
  • 适合需要高效训练且泛化能力强的网页自动化研究者使用。

大型语言模型使网页代理能够通过多步浏览器操作执行自然语言目标。然而,在特定轨迹和领域上微调的代理往往难以泛化到新领域,且离线训练因噪声冗余轨迹和长可访问性树(AXTree)状态而计算效率低下。为此,我们提出Weasel,一种用于网页代理离线训练的轨迹选择方法。Weasel通过优化兼顾单个重要性与成对多样性的目标,以贪心算法选出固定预算的轨迹步骤,涵盖状态、网站和交互模式。进一步通过目标中心的AXTree剪枝保留关键内容,减少冗余;并用模型生成的风格一致推理替代专家轨迹,缓解推理模型的风格偏差。在AgentTrek和NNetNav数据集上,结合Qwen2.5-7B、Gemma3-4B和Qwen3-8B模型,在WebArena、WorkArena和MiniWob测试环境中验证,Weasel显著提升跨域表现,同时实现约9.7-12.5倍的训练速度提升。代码已开源:https://github.com/fatemehpesaran310/weasel。

原文摘要 · Abstract (English)

Large language models (LLMs) have enabled web agents that follow natural language goals through multi-step browser interactions. However, agents fine-tuned on specific trajectories and domain often struggle to generalize out of domain, and offline training can be compute-inefficient due to noisy, redundant trajectories and long accessibility-tree (AXTree) states. To address both issues, we propose Weasel, a trajectory selection method for offline training of web agents. Weasel selects a fixed-budget subset of trajectory steps by optimizing an objective that balances unary importance with pairwise diversity over states, websites, and interaction patterns, solving efficiently with a greedy algorithm. We further improve efficiency with target-centered AXTree pruning that keeps only content around the ground-truth action target, and we mitigate style mismatch for reasoning-native models by replacing expert traces with model-generated, style-consistent rationales. Across AgentTrek and NNetNav training datasets, evaluations in WebArena, WorkArena, and MiniWob, and experiments with Qwen2.5-7B, Gemma3-4B, and Qwen3-8B, Weasel improves out-of-domain performance while reducing training cost, producing roughly 9.7-12.5$\times$ training speedups over standard fine-tuning. We make the code available at https://github.com/fatemehpesaran310/weasel.

网页代理泛化能力数据筛选高效训练

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。