arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.14868cs.CLcs.LG
收藏

语言代理的直接多轮偏好优化

Direct Multi-Turn Preference Optimization for Language Agents

University of Science and Technology of China(中国科学技术大学);Meta AI

Wentao Shi, Mengqi Yuan, Junkang Wu, Qifan Wang, Fuli Feng

AI总结:

针对多轮语言代理任务,提出DMPO损失函数,通过状态-动作占用度量约束和长度归一化改进DPO,实验验证其有效性。

摘要:

将大型语言模型(LLMs)适配到代理任务对于开发语言代理至关重要。直接偏好优化(DPO)是一种有前景的适配技术,能够缓解复合错误,并提供了一种直接优化强化学习(RL)目标的方法。然而,将DPO应用于多轮任务面临挑战,因为无法抵消配分函数。克服这一障碍需要使配分函数独立于当前状态,并解决偏好轨迹与非偏好轨迹之间的长度差异。鉴于此,我们在RL目标中用状态-动作占用度量约束替代策略约束,并在Bradley-Terry模型中添加长度归一化,从而提出一种名为DMPO的新型损失函数,用于多轮代理任务,并给出了理论解释。在三个多轮代理任务数据集上的大量实验证实了DMPO损失的有效性和优越性。代码可在https://github.com/swt-user/DMPO获取。

英文摘要:

Adapting Large Language Models (LLMs) for agent tasks is critical in developing language agents. Direct Preference Optimization (DPO) is a promising technique for this adaptation with the alleviation of compounding errors, offering a means to directly optimize Reinforcement Learning (RL) objectives. However, applying DPO to multi-turn tasks presents challenges due to the inability to cancel the partition function. Overcoming this obstacle involves making the partition function independent of the current state and addressing length disparities between preferred and dis-preferred trajectories. In this light, we replace the policy constraint with the state-action occupancy measure constraint in the RL objective and add length normalization to the Bradley-Terry model, yielding a novel loss function named DMPO for multi-turn agent tasks with theoretical explanations. Extensive experiments on three multi-turn agent task datasets confirm the effectiveness and superiority of the DMPO loss. The code is available at https://github.com/swt-user/DMPO.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