arXiv 2607.10601v1 · 发布 2026-07-14

Agentic-DPO:从模仿到基于专家轨迹的智能体策略优化

Agentic-DPO: From Imitation to Agentic Policy Optimization on Expert Trajectories

AUTHORS Chen, Yixiong, Yuille, Alan
EVIDENCE 状态级DPO,τ-bench从21.7%提升至41.4%
SCORE 0.9
CATEGORIES TASK agent
GENERATED 2026-07-20 02:29:20 UTC

📝 TLDR

Agentic-DPO将专家轨迹转化为状态条件偏好对,通过DPO目标训练LLM智能体,无需在线环境交互。

🧭 速览

动机

现有SFT仅模仿专家动作序列,无法教代理在各状态规避合理错误;而偏好学习与强化学习依赖高成本环境回放与奖励模型。

方法

Agentic-DPO将专家轨迹转为状态条件偏好监督,逐步采样错误动作作负例,以DPO目标对比专家动作;PPA固定专家策略,经多schema渲染增强而不改变策略。

结果

在StableTool-Bench、τ-bench retail与Mind2Web上多规模稳定超越SFT;9B模型τ-bench准确率由21.7%提升至41.4%。

结论

无需在线回放和奖励模型,即可实现代理策略离线优化,为LLM代理训练提供轻量高效的偏好学习方案。

📊 论文图表(共 4 张)

展开查看 4 张图

TL;DR

Agentic-DPO 是一种无需在线环境交互的离线智能体策略优化方法,它将专家轨迹转化为状态条件下的偏好监督信号。与传统监督微调仅模仿 token 序列不同,该方法在每个专家动作状态处采样一个单步动作作为负样本,用 DPO 风格的偏好目标对比专家动作与「看似合理的错误动作」。实验表明,在 9B 模型上 tau-bench 准确率从 21.7% 提升至 41.4%,且仅需 step-level rollouts 即可达到在线 GRPO 的性能水平。

研究背景与动机

大语言模型智能体正被广泛用于需要多轮交互的任务——调用工具、响应用户、操作网页或与软件环境交互。训练这类智能体的常见做法是收集来自更强模型或脚本化策略的专家轨迹,然后应用监督微调来模仿完整轨迹。这种方案简单、稳定,且无需在线环境交互,因此在实际应用中被广泛采用。

然而,这种方案继承了一种根本局限:SFT 本质上是在做行为克隆,它只学习模仿专家轨迹的 token 序列。对于通用文本生成任务,这或许足够;但对于智能体任务,轨迹不仅仅是文本输出,而是状态条件下的决策序列。在每个时间步,模型需要决定是否调用工具、选择哪个工具、提供什么参数——这些决策的质量直接影响任务成败。

当智能体面临与专家轨迹略有不同的状态时,仅靠 token 级别的模仿难以指导其做出正确决策。专家轨迹只展示了「正确的动作序列」,却没有明确指出「在当前状态下,为什么选择动作 A 而非动作 B」。现有缓解这一问题的方案包括偏好学习或强化学习,但它们通常需要成本高昂的环境 rollout 和奖励模型。

本文的切入点在于:能否将专家轨迹中蕴含的决策结构提取出来,在不进行在线交互的前提下训练智能体做出更好的状态条件决策?

方法

Agentic-DPO 的核心思路是将专家轨迹从「动作序列模仿」转化为「状态级动作偏好」。具体而言,在每个专家动作状态处,该方法从当前学生策略采样一个单步动作,将这个「看似合理的错误动作」作为负样本,用 [[Direct Preference Optimization|DPO]] 风格的偏好目标将其与专家动作进行对比训练。

这种方法的关键设计选择在于负样本的构造。与传统偏好学习需要外部奖励模型或大量环境交互不同,Agentic-DPO 直接从当前策略采样单步动作作为负样本。这背后的直觉是:当前策略在专家轨迹覆盖的状态上,最可能犯的错误恰好是它自己会采样到的动作——这些动作「看似合理」但会导致次优结果。通过对比专家动作与这些自采样错误,模型能够学习到在每个状态下的决策边界。

为避免在偏好学习中混淆策略与 schema,作者引入了 Policy-Preserving Augmentation (PPA) 技术。在智能体任务中,动作通常以结构化格式(如 JSON、XML)输出,这些格式包含大量与策略无关的 schema 标记(如括号、引号、键名等)。如果直接在原始格式上进行偏好对比学习,模型可能学到的是「偏好某种 schema 表达方式」而非「偏好更优的决策」。PPA 在保持专家策略不变的前提下,将同一潜在轨迹在多种 schema 下呈现,确保对比学习聚焦于动作选择的优劣而非表达形式的差异。

