arXiv:2412.14574cs.IRcs.CL2024-12被引 13

用长上下文大模型实现全量文档一次性排序,效率更高且效果更好

Sliding Windows Are Not the End: Exploring Full Ranking with Long-Context Large Language Models

  • 通过单次推理完成所有文档排序,避免滑动窗口重复计算
  • 在监督微调下性能超越传统方法,推理成本降低近90%
  • 提出完整列表标签构建与重要性感知学习目标,提升排序精度

大语言模型在列表式文档排序任务中表现优异。受限于输入长度,现有方法多采用滑动窗口策略,导致重复、串行处理,多次重评相关文档,造成冗余API开销,与推理令牌数成正比。长上下文大模型的出现使得单次推理即可完成全部文档排序,避免重复计算。本文系统研究了长上下文LLM在排序任务中的效率与有效性。实验表明,全量排序在监督微调设置下不仅性能更优,且效率大幅提升。然而,现有微调方法存在两个局限:(1)滑动窗口无法生成完整排序列表作为训练标签;(2)语言建模损失无法突出标签中前列文档的标识。为此,我们提出一种新的完整列表标签构造方法和一种重要性感知的学习目标。实验验证了该方法在多个数据集上的优越性。代码已开源。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have shown exciting performance in listwise passage ranking. Due to the limited input length, existing methods often adopt the sliding window strategy. Such a strategy, though effective, is inefficient as it involves repetitive and serialized processing, which usually re-evaluates relevant passages multiple times. As a result, it incurs redundant API costs, which are proportional to the number of inference tokens. The development of long-context LLMs enables the full ranking of all passages within a single inference, avoiding redundant API costs. In this paper, we conduct a comprehensive study of long-context LLMs for ranking tasks in terms of efficiency and effectiveness. Surprisingly, our experiments reveal that full ranking with long-context LLMs can deliver superior performance in the supervised fine-tuning setting with a huge efficiency improvement. Furthermore, we identify two limitations of fine-tuning the full ranking model based on existing methods: (1) sliding window strategy fails to produce a full ranking list as a training label, and (2) the language modeling loss cannot emphasize top-ranked passage IDs in the label. To alleviate these issues, we propose a new complete listwise label construction approach and a novel importance-aware learning objective for full ranking. Experiments show the superior performance of our method over baselines. Our codes are available at \url{https://github.com/8421BCD/fullrank}.

排序大模型长上下文效率优化

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