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

可扩展的基于生成模型的情境内排序

Scalable In-context Ranking with Generative Models

UT Austin(得克萨斯大学);Google(谷歌)

Nilesh Gupta, Chong You, Srinadh Bhojanapalli, Sanjiv Kumar, Inderjit Dhillon, Felix Yu

AI总结:

本文提出BlockRank方法,利用LLM注意力中的块稀疏性和查询-文档相关性结构,将注意力复杂度从二次降为线性,在保持性能的同时实现高效可扩展的情境内排序。

摘要:

情境内排序(ICR)是信息检索(IR)领域的一种新兴范式,它通过将任务描述、候选文档和查询直接纳入模型的输入提示中,并让大型语言模型(LLM)识别相关文档,从而利用LLM的上下文理解能力。尽管这种方法有效,但效率是该范式面临的一个重大挑战,尤其是随着候选列表的增长,因为注意力操作随上下文长度呈二次方或超线性扩展。为此,本文首先识别了针对ICR微调的LLM注意力中固有的且可利用的结构:(1)文档间块稀疏性:注意力在每个文档块内部密集,但在上下文中不同文档之间稀疏;(2)查询-文档块相关性:中间层中某些查询令牌对文档块的注意力分数与该文档的实际相关性密切相关。基于这些观察,我们提出了BlockRank(块级情境内排序),一种新颖的方法,它通过以下方式调整LLM中的注意力操作:(a)在架构上强制实现观察到的文档间块稀疏性,将注意力复杂度从二次方降低到线性,且性能无损;(b)在微调期间使用辅助对比训练目标优化真实相关文档的查询-文档块相关性,提高注意力中的检索效果。在BEIR、MSMarco和NQ上使用Mistral-7B进行的实验表明,BlockRank Mistral在匹配或超越现有最先进的列表式排序器和受控微调基线的同时,在推理时显著更高效(对于上下文中的100个MSMarco文档,速度提升4.7倍),并能优雅地扩展到长上下文候选列表,在一秒内处理约500个文档(约100K上下文长度),为ICR提供了一种可扩展且有效的解决方案。

英文摘要:

In-context Ranking (ICR) is an emerging paradigm for Information Retrieval (IR), which leverages contextual understanding of LLMs by directly incorporating the task description, candidate documents, and the query into the model's input prompt and tasking the LLM to identify relevant document(s). While it is effective, efficiency is a significant challenge in this paradigm, especially as the candidate list grows due to quadratic/super-linear scaling of attention operation with context length. To this end, this paper first identifies inherent and exploitable structures in the attention of LLMs finetuned for ICR: (1) inter-document block sparsity: attention is dense within each document block but sparse across different documents in the context; and (2) query-document block relevance: the attention scores from certain query tokens to a document block in middle layers strongly correlate with that document's actual relevance. Motivated by these observations, we introduce BlockRank (Blockwise In-context Ranking), a novel method that adapts the attention operation in an LLM by (a) architecturally enforcing the observed inter-document block sparsity, reducing attention complexity from quadratic to linear without loss in performance, and (b) optimizing query-document block relevance for true relevant documents during fine-tuning using an auxiliary contrastive training objective, improving retrieval in attention. Experiments on BEIR, MSMarco and NQ with Mistral-7B demonstrate that BlockRank Mistral matches or outperforms existing SOTA listwise rankers and controlled fine-tuned baseline while being significantly more efficient at inference (4.7x for 100 MSMarco documents in context) and scaling gracefully to long-context shortlists, around 500 documents in-context (approximately 100K context length) within a second, presenting a scalable and effective solution for ICR.

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

↑