形式化地,给定专家轨迹中的一个状态-动作对 ,Agentic-DPO 首先从当前学生策略 采样一个负样本动作 ,然后通过最大化以下偏好目标进行训练:

这个目标与标准 DPO 目标形式一致,但关键区别在于:这里的偏好对来自「同一状态下的动作选择对比」,而非「同一轨迹的不同响应质量对比」。这使得 Agentic-DPO 能够进行 step-level 的细粒度策略优化,同时保持离线性质——整个过程无需环境 rollout、无需奖励模型、无需完整轨迹的学生探索。

实验与结果

作者在三个 benchmark 上验证了 Agentic-DPO 的有效性:StableToolBench(工具调用智能体)、τ-bench retail(零售领域任务智能体)和 Mind2Web(网页智能体任务)。实验覆盖了不同规模的模型,包括 7B 和 9B 参数量的基座。

在 τ-bench retail 上的结果最能说明问题:对于 9B 模型,SFT 基线的准确率为 21.7%,而 Agentic-DPO 将这一指标提升至 41.4%,几乎翻倍。在 StableToolBench 上,使用 Qwen2.5-7B 作为 backbone 时,Agentic-DPO 相比 SFT 同样取得了显著提升。更重要的是,当与在线强化学习方法 GRPO 进行对比时,在相同 backbone 下,Agentic-DPO 仅使用 step-level rollouts(每个状态采样一个负样本),且在梯度更新期间无需与环境交互,便达到了与 GRPO 相当的性能水平。

这些结果表明,将专家轨迹从「示范」转化为「状态级动作偏好」后,能够支持低成本的智能体策略优化。关键在于:step-level 的细粒度对比比 full-trajectory 的 token 模仿更能教会模型在每个决策点做出正确选择。

讨论与可借鉴点

Agentic-DPO 的核心贡献在于展示了离线偏好学习的潜力:无需高昂的在线交互成本,只需对专家轨迹进行重新诠释——从「要模仿什么」转向「要偏好什么」——就能显著提升智能体的决策质量。这种思路对 [[Reinforcement Learning|强化学习]] 与 [[Supervised Fine-Tuning|SFT]] 的混合训练范式具有启发意义:专家轨迹的价值不仅在于示范正确答案,还在于能够构造出有意义的对比样本,帮助模型理解决策边界。

该方法的局限主要集中在负样本质量上。当前方案从学生策略采样负样本,这意味着负样本的质量受限于学生策略的能力——如果学生策略过于弱后,其采样出的动作可能与专家动作差异过大,对比信号反而不够清晰。此外,方法假设专家轨迹覆盖了足够多样的状态,对于分布外状态的处理能力有限。

在实际应用层面,Agentic-DPO 的设计原则值得借鉴:将策略优化从「模仿正确动作」转向「区分正确与错误动作」,这一转变使得离线训练成为可能。对于资源有限的团队,这种无需环境交互的策略优化方法提供了一个务实且有效的选择。

摘要

大型语言模型(LLM)智能体通常使用监督微调(SFT)从专家轨迹中进行训练,这种方法将多轮智能体行为视为普通的文本模仿。这一方案简单且成本低,但它只学习模仿专家动作序列,而不是训练智能体在每个状态下从看似合理的错误动作中选择正确动作。缓解这一问题的现有方法包括偏好学习或强化学习,但它们通常需要成本高昂的环境 rollout 和奖励模型。我们提出 Agentic-DPO,一种轻量级的离线智能体策略优化方法,它将专家轨迹转化为以状态为条件的偏好监督。在每个专家动作状态下,Agentic-DPO 从当前状态采样一个单步动作,将看似合理的错误动作视为负样本,并使用 DPO 式偏好目标将其与专家动作进行对比。为避免在偏好学习中将策略和 schema 混在一起,我们引入了 Policy-Preserving Augmentation(PPA),它在保持专家策略不变的同时,在多种 schema 下呈现同一潜在轨迹。Agentic-DPO 无需在线环境 rollout、奖励模型或全轨迹学生探索。我们在 StableToolBench、tau-bench retail 和 Mind2Web 上开展了实验,Agentic-DPO 在不同模型规模下均能持续超越模仿学习,提升智能体性能。具体而言,对于 9B 模型,它将 tau-bench 准确率从 21.7%(SFT)提高到 41.4%;在相同 backbone 下,它仅使用 step-level rollouts,且在梯度步骤期间无需与环境交互,便达到了与在线 GRPO 相当的水平。结果表明,当专家轨迹从示范转化为状态级动作偏好后,它们能够支持低成本的智能体策略优化。Agentic-DPO 的代码发布于 https://github.com/Schuture/Agentic-DPO。

