用大模型提升检索性能,同时控制线上延迟。
ScalingNote: Scaling up Retrievers with Large Language Models for Real-World Dense Retrieval
- 分两阶段训练:先用大模型初始化双塔,再蒸馏查询塔降低推理开销。
- 在工业场景下验证了稠密检索的缩放规律,效果优于端到端模型。
- 适合需要高召回率且对响应时间敏感的生产级检索系统。
当前工业界稠密检索主要采用双塔架构,为满足在线部署需求,现有系统多通过设计负样本采样策略提升性能,忽视了模型规模扩展的优势。近期大语言模型(LLMs)展现出优异性能,可被用于提升稠密检索能力。然而,直接扩大检索模型会显著增加线上查询延迟。为此,我们提出ScalingNote,一种两阶段方法,在利用大模型缩放潜力的同时保持低在线延迟。第一阶段使用同一大模型初始化双塔,释放其在稠密检索中的潜力;第二阶段仅对查询塔进行蒸馏,采用均方误差和余弦相似度损失,降低在线计算成本。通过理论分析及全面离线与在线实验,证明ScalingNote在有效性和效率上的优势。其两阶段缩放方法超越端到端模型,并验证了在工业场景中稠密检索的缩放规律,实现了低成本、高性能的稠密检索系统扩展。集成ScalingNote的在线方法显著提升了检索文档与查询的相关性。
原文摘要 · Abstract (English)
Dense retrieval in most industries employs dual-tower architectures to retrieve query-relevant documents. Due to online deployment requirements, existing real-world dense retrieval systems mainly enhance performance by designing negative sampling strategies, overlooking the advantages of scaling up. Recently, Large Language Models (LLMs) have exhibited superior performance that can be leveraged for scaling up dense retrieval. However, scaling up retrieval models significantly increases online query latency. To address this challenge, we propose ScalingNote, a two-stage method to exploit the scaling potential of LLMs for retrieval while maintaining online query latency. The first stage is training dual towers, both initialized from the same LLM, to unlock the potential of LLMs for dense retrieval. Then, we distill only the query tower using mean squared error loss and cosine similarity to reduce online costs. Through theoretical analysis and comprehensive offline and online experiments, we show the effectiveness and efficiency of ScalingNote. Our two-stage scaling method outperforms end-to-end models and verifies the scaling law of dense retrieval with LLMs in industrial scenarios, enabling cost-effective scaling of dense retrieval systems. Our online method incorporating ScalingNote significantly enhances the relevance between retrieved documents and queries.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。