Multi-Turn On-Policy Distillation with Prefix Replay
作者: Baohao Liao, Hanze Dong, Christof Monz, Xinxing Xu, Li Dong, Furu Wei
分类: cs.LG, cs.AI, cs.CL, stat.ML
发布日期: 2026-07-06
💡 一句话要点
提出Replayed-Prefix On-Policy Distillation解决多回合蒸馏问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 在线蒸馏 多回合交互 教师模型 学生模型 轨迹重放 效率提升 智能体训练
📋 核心要点
- 现有的在线蒸馏方法成本高昂,因为每次更新都需要新的学生回合和教师查询,效率低下。
- 提出Replayed-Prefix On-Policy Distillation(ReOPD),通过重用教师轨迹作为重放前缀,减少环境交互的需求。
- 实验表明,ReOPD在多个任务中保持或提高了准确性,并且训练速度至少提高了4倍,显著提升了效率。
📝 摘要(中文)
本文研究了多回合的在线蒸馏(OPD)在智能体任务中的应用,其中大型语言模型(LLM)智能体与环境进行多次交互,学生模型在这些交互历史中模仿教师模型。由于每次更新都需要新的学生回合和教师查询,完全在线的OPD成本高昂。为此,提出了Replayed-Prefix On-Policy Distillation(ReOPD),通过重用预先收集的教师轨迹作为重放前缀,学生在选定步骤上进行操作,教师提供每一步的密集监督,而无需新的环境交互。研究表明,多回合OPD引入了前缀陷阱,导致学生的历史与教师的可靠性之间存在双向分布偏移。ReOPD通过将多回合OPD视为一种可靠性感知的前缀分布设计来解决这一问题,并通过简单的步长衰减采样策略来实现。实验结果显示,ReOPD在多个模型规模的数学推理和搜索环境中,保持或提高了OPD级别的准确性,且每个训练步骤的速度至少提高了4倍。
🔬 方法详解
问题定义:本文旨在解决多回合在线蒸馏(OPD)中高昂的成本问题,现有方法需要频繁的环境交互和教师查询,导致效率低下。
核心思路:ReOPD通过重用预先收集的教师轨迹作为重放前缀,使学生在选定步骤上进行操作,从而减少对新环境交互的需求,同时保持教师的密集监督。
技术框架:ReOPD的整体架构包括教师轨迹的收集、重放前缀的选择、学生模型的训练和教师的监督反馈。主要模块包括轨迹重放、学生决策和教师反馈。
关键创新:ReOPD的核心创新在于将多回合OPD视为一种可靠性感知的前缀分布设计,采用步长衰减采样策略,强调早期、低偏移的前缀,从而有效解决了前缀陷阱问题。
关键设计:在参数设置上,ReOPD使用了简单的步长衰减策略,损失函数设计上注重教师的密集监督,网络结构上则保持了与传统OPD一致的架构,但在训练过程中引入了重放机制。
🖼️ 关键图片
📊 实验亮点
实验结果表明,ReOPD在多个模型规模的数学推理和搜索环境中,保持或提高了OPD级别的准确性,且每个训练步骤的速度至少提高了4倍,显著提升了训练效率。
🎯 应用场景
该研究的潜在应用领域包括智能体训练、机器人控制和复杂任务的自动化处理。通过将高成本的环境交互转化为可重用的离线资源,ReOPD能够在多种工具和任务中实现可扩展的蒸馏,推动智能体技术的进一步发展。
📄 摘要(原文)
We study on-policy distillation (OPD) for agentic tasks, where an LLM agent interacts with an environment over multiple turns and a student imitates a teacher over these multi-turn interaction histories. Fully online OPD is costly because each update requires fresh student rollouts through the environment and teacher queries at visited histories. We propose Replayed-Prefix On-Policy Distillation (ReOPD), an off-environment alternative that reuses pre-collected teacher trajectories as replayed prefixes: the student acts at selected steps, while the teacher provides dense per-step supervision without executing new environment interactions. We show that multi-turn OPD introduces a prefix trap: making histories more student-on-policy improves relevance to the student, but can query the teacher on histories where its target is unreliable. This creates a two-sided distribution shift between student occupancy and teacher reliability. ReOPD addresses this by treating multi-turn OPD as a reliability-aware prefix distribution design and implements it with a simple step-decaying sampling schedule that emphasizes early, lower-shift prefixes. Across mathematical reasoning with Python and search environments over multiple teacher and student model scales, ReOPD preserves or improves OPD-level accuracy, uses zero tool calls during student training, and is at least 4$\times$ faster per training step than OPD. ReOPD therefore turns expensive agent-environment interaction into a reusable offline resource, enabling scalable distillation across tools, tasks, and environments.