Abstract

Large Language Model (LLM) agents are commonly trained from expert trajec-tories using supervised fine-tuning (SFT), which treats multi-turn agent behavior as ordinary text imitation. This recipe is simple and low-cost, but it only learns to imitate the sequence of expert actions, rather than training the agent to choose the right action against plausible mistakes at each state. Existing methods to mitigate this problem include preference learning or reinforcement learning, but they usually need high-cost environment rollouts and reward models. We propose Agentic-DPO , a lightweight offline agent policy optimization method that turns expert trajectories into state-conditioned preference supervision. At each expert action state, Agentic-DPO samples a one-step action from the current state, treats plausible wrong actions as negatives, and contrasts them with the expert action using a DPO-style preference objective. To avoid mixing both policy and schema in preference learning, we introduce Policy-Preserving Augmentation (PPA), which renders the same latent trajectory under multiple schemas while keeping the expert policy fixed. Agentic-DPO requires no online environment rollout, reward model, or full-trajectory student exploration. We conduct experiments across StableTool-Bench, τ -bench retail, and Mind2Web, where Agentic-DPO consistently improves agents at different model scales beyond imitation. In particular, it raises τ -bench accuracy from 21 .7% (SFT) to 41 .4% for a 9B model, matching online GRPO under the same backbone with only step-level rollouts and without environment interaction during gradient steps. The results suggest that expert trajectories can support low-cost agentic policy optimization when converted from demonstra-tions into state-level action preferences. Code for Agentic-DPO is released at https://github.com/Schuture/Agentic-DPO. ## 1 Introduction Large Language Model (LLM) agents are increasingly used to solve tasks that require interacting with tools, users, web pages, or software environments over multiple turns [ 28 , 15 , 46 , 10 ]. A common way to train such agents is to collect expert trajectories from stronger models or scripted policies, and then apply supervised fine-tuning (SFT) to imitate the full trajectory [ 21 , 6]. This recipe is attractive because it is simple, stable, and does not require online interaction with the environment. However, it inherits a basic limitation of behavior cloning: SFT only imitates the token sequences of the expert trajectory. This limitation is especially important for agent training, because an agent trajectory is not merely a text response; it is a sequence of state-conditioned decisions. At each step, the model must decide whether to call a tool or respond to the user, which tool or action to choose, and what arguments or grounding targets to provide. Recent work has started to address this mismatch by showing that policy can be learned better by algorithms that utilizes the structure of expert trajectories. A straightforward > Preprint. arXiv:2607.10601v1 [cs.AI] 12 Jul 2026 SFT Agentic -DPO > … > Past expert tokens > … > LLM > Future expert tokens > Imitate next > expert token > … > Past expert tokens Next action tokens > LLM > Sampled action > DPO loss > Preferred > Rejected > (mistake) Figure 1: Illustration of the difference between SFT and Agentic-DPO for agent training. SFT treats an expert trajectory as token-level supervision and trains the model to imitate demonstrated tokens. In contrast, Agentic-DPO treats each expert action as a state-conditioned policy decision. It contrasts the expert action with a one-step action sampled from the current student policy, and trains the model to prefer the expert action over the likely student mistake. way is to improve SFT by selecting only valuable action steps to train, with heuristic rules (SWE-Lego [ 37 ]) or the help of external annotation models (ATLaS [ 6]). More sophisticated methods combine trajectory structure with preference learning or reinforcement learning (RL) like error step annotation (Step-DPO [ 18 ]), action grouping (HPL [ 13 ]), local on-policy rollouts (PivotRL [ 47 ]), and test-based failure feedback (Agent-RLVR [ 9 ]). These methods point to an important direction: agent training should use the decision structure inside trajectories, especially where the current policy would fail. However, they often recover this signal through costly step selection [ 18 , 6], executable envir

✨ 编译论文

点「✨ 编译」开始,LLM 会按 Polaris 风格翻译并把图片/表格嵌到对应位置。结果存到浏览器 localStorage,下次访问自动加载。

📓 我的笔记