[论文解读] Agent Q: Advanced Reasoning and Learning for Autonomous AI Agents
Agent Q 将引导的蒙特卡洛树搜索、AI 自我批评,以及离线 Direct Preference Optimization 相结合,用于训练基于LLM 的网页代理,在多步推理方面表现强劲,零-shot 和在线搜索在 WebShop 与现实世界预订任务中的性能提升。
Large Language Models (LLMs) have shown remarkable capabilities in natural language tasks requiring complex reasoning, yet their application in agentic, multi-step reasoning within interactive environments remains a difficult challenge. Traditional supervised pre-training on static datasets falls short in enabling autonomous agent capabilities needed to perform complex decision-making in dynamic settings like web navigation. Previous attempts to bridge this ga-through supervised fine-tuning on curated expert demonstrations-often suffer from compounding errors and limited exploration data, resulting in sub-optimal policy outcomes. To overcome these challenges, we propose a framework that combines guided Monte Carlo Tree Search (MCTS) search with a self-critique mechanism and iterative fine-tuning on agent interactions using an off-policy variant of the Direct Preference Optimization (DPO) algorithm. Our method allows LLM agents to learn effectively from both successful and unsuccessful trajectories, thereby improving their generalization in complex, multi-step reasoning tasks. We validate our approach in the WebShop environment-a simulated e-commerce platform where it consistently outperforms behavior cloning and reinforced fine-tuning baseline, and beats average human performance when equipped with the capability to do online search. In real-world booking scenarios, our methodology boosts Llama-3 70B model's zero-shot performance from 18.6% to 81.7% success rate (a 340% relative increase) after a single day of data collection and further to 95.4% with online search. We believe this represents a substantial leap forward in the capabilities of autonomous agents, paving the way for more sophisticated and reliable decision-making in real-world settings.
研究动机与目标
- 在模仿学习之外,提升长期任务中自主网页代理的决策能力。
- 利用引导的 MCTS 收集信息丰富的轨迹用于训练。
- 使用 AI 自我批评提供中间奖励并指导搜索。
- 通过离线使用 Direct Preference Optimization (DPO) 的一个离策略变体对代理进行微调,以从成功与失败的轨迹中学习。
- 在 WebShop 基准和现实世界预订场景中展示收益。
提出的方法
- 将问题表述为一个用于网页导航的 POMDP,具有基于 DOM 的观测与组合动作。
- 在网页页面上对蒙特卡洛树搜索(MCTS)进行,基模型 LLM 作为提议分布,AI 基于自我批评在每个节点对动作进行评分。
- 结合四阶段 MCTS:选择、扩展、模拟(回滚)、反向传播,使用 UCB1 在探索与利用之间取得平衡。
- 使用当前策略进行轨迹回滚,并对最终奖励(成功/失败)进行反向传播以更新 Q 值。
- 从轨迹构建节点层面的偏好,并使用 Direct Preference Optimization (DPO) 的离策略变体进行优化,使用回放缓冲区代替独立的参考模型。
- 在 WebShop 与现实世界的预订任务上进行评估,使用 LLaMa-3-70B 作为基础模型;展示零-shot 改进和在线搜索收益。
实验结果
研究问题
- RQ1引导式 MCTS 结合 AI 自我批评是否能改善探索与自主网页代理的策略质量?
- RQ2基于 MCTS 派生轨迹的离线 DPO 微调是否比行为克隆或强化学习微调基线具备更好的泛化能力?
- RQ3Agent Q 在模拟网页环境(WebShop)和现实世界预订任务中的表现如何,有无在线搜索的影响?
- RQ4使用紧凑的历史表示来处理长时域网络交互对学习效率和性能有何影响?
主要发现
- Agent Q+MCTS 显著提升 WebShop 的成功率,相较于基础模型,且在有在线搜索时超过平均人类表现。
- 在现实世界预订场景中,零-shot 成功率在一天数据收集后从 18.6% 上升到 81.7%,若配备在线搜索,进一步提升至 95.4%。
- 使用来自 MCTS 轨迹的偏好进行离线 DPO 微调,相较于行为克隆和简单强化微调基线,取得显著改进(例如,WebShop 基线的 DPO 为 40.6%,RFT 为 31.3%)。
- 在 MCTS 的节点层面使用 AI 反馈与自我批评引导探索并改善最终代理的成功率,解决了长时任务中的稀疏奖励问题。
- 此方法表明,结合搜索、自我批评与离线基于偏好的学习可以大幅推动自主网页代理超越模仿学习的方法。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。