arXiv:2504.15477cs.LG2025-04被引 11

让大模型根据用户在上下文中选出的列表直接优化排序,提升生成质量。

In-context Ranking Preference Optimization

  • 基于推理时的排序列表优化模型,不依赖完整成对比较。
  • 在多个数据集上显著优于传统DPO方法,提升排序准确率。
  • 适合需要灵活反馈的复杂检索任务,如对话与摘要系统。

近期的直接偏好优化(DPO)使大语言模型(LLMs)能作为隐式排序模型,通过最大化偏好与非偏好响应之间的差距来工作。实际应用中,用户对列表的反馈通常仅限于在上下文中识别少数相关项,而非为所有可能的项对提供详细成对比较。许多复杂的信息检索任务,如对话代理和摘要系统,高度依赖将高质量输出排在前列,因此需要支持自然且灵活的用户反馈形式。为解决上下文设置下有限且稀疏的成对反馈问题,我们提出一种在上下文中的排序偏好优化(IRPO)框架,该框架基于推理过程中构建的排序列表直接优化LLM。为进一步捕捉灵活的反馈形式,IRPO扩展了DPO目标函数,同时考虑项的相关性及其在列表中的位置。由于排序指标本质上是离散且不可导的,联合建模这些方面具有挑战性。为此,IRPO引入了一种基于项对偏好位置聚合的可微目标函数,实现离散排序指标的有效梯度优化。我们还提供了理论分析,表明IRPO(i)自动强调模型与参考排序之间分歧更大的项,(ii)其梯度与重要性采样估计器相关联,产生方差更低的无偏估计。实验结果表明,IRPO在排序性能上优于标准DPO方法,验证了其在对齐LLM与直接上下文排序偏好方面的有效性。

原文摘要 · Abstract (English)

Recent developments in Direct Preference Optimization (DPO) allow large language models (LLMs) to function as implicit ranking models by maximizing the margin between preferred and non-preferred responses. In practice, user feedback on such lists typically involves identifying a few relevant items in context rather than providing detailed pairwise comparisons for every possible item pair. Moreover, many complex information retrieval tasks, such as conversational agents and summarization systems, critically depend on ranking the highest-quality outputs at the top, emphasizing the need to support natural and flexible forms of user feedback. To address the challenge of limited and sparse pairwise feedback in the in-context setting, we propose an In-context Ranking Preference Optimization (IRPO) framework that directly optimizes LLMs based on ranking lists constructed during inference. To further capture flexible forms of feedback, IRPO extends the DPO objective by incorporating both the relevance of items and their positions in the list. Modeling these aspects jointly is non-trivial, as ranking metrics are inherently discrete and non-differentiable, making direct optimization difficult. To overcome this, IRPO introduces a differentiable objective based on positional aggregation of pairwise item preferences, enabling effective gradient-based optimization of discrete ranking metrics. We further provide theoretical insights showing that IRPO (i) automatically emphasizes items with greater disagreement between the model and the reference ranking, and (ii) links its gradient to an importance sampling estimator, yielding an unbiased estimator with reduced variance. Empirical results show IRPO outperforms standard DPO approaches in ranking performance, highlighting its effectiveness in aligning LLMs with direct in-context ranking preferences.

排序优化大模型对齐偏好学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。