让文档嵌入更懂上下文,提升检索效果。
Contextual Document Embeddings
- 用邻居文档信息构建上下文感知的嵌入表示
- 在多个场景下优于传统双编码器,跨域表现更优
- 无需复杂技巧,通用性强,适合各类对比学习任务
密集文档嵌入是神经检索的核心。当前主流方法直接对单个文档运行编码器生成嵌入。本文认为这些嵌入虽有效,但在实际检索场景中隐含脱离上下文的问题,应同时考虑文档及其邻近文档的上下文信息,类似词的上下文嵌入。为此提出两种互补方法:一是将邻居文档纳入批次内上下文损失的对比学习目标;二是设计新架构,显式编码邻居文档信息到嵌入表示中。实验表明,两种方法均在多个设置下优于双编码器,尤其在跨域场景差异显著。在MTEB基准上取得当前最优结果,且无需硬负样本挖掘、分数蒸馏、特定数据集指令、GPU间样本共享或超大批次。该方法可应用于任何对比学习数据集和双编码器,显著提升性能。
原文摘要 · Abstract (English)
Dense document embeddings are central to neural retrieval. The dominant paradigm is to train and construct embeddings by running encoders directly on individual documents. In this work, we argue that these embeddings, while effective, are implicitly out-of-context for targeted use cases of retrieval, and that a contextualized document embedding should take into account both the document and neighboring documents in context - analogous to contextualized word embeddings. We propose two complementary methods for contextualized document embeddings: first, an alternative contrastive learning objective that explicitly incorporates the document neighbors into the intra-batch contextual loss; second, a new contextual architecture that explicitly encodes neighbor document information into the encoded representation. Results show that both methods achieve better performance than biencoders in several settings, with differences especially pronounced out-of-domain. We achieve state-of-the-art results on the MTEB benchmark with no hard negative mining, score distillation, dataset-specific instructions, intra-GPU example-sharing, or extremely large batch sizes. Our method can be applied to improve performance on any contrastive learning dataset and any biencoder.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。