arXiv:2506.09944cs.CL2025-06EMNLP被引 37

提出查询聚焦的检索头,提升长文本推理与重排序效果

Query-Focused Retrieval Heads Improve Long-Context Reasoning and Re-ranking

  • 根据查询聚合注意力得分,定位关键信息检索头
  • 多跳推理任务上性能超全上下文10%以上
  • 适合需要精准长文本理解的场景

近期研究发现,检索头是长上下文语言模型中负责提取关键信息的注意力头,其行为可通过针堆中找针任务衡量。本文提出QRHead(查询聚焦检索头),通过整合真实任务样本(如长文本问答)中的查询-上下文注意力得分来识别。进一步构建QRRetriever,以QRHead的累积注意力质量作为检索评分,用于选择最相关上下文片段进行推理。在多跳推理任务LongMemEval和CLIPPER上,该方法性能超越全上下文输入超过10%,优于强密集检索器。在BEIR基准上作为重排序器使用时,零样本表现优异,超越RankGPT等基于LLM的重排序器。分析表明,查询-上下文注意力评分与任务选择对获取下游有效检索头至关重要。本工作贡献了一个通用检索器,并揭示了长上下文语言模型的能力机制。

原文摘要 · Abstract (English)

Recent work has identified retrieval heads, a subset of attention heads responsible for retrieving salient information in long-context language models (LMs), as measured by their copy-paste behavior in Needlein-a-Haystack tasks. In this paper, we introduce QRHead (Query-Focused Retrieval Head), an improved set of attention heads that enhance retrieval from long context. We identify QRHead by aggregating attention scores with respect to the input query, using a handful of examples from real-world tasks (e.g., long-context QA). We further introduce QRRetriever, an efficient and effective retriever that uses the accumulated attention mass of QRHead as retrieval scores. We use QRRetriever for long-context reasoning by selecting the most relevant parts with the highest retrieval scores. On multi-hop reasoning tasks LongMemEval and CLIPPER, this yields over 10% performance gains over full context and outperforms strong dense retrievers. We also evaluate QRRetriever as a re-ranker on the BEIR benchmark and find that it achieves strong zero-shot performance, outperforming other LLM-based re-rankers such as RankGPT. Further analysis shows that both the query-context attention scoring and task selection are crucial for identifying QRHead with strong downstream utility. Overall, our work contributes a general-purpose retriever and offers interpretability insights into the long-context capabilities of LMs.

长文本推理检索头重排序

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