让语言智能体从自身对话轨迹中自动提炼技能,提升决策指导性。
OPID: On-Policy Skill Distillation for Agentic Reinforcement Learning

- 从已完成的对话轨迹中直接提取层级化技能作为监督信号。
- 在关键步骤用细粒度技能指导,其他情况用全局流程规则,默认效果更稳定。
- 无需外部记忆或检索,适合多轮交互场景,提升训练效率与鲁棒性。
基于结果的强化学习为语言智能体提供了稳定的优化基础,但其稀疏的轨迹级奖励难以指导哪些中间决策应被强化或抑制。基于策略的自蒸馏可提供密集的词元级监督,但现有技能条件变体常依赖外部技能记忆或检索到的特权上下文,维护成本高且易与当前策略诱导的状态分布不匹配。本文提出OPID(On-Policy Skill Distillation),一种从完成的在线策略轨迹中直接提取技能监督的框架。OPID将轨迹回溯表示为层级技能:任务级技能捕捉全局工作流或避错规则,步骤级技能捕捉关键时间步的局部决策知识。采用优先关键决策路由机制,在识别出关键决策时使用步骤级技能,否则默认使用任务级技能。选定技能注入交互历史,使旧策略在原始与技能增强上下文中重新评分相同采样响应。由此产生的对数概率差异生成词元级自蒸馏优势,与结果优势结合用于策略优化。因此,OPID在保持强化学习为主训练目标的同时,引入了密集、分布匹配的回溯监督。在ALFWorld、WebShop和基于搜索的问答任务上的实验表明,相比仅基于结果的RL及现有技能蒸馏基线,OPID普遍提升了智能体性能、样本效率和鲁棒性。代码已公开于https://github.com/jinyangwu/OPID/tree/main。
原文摘要 · Abstract (English)
Outcome-based reinforcement learning provides a stable optimization backbone for language agents, but its sparse trajectory-level rewards provide little guidance on which intermediate decisions should be reinforced or suppressed. On-policy self-distillation offers dense token-level supervision, yet existing skill-conditioned variants often rely on external skill memories or retrieved privileged context, which are costly to maintain and can be mismatched with the state distribution induced by the current policy in multi-turn interaction. We propose \textbf{OPID} (\textbf{O}n-\textbf{P}olicy Sk\textbf{i}ll \textbf{D}istillation), a framework that extracts skill supervision directly from completed on-policy trajectories. OPID represents trajectory hindsight as hierarchical skills: episode-level skills capture global workflows or failure-avoidance rules, while step-level skills capture local decision knowledge at critical timesteps. A critical-first routing mechanism uses step-level skills when critical decisions are identified and falls back to episode-level skills as default guidance otherwise. The selected skill is injected into the interaction history, allowing the old policy to re-score the same sampled response under both original and skill-augmented contexts. The resulting log-probability shift yields a token-level self-distillation advantage, which is combined with the outcome advantage for policy optimization. OPID thus preserves RL as the primary training objective while introducing dense, distribution-matched hindsight supervision. Experiments on ALFWorld, WebShop and Search-based QA demonstrate that OPID generally improves agent performance, sample efficiency, and robustness over outcome-only RL and existing skill-distillation baselines. Our code is available at https://github.com/jinyangwu/OPID/tree/main.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。