arXiv:2504.17282cs.AI2025-04被引 1

用生成代码定义可行动作,让智能体高效学会操作网页。

Cracking the Code of Action: a Generative Approach to Affordances for Reinforcement Learning

  • 用预训练视觉语言模型生成代码,动态筛选当前可用动作
  • 在MiniWob++上样本效率提升数量级,少样本下表现优于行为克隆
  • 代码可跨任务泛化,适合低数据场景的网页自动化研究

在图形用户界面(GUI)中,智能体若需通过统一动作空间(如鼠标和键盘)自主导航,通常需要大量领域特定的专家示范才能获得良好性能。在稀疏奖励且动作空间庞大的环境(如网页GUI)中,低样本效率问题尤为突出,因为每个情境下只有少数动作相关。本文关注低数据场景,即缺乏或无专家行为数据。为实现高效学习,我们探索通过“基于意图的可行动作”约束动作空间——即仅考虑能达成目标的动作子集。提出方法《代码作为生成性可行动作》(CoGA),利用预训练视觉语言模型生成代码,通过隐式意图补全函数确定可行动作,并采用全自动程序生成与验证流程。这些代码作为强化学习智能体的实时输入,根据像素观测返回可行动作集合。大幅减少智能体需考虑的动作数,在MiniWob++基准上的多种任务中验证:1)CoGA比其强化学习代理样本效率高数量级;2)生成代码可在任务族内泛化;3)在少量专家示范下,性能优于或持平于行为克隆。

原文摘要 · Abstract (English)

Agents that can autonomously navigate the web through a graphical user interface (GUI) using a unified action space (e.g., mouse and keyboard actions) can require very large amounts of domain-specific expert demonstrations to achieve good performance. Low sample efficiency is often exacerbated in sparse-reward and large-action-space environments, such as a web GUI, where only a few actions are relevant in any given situation. In this work, we consider the low-data regime, with limited or no access to expert behavior. To enable sample-efficient learning, we explore the effect of constraining the action space through $\textit{intent-based affordances}$ -- i.e., considering in any situation only the subset of actions that achieve a desired outcome. We propose $\textbf{Code as Generative Affordances}$ $(\textbf{$\texttt{CoGA}$})$, a method that leverages pre-trained vision-language models (VLMs) to generate code that determines affordable actions through implicit intent-completion functions and using a fully-automated program generation and verification pipeline. These programs are then used in-the-loop of a reinforcement learning agent to return a set of affordances given a pixel observation. By greatly reducing the number of actions that an agent must consider, we demonstrate on a wide range of tasks in the MiniWob++ benchmark that: $\textbf{1)}$ $\texttt{CoGA}$ is orders of magnitude more sample efficient than its RL agent, $\textbf{2)}$ $\texttt{CoGA}$'s programs can generalize within a family of tasks, and $\textbf{3)}$ $\texttt{CoGA}$ performs better or on par compared with behavior cloning when a small number of expert demonstrations is available.

强化学习网页自动化生成代码低样本

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