大数跨境
0
0

QZhou-Embedding:具有卓越文本表示能力的通用上下文化文本嵌入模型

QZhou-Embedding:具有卓越文本表示能力的通用上下文化文本嵌入模型 我爱数据科学
2025-09-13
0
导读:我们介绍了 QZhou-Embedding,这是一种具有卓越文本表示能力的通用上下文化文本嵌入模型。该模型基于 Qwen2.5-7B-Instruct 基础模型构建,我们设计了一个包含专门的数据转换和

Peng Yu, En Xu, Bin Chen, Haibiao Chen, Yinfei Xu 金山人工智能* 2025 年 8 月

摘要

我们介绍了 QZhou-Embedding,这是一种具有卓越文本表示能力的通用上下文化文本嵌入模型。该模型基于 Qwen2.5-7B-Instruct 基础模型构建,我们设计了一个包含专门的数据转换和训练策略的统一多任务框架。数据转换方案能够整合更多样化的文本训练数据集,而针对特定任务的训练策略则提高了模型的学习效率。我们开发了一个利用 LLM API 的数据合成管道,整合了诸如释义、增强和困难负样本生成等技术,以提高训练集的语义丰富度和样本难度。此外,我们采用了两阶段训练策略,包括初始的以检索为重点的预训练,随后是全任务微调,使嵌入模型能够在基于强大的检索性能的基础上扩展其能力。我们的模型在 MTEB 和 CMTEB 基准测试中取得了最先进的结果,在两个排行榜上均排名第一(截至 2025 年 8 月 27 日),同时在包括重排、聚类等任务上也实现了最先进的性能。我们的研究结果表明,更高质量、更多样化的数据对于提升检索模型性能至关重要,而利用 LLM 的生成能力可以进一步优化数据质量,为嵌入模型的突破提供支持。我们的模型权重已在 HuggingFace*上发布,采用 Apache 2.0 许可证。为了可复现性,我们提供了评估代码和说明。

1 引言

文本嵌入模型将自然语言文本转换为数学向量表示,在文本挖掘、问答系统、推荐系统和检索增强生成等领域发挥着不可或缺的作用。近年来,基于 LLM 的代理技术发展迅速并被广泛采用,嵌入模型将文本或多模态数据转换为向量表示,用于知识库构建,显著增强了代理系统在实时性能、长期记忆、数据隐私保护和知识整合能力方面的表现。随着神经网络和深度学习的不断发展,文本嵌入从早期的稀疏表示(例如 BM25[1])发展到基于微调深度网络的密集表示,如 BERT[2] 和 T5[3],从而实现了显著的性能提升[4][5][6][7][8]。2022 年,大型语言模型(LLMs)的兴起,以 ChatGPT[9] 为例,开启了一个基于 LLM 表示的文本嵌入新时代,包括 textembedding-3-large 和 RepLLaMA[10] 等模型。最近关于优化文本嵌入模型的研究探索了不同的视角和重点。例如,为了解决仅解码器架构的局限性——因果注意力机制限制了标记嵌入对单向语义的捕捉——提出了几种方法:Echo Embedding[11] 利用输入重复和指令设计,使前面的标记能够捕捉后续标记的语义;LLM2Vec[12] 修改注意力为双向机制,消除了向后依赖约束;Conan-Embedding-v2[13] 提出了一种新颖的软掩蔽机制,结合动态秩降低。另一种广泛采用的方法是知识蒸馏,将文本嵌入视为代表文本语义的“信号状态”。通过从表现优异的教师模型向学生模型蒸馏知识,目标是优化嵌入性能。例如,Jasper[14] 采用多阶段知识蒸馏框架,结合多个精心设计的损失函数,最终取得了优异的结果。Debater[16] 提出了一种逐步思考机制,用于嵌入生成,通过持续的 COT 逐步优化文档表示,并将蒸馏应用于约束最终标记表示,从这些思考步骤中学习最优的语义状态。此外,困难负样本挖掘已成为文本嵌入模型的一个关键研究方向,作为模型优化的关键技术。ANCE[18] 发现传统的密集检索训练会导致优化过程中梯度范数逐渐减小。因此,他们开发了一种异步近似最近邻(ANN)索引机制,定期使用当前模型参数刷新负样本池,从而确保维护最新且具有挑战性的负样本。Conan-Embedding[24] 及其 v2 版本都纳入了类似的动态困难负样本挖掘技术,以提高模型性能。NV-Embed[19] 通过利用其先前开发的 NV-Retriever[20] 的正样本感知负样本挖掘策略,包括 TopK-MarginPos 和 TopKPercPos 过滤,实现了另一种方法。

在本工作中,我们介绍了 QZhou-Embedding,该模型基于强大的 Qwen2.5-7B-Instruct[21] 模型构建,推动了文本嵌入能力的边界。为了增强模型的语义理解能力,我们设计了一个统一的多任务学习框架,不仅能够容纳更多样化的训练数据,还能在检索、自然语言推理(NLI)和分类这三个关键任务中实现高效学习。我们的框架包含两个核心组成部分:1. 数据转换:我们精心调整数据格式以满足检索、NLI 和分类任务的具体要求,从而能够从异构数据源中有效提取特征,显著惠及检索模型训练。2. 训练策略:我们根据每个任务的特征设计了专门的损失函数,优化模型训练效率。为了进一步提高向量表示的鲁棒性和泛化能力,我们提出了一种数据合成方法,采用三种技术应对数据稀缺问题:释义 & 数据增强用于有限数据集,困难负样本生成用于负样本丰富。在此基础上,我们设计了一种名为“数据分组策略”的策略,实现在单个数据集内的批量采样,无意中通过从同一分布中进行批量内负样本采样增加了训练难度。对于模型训练,我们采用了两阶段训练方法,通过第一阶段的检索训练和第二阶段的全能力训练,我们的模型在检索能力上奠定了坚实的基础,同时有效地扩展到多个能力维度。我们的模型在 CMTEB[22] 和 MTEB[23] 基准测试中取得了最先进的平均分数,在两个 CMTEB 和 MTEB 排行榜上均排名第一,证明了我们方法的有效性。我们工作的贡献总结如下:

  • 我们提出了一个统一的多任务学习框架,系统地协调数据处理和训练流程,增强数据集的多样性以及模型训练的效率;
  • 我们开发了由 LLM 驱动的先进数据合成技术,包括释义、数据增强和困难负样本生成。这些方法显著提高了训练语料库的质量,从而提高了模型的鲁棒性和泛化能力;
  • 我们采用了一个两阶段训练范式:第一阶段专注于检索能力构建,建立强大的基础检索性能;第二阶段实施平衡训练,控制检索/非检索任务比例,实现在分类(CLS)、成对分类(PairCLS)和语义文本相似性(STS)任务上的卓越性能,同时保持检索有效性;
  • 我们的模型在 MTEB 和 CMTEB 基准测试中取得了最先进的性能,验证了我们所提出方法的有效性。

2 相关工作

2.1 文本嵌入模型

文本向量表示是自然语言处理(NLP)的一个基础研究领域,是语言理解的基石。早期方法依赖于稀疏向量表示,如 TF-IDF[25]、BM25[26] 和 LSA[27]。随着预训练语言模型的出现,基于 BERT[2] 和 T5[3] 架构的密集上下文化表示得到了广泛研究和应用[4][5][6]。在大型语言模型(LLMs)时代,主要进展导致了基于 LLM 的嵌入模型的发展,如 text-embedding-3-small/large(OpenAI)、E5-Mistral-7B[28]、SFR-Embedding-Mistral[29]、SFR-Embedding-2R[30]、GRITLM[31]、LLM2Vec[12]、RepLLaMA[10]、BGE-en-icl[32]、NV-Embed[19]、gte-Qwen2-7B-Instruct[33]、Qwen3-Embedding[34] 等。这些模型得益于优化的 LLM 架构——例如 RoPE 位置编码[35]、RMSNorm[36] 和 GeGLU 激活[37]——结合了通过大规模预训练获得的强大语义上下文化能力。因此,基于 LLM 的嵌入在检索和相关方面实现了卓越的性能。

2.2 嵌入模型训练

主流方法目前涉及在无监督/弱监督语料库上进行对比学习预训练,以及在高质量标记的正负样本上进行监督对比学习训练。在无监督学习中,早期工作如 SimCSE[7] 提出同时输入原始文本和噪声增强文本,同时采用对比学习来增强模型的判别性表示能力。对于弱监督学习,gte[33] 利用大规模结构化数据(网络搜索数据、标题-文章对等)进行预训练,随后在高质量开源检索训练数据上进行微调,以较少的参数量实现了与 OpenAI 嵌入相当的性能。Conan-Embedding[24] 及其 v2 版本同样采用了弱监督预训练和监督微调的方法,但纳入了跨 GPU 批量损失平衡、动态困难负样本挖掘以及软掩蔽(v2)等技术来优化模型。Seed1.6-Embedding[38] 采用分阶段训练策略,结合文本和多模态预训练,随后进行特定于业务场景的微调,实现了卓越的表示性能。

在建模不同任务方面,也开展了大量研究。Piccolo2[39] 引入了针对多样化下游任务的多任务混合损失函数,我们也在研究中采用了这种方法。SFR-Embedding[30] 利用多任务学习技术来规范嵌入,显著增强了领域数据的区分度。Xiaobuembedding 从圆周损失[40]的角度统一处理了 CMTEB 的主要问题类别,充分利用了原始数据集中的多个正样本,同时仔细平衡了不同的损失。

2.3 数据合成

数据的数量和质量是模型优化中最为关键的因素,由于人工标注成本高昂,数据合成方法已成为一个关键的研究方向。Doc2Query[41] 和 Query2Doc[42] 分别利用问答模型生成伪查询和伪文档,以增强数据,从而提升 RAG 的性能。Promptagator[43] 针对少样本检索场景,通过少样本演示和标注生成具有多样化意图的查询,有效地提升了跨不同意图或分布的检索能力。GPL[44] 利用现有的 T5 编码器 - 解码器模型生成查询,使用现有的检索模型检索相似段落作为困难负样本,并采用交叉编码器对每个(查询,段落)对进行评分。Unnatural Instructions[45] 利用提示和上下文学习(ICL)技术,通过受控的指令、输入和约束生成合成示例,从几个种子示例中生成了 64k 多样化的数据条目,并取得了有希望的实验结果。Qwen3-Embedding[34] 设计了一种多样化的提示策略,通过为文档分配特定的角色来模拟潜在用户对该文档的查询,使 LLM 能够生成风格真实的查询,从而增强多样性和<|start_header_id|>Kingsoft AI QZhou-Embedding 技术报告<|end_header_id|>

2.4 困难负样本挖掘技术

困难负样本在检索模型训练的对比学习中是必不可少的组成部分。早期工作如 ANCE[46] 提出了一种异步 ANN 索引机制,定期使用检查点状态更新困难负样本,以保持最具挑战性的样本。Conan-Embedding[24] 及其 v2 版本通过排除和刷新低于阈值的样本,实现了动态困难负样本采样策略。NV-Retriever[47] 提出了正样本感知负样本挖掘,引入了 TopK-MarginPos 和 TopKPercPos 过滤标准,以最小化假负样本。LGAI-Embedding[17] 在 NV-Retriever 的策略基础上,采用了基于自适应边界的挖掘策略,使用 ANNA IR 作为教师检索模型来识别高质量的困难负样本,同时使用 TopKPercPos 过滤来消除假负样本。

3 统一多任务学习框架

嵌入模型支持多种下游任务,包括检索、重排、STS 和分类。鉴于这些任务的多样性及其相关数据的复杂性,我们探索了一种统一的策略,以有效地集体处理它们,同时促进对嵌入模型的优化。现有的统一任务处理研究包括圆周损失[40],它从全局角度处理句子对相似性,将任务分为类别级标签和成对标签。Xiaobuembedding 通过采用这种方法实现了显著的改进。其他模型如 Piccolo2[39]、SFR-Embedding[30]、NV-Embed[47]、Conan-Embedding[24] 和 Conan-Embedding-v2 都采用了多任务学习,使用多样化的训练数据,并采用了不同的标签处理方法,其中一些采用了特定于任务的损失(InfoNCE[48]、Cosent[49]、

我们的设计原则旨在容纳更多任务和数据类型,使跨领域和跨任务数据能够有效地增强嵌入能力。我们提出了一个统一的多任务学习框架,将训练数据分为三种任务类型:检索、NLI 和分类,并为每种类型提供定制的数据和训练解决方案,允许大多数自然文本数据通过这个框架转换为嵌入训练数据。以下各节详细介绍了框架的组成部分和实现。

3.1 模型架构

基于 BERT 或 T5[39][15][50][24] 的嵌入模型展现出了强大的上下文化表示能力,这主要归功于它们的双向注意力机制。然而,最近的大型语言模型主要采用仅解码器架构,其单向注意力显著限制了标记捕捉上下文信息的能力。几项研究通过架构修改或注意力机制优化解决了这一限制[12][31][47]。我们的工作基于 Qwen2.5-7B-Instruct 架构和检查点,因其卓越的中文语言上下文化能力。因此,我们实施了以下修改:(1) 将原始因果注意力改为双向注意力,以实现全面的上下文捕捉;(2) 采用均值池化并随后进行归一化,以产生最终的嵌入向量。模型架构如图 1 所示。


图 1:QZhou-Embedding 架构


3.2 数据转换

3.2.1 面向检索的处理

尽管开源数据集如 MS MARCO[64] 易于获取,但它们单独不足以进一步提升嵌入模型能力,因此我们补充了来自其他来源的数据,如新闻、学术论文和问答数据集。鉴于这些数据集在领域和目的上的异质性,我们设计了一种面向检索的数据转换方法,将不同来源和格式转换为适合检索任务的训练数据。以下是用于转换的选定类别的训练数据及其处理过程:

  • 标题 - 正文 / 摘要 “标题 - 正文 / 摘要” 类型数据主要由标题 - 正文 / 文章对组成,通常来源于在线新闻、文章、文档、arXiv 出版物和维基百科。对于这些数据类型,转换过程涉及使用标题作为查询,正文 / 摘要作为正样本。然而,由于后者是文档,当它们超过最大训练长度时,会应用截断。

  • 声明 - 证据 这种数据类型通常呈现一个声明或陈述,随后是提取的证据,这些证据要么支持要么反驳  ,通常用于多跳事实提取和声明验证任务。数据集通常包含声明和相应的证据,每个证据实例被标记为 “支持” 或 “反驳”。转换过程涉及:将声明部分转换为查询样本,对于标记为 “支持” 的证据,文本被视为正样本;对于标记为 “反驳” 的证据,它被转换为负样本。

  • 问题 - 答案 问答数据和对话式问答对主要来源于聊天平台和论坛。在当前的 LLM 和强化学习研究浪潮中,此类数据展现出显著的体量和多样性。单轮问答数据集(一个问题配对一个答案)是最适合检索训练的格式。对于转换,“问题 / 查询 / 用户” 部分被转换为查询,而 “答案 / 回复 / 助手” 部分被处理为文档。

3.2.2 面向 NLI 的处理

自然语言推理(NLI)是 NLP 模型的一个基础能力,涵盖诸如语义相似性、文本蕴含和情感分析等任务。本节描述了从 NLI 风格数据转换和构建训练集的方法,以语义文本相似性(STS)和文本蕴含任务为例进行说明。我们的方法独特地将 NLI 任务重新表述为与 Cosent 损失[49] 训练策略兼容的文本对 - 分数格式,其中样本对根据其语义关系定量评分。以下是每种任务的处理过程:

  • STS 语义文本相似性(STS)以对称的语义匹配为特征,以确定两个句子是否具有等效的含义。STS 数据集通常由带有相关标签的句子对组成,这些标签可以是二元分类(是 / 否、真 / 假)或数值分数(1.2、3.1、4.8)。对于二元标签,“是” / “真” 被映射为数值 1,而 “否” / “假” 转换为 0。数据随后被结构化为(查询,文档,分数)三元组。由于 STS 的对称性,每个原始数据样本可以通过交换查询和正文档的角色生成两个训练三元组。

  • 文本蕴含 文本蕴含进一步考察模型的推理能力,通常具有三个类别标签:蕴含、中立、矛盾。我们的处理方法采用三级评分系统:标签分别被赋予 2、1 和 0 的值,对应于蕴含、中立和矛盾。我们相应地构建(查询,文档,分数)三元组,并且同样利用对称性将数据集大小翻倍。

3.2.3 面向 CLS 的处理

分类任务涵盖文本分类和情感分类场景,通常遵循(文本,标签)格式,其中同一类别的文本在语义上具有相似性,而不同类别之间存在明确的界限。NVEmbed[47] 比较了基于标签和基于示例的数据构建方法,实验结果表明后者的优越性。采用基于示例的方法,我们处理分类数据(文本,标签),将文本作为查询,从具有相同标签的其他文本中采样正样本,并从不同标签的文本中选择负样本。图 2 提供了这一过程的详细示意图。

图 2:面向 CLS 的数据转换

3.3 训练策略

每个任务类别——检索、NLI 和分类——都在各自的数据构建过程中运行,针对它们我们设计了专门的训练目标以提高模型训练效率。本节详细阐述了检索、NLI 和分类任务的损失函数设计。

3.3.1 检索

对于检索任务,我们采用广泛使用的 InfoNCE 损失[48],但受 gte[33] 的启发,通过在原始查询 - 负样本损失中增加一个额外的查询 - 查询损失项进行改进。具体来说,每个查询   在一个批次内被视为所有其他查询的负样本。最终的损失公式明确描述在公式(1)中。

3.3.2 NLI

对于 NLI 任务,转换后的标签在数值上具有可比性,并且表现出序数关系。我们采用 Cosent 损失[49] 来优化此类数据,该损失是基于 Circle 损失[40] 的原则设计的。作为一种对排名敏感的损失函数,Cosent 损失只需要序数标签信息进行优化,同时表现出更快的收敛速度。其数学公式在公式(2)中给出。

3.3.3 CLS

分类损失也采用 InfoNCE 目标。然而,由于 CLS 数据是基于示例进行处理的,直接在具有有限类别的分类数据集上应用批量内负样本采样可能会导致来自不同类别的项目产生假负样本。许多研究提出了多种方法来解决这一问题[51][52][47]。我们提出了一种掩蔽机制,在预处理期间将类别标签附加到每个正样本和负样本上(作为单独的变量记录,而不是修改原始文本)。在批量内负样本采样期间,对于来自其他数据实例的每个负样本,我们检查其标签是否与当前查询的类别匹配。如果匹配,则将负样本的损失贡献掩蔽为零,以防止错误的惩罚;否则,正常计算。核心损失仍然是 InfoNCE,CLS 损失公式如下所示。其中   表示样本   的类别标签,  表示每个数据实例的负样本数量。

其中

并且


4 数据合成

通过数据合成生产更高质量的数据在嵌入训练中获得了关键的重要性。人工标注成本高昂且生产效率低下,因此开发有效的自动化数据合成方法已成为一个关键的研究重点。最近大型语言模型(LLMs)的发展显著提高了它们的语言能力,能够准确地解释人类指令并生成高质量的输出。许多现有方法有效地利用 LLMs 生成高质量数据[28][34],我们同样利用 LLM 的能力,在结构多样性、语义多样性和难度三个维度上进行数据合成,针对每个维度有专门的合成策略。为了增强结构多样性,我们提出释义技术;为了增强语义多样性,我们引入增强方法;为了增加训练难度并提高语义区分能力,我们利用 LLMs 生成更具挑战性的困难负样本。以下各节详细介绍了这些方法。所有数据合成技术的约束组件在附录 A.1 的表 5 中指定。

4.1 结构多样性增强

文本的语言结构包括词汇、句法和语法特征,这些相对表面的特征反映了词汇的排列、组合、时态、语态等正式属性。嵌入模型必须准确地捕捉底层语义,尽管表面形式存在变化,以确保对外部结构变化的鲁棒性。例如,以下两个句子,尽管结构不同,但应该被识别为语义等价:

  • The cat chased the mouse.

  • The mouse was chased by the cat.

为了有效地训练一个对结构变化保持不变但能够准确捕捉语义信息的嵌入模型,我们提出了一种释义策略。对于每个包含查询和正文档的训练样本,我们应用基于 LLM 的释义,生成在语义上等价但结构上不同的增强实例。提示约束和工作流程如图 3 所示。

图 3:基于 LLM 的释义工作流程

4.2 语义多样性增强

仅仅通过表面结构修改来增强数据,对于模型能力的提升作用微乎其微,因为泛化不仅依赖于结构解耦,还需要多样化的主题和内容,以确保在空间域中均匀的向量表示。因此,除了释义之外,我们提出了一种利用 LLM 进行增强的方法,以多样化语义。核心概念是:给定一个完整的(查询,正样本)对,模型必须理解所讨论的领域和观点,并学会在保持上下文锚定的同时,扩展到不同的主题、方面和观点。这一过程通过提示约束进行管理。增强框架如图 4 所示。

图 4:语义增强工作流程

4.3 更具挑战性的嵌入

困难负样本对于提升文本嵌入模型的性能至关重要,通常需要付出相当大的努力才能获得。利用大型语言模型的语义能力,我们设计了一种针对检索数据集的自动化困难负样本合成方法。我们的特定领域实验表明,大型语言模型能够生成难以区分的示例,框架如图 5 所示。

在数据释义和增强过程中,我们实施了特定于任务的策略:对于检索任务,我们重写/扩展(查询,正样本)对,并将其添加到原始数据集中;对于 NLI 任务,我们通过随机复制包含原始句子的现有条目并用重写版本替换它们来重写单个句子,以实现数据扩展——为了避免歧义,不应用增强;对于分类任务,我们在保留原始标签的同时重写句子,使用重写的结果进行基于示例的处理,同样不采用增强。我们在附录 A.3 中提供了一些数据合成示例。

图 5:困难负样本合成工作流程

5 训练优化

5.1 数据分组策略

先前的工作,如 Linq-Embedding[52] 和 SFR-Embedding-Mistral[30],采用了任务同质化批处理,按任务而非混合它们对数据进行分区,并在训练期间基于加权随机性对任务进行采样。在此基础上,我们提出了一个改进的数据分组策略,将粒度从任务级别扩展到数据集级别分区。我们认为,数据集级别的分组能够捕捉到更具领域特定性的聚类模式——同一数据集内的样本往往具有内在的领域相似性,而这种一致性在跨数据集时可能并不成立。

我们的方法按名称将训练数据划分为子集。在训练过程中,每个批次仅从单一数据集中采样,并记录文件指针以便在后续迭代中进行顺序读取。对于采样权重,我们采用了 gte[33] 和 mgte[50] 中的数据采样策略,按数据集大小对权重进行缩放,随后进行归一化。对于大小为   的数据集 i,其采样权重按照公式(4)计算:

5.2 两阶段训练

受 NV-Embed[47] 的两阶段对比学习指令微调技术的启发,我们采用了类似的训练方法:第一阶段仅使用面向检索的训练数据,而第二阶段整合了检索和非检索任务。整体训练框架如图 6 所示。我们引入了两个关键区别:首先,我们整合了前面描述的数据分组策略;其次,我们对检索训练数据集的采样比例进行全局控制,因为我们的发现表明,天真地纳入额外数据会显著降低检索性能。

为了全局控制采样比例,在采样函数中引入了一个超参数 η 以控制检索训练的比例,确保在整个第二阶段训练中,检索数据的计算贡献占  ,而非检索数据占  。以下方程组形式化了从分区数据集到采样比例确定的计算过程。设训练数据为  ,其中每个   代表一个不同的数据集(例如,MSMARCO passage、SQUAD),对应大小为  。按照上述策略,我们首先应用一个指数缩放因子  ,随后应用一个掩蔽因子   以过滤检索和非检索训练集进行求和。方程如下:

其中

这里,RET 表示检索训练数据集的集合。然后使用 η 对检索比例进行缩放,以得出训练集的最终归一化采样比例:

其中

6 实验

6.1 训练数据集

主要数据来源包括 bge-en-icl、bge-m3-data 和 bge-multilingual-gemma2-data。E5 数据集(约 150 万样本),在 E5-Mistral-7B[28]、Echo Embedding[11] 和 LLM2Vec[12] 中被采用,也被纳入其中。上述数据集包括常用的检索训练语料库,如 MS MARCO(passage 和 document 版本)、Natural Questions (NQ)、ELI5、HotpotQA、MIRACL、SQuAD、FEVER、Quora Question Pairs (QQP) 和 DuReader 等。先前的研究人员已经系统地收集和整理了这些数据集,使其易于使用,我们仅利用所提出的方法更新了更困难的负样本。Stella 的检索数据 llm 提供了高质量的(查询,正样本,负样本)三元组,而 zpoint 利用了诸如 Huatuo 医疗 QA 等数据集,所有上述数据都已纳入。额外的数据来自 huggingface 的 sentence-transformers 仓库,包括 reddit、hover、mr-tydi、law-gpt 和 s2orc。

其他来源包括 web questions、BioASQ、cmrc、CSL、用于 simcse(在 SimCSE 和 GTE 中使用)的 nli、GLUE Benchmark、Yelp Reviews 和 Weibo Sentiment 训练集。

我们进一步整合了与 MTEB 评估相关的数据集,如 Imdb-Classification、MassiveIntent-Classification、MassiveScenario-Classification、STS12、LCQMC、PAWSX 和 STSB,我们使用这些数据集的训练分割,并应用排除高度相似于测试集的样本的去污处理。

对于需要格式转换的数据集,我们应用了第 3.2 节中描述的方法。对于样本有限的数据集(例如,bge 和 e5 系列的子集、ImdbClassification、STS12、LCQMC),我们通过释义和增强(通常应用于样本少于 6 万的数据集)进行增强,我们最终通过 API 接口获得了大约 500 万高质量训练样本。我们对所有训练集进行了去重,并使用 GTE-Qwen2-7BInstruct 过滤掉查询 - 正样本分数低的样本。

对于缺乏困难负样本的检索数据,我们采用合成困难负样本生成。由于 API 成本限制,只有 30% 的困难负样本是合成生成的;其余部分由 stella-large-zh-v3-1792d 生成,选择 top-10 到 top-30 的结果作为困难负样本。最终训练数据集包含 1100 万四元组(查询,正样本,负样本,指令)。

6.2 训练集指令

对于大多数包含指令格式的训练数据,我们保留其原始内容。对于 MTEB 训练集,我们采用了与其评估(与 Qwen3-Embedding 运行时一致)相对应的指令。对于缺乏指令的外部数据(例如,Huatuo、Reddit、Law-GPT、GLUE),我们设计了特定于任务和领域的指令。部分指令模板在附录 A.2 中提供。

6.3 训练细节

如前所述,我们采用两阶段训练方法。在第一阶段的检索训练中,我们在所有检索数据集上进行训练,设置 300 步的热身阶段,学习率为 3e-5,总训练步数为 32k。在第二阶段,我们使用所有训练数据,将学习率设置为 2e-5,并训练 8k 步,保持与第一阶段相同的所有其他配置。我们为使用 InfoNCE 损失的数据(即,检索和分类)采用 256 的批量大小,考虑到使用 Cosent 损失的数据(即,NLI)由于缺少负样本的前向计算而内存消耗较低,因此将批量大小设置为 768。在所有阶段中,我们采用 bfloat16 精度,使用 4 个困难负样本,余弦温度为 0.02,并使用 Adam 优化器,权重衰减为 0.01。数据分组策略在两个阶段之间保持不变,除了第二阶段纳入了所有数据,全局检索比例 ηRET 为 0.72。与现有工作通常采用 LoRA 微调不同,我们在所有阶段采用全参数微调,以确保最大性能提升。查询和段落的长度分别设置为 256 和 1536。然而,在实践中,由于大多数 LLM 中使用的 RoPE[35] 位置编码的强大长度外推能力,模型能够处理长达 8k 的序列。所有训练阶段的超参数配置在表 1 中提供。

项目
第一阶段
第二阶段
热身
300
-
步数
32k
8k
学习率
3e-5
2e-5
InfoNCE 批量大小
256
256
Cosent 批量大小
-
768
精度
bfloat16
bfloat16
温度
0.02
0.02
优化器
Adam
Adam
查询长度
256
256
段落长度
1536
1536

表 1:训练超参数规格

6.4 比较方法

我们选取了在 QZhou-Embedding 发布之前(2025 年 8 月 27 日)MTEB/CMTEB 排行榜上前 10 名的模型作为基线。对于 MTEB,比较的模型包括 LGAI-Embedding-Preview[17]、Seed 系列(v1.5[75]、v1.6[38])、Qwen 系列(8B、4B)[34]、ritrieve zh v1、xiaobu-embedding-v2、gemini-embedding-001[76]、jasper en vision language v1[14]、Linq-Embed-Mistral[52]、SFR-Embedding-Mistral[30] 和 NV-Embed-v2[47]。对于 CMTEB,基线模型包括上述 Seed 系列、Qwen 系列、Conan 系列(v1[24]、v2[13])、zpoint large embedding zh 和

6.5 主要结果

本节展示了 Qzhou-embedding 在 MTEB/CMTEB 基准测试上的评估结果,以及与前 10 名模型的比较分数。如表 2 和表 3 所示,Qzhou-embedding 在任务级别和任务类型平均指标上均实现了最先进的性能,证明了我们方法的有效性。此外,根据 MTEB 的官方排名协议,Qzhou-embedding 在两个排行榜上均获得了第一名的位置。(注意:某些列中突出显示的最大值可能反映了所列模型中的最佳性能,而不是整个排行榜的最大值,例如在 MTEB/分类基准测试中,最高分并未出现在前 10 名中。)

模型
分类
聚类
成对分类
重排
STS
检索
汇总
平均(任务)
平均(任务类型)
LGAI-Embedding-Preview
89.97
59.25
88.67
49.13
66.18
86.69
38.93
74.12
68.4
Seed1.5-Embedding
89.88
60.83
87.39
50.67
67.45
87.23
36.44
74.76
68.56
Qwen3-Embedding-8B
90.43
58.57
87.52
51.56
69.44
88.58
34.83
75.22
68.71
Qwen3-Embedding-4B
89.84
57.51
87.01
50.76
68.46
88.72
34.39
74.6
68.1
Seed1.6-embedding
92.42
59.22
85.07
50.28
64.9
86.87
37.1
74.07
67.98
gemini-embedding-001
90.05
59.39
87.7
48.59
64.35
85.29
38.28
73.3
67.67
jasper en vision language v1
90.27
60.52
88.14
50
56.05
84.37
37.19
71.41
66.65
Linq-Embed-Mistral
83
54.07
88.44
49.44
60.14
84.69
37.26
69.8
65.29
SFR-Embedding-Mistral
80.47
54.93
88.59
50.15
59.33
84.77
36.32
69.31
64.94
NV-Embed-v2
87.19
47.66
88.69
49.61
62.84
83.82
35.21
69.81
65
QZhou-Embedding(我们的)
88.97
61.65
92.43
51.77
67.12
91.65
33.05
75.97
69.52

表 2:MTEB(eng,v2)上的性能

模型
分类
聚类
成对分类
重排
STS
检索
平均(任务)
平均(任务类型)
Seed1.6-embedding
77.98
73.11
88.71
71.65
79.69
68.94
75.63
76.68
Seed1.5-Embedding
79.37
71.11
89.57
70.14
79.33
66.56
74.87
76.01
ritrieve zh v1
76.88
66.5
85.98
72.86
76.97
63.92
72.71
73.85
Conan-embedding-v2
76.47
68.84
92.44
74.41
78.31
65.48
74.24
75.99
xiaobu-embedding-v2
76.53
65.17
85.94
72.58
76.49
64.18
72.36
73.48
Qwen3-Embedding-8B
76.97
80.08
84.23
66.99
78.21
63.53
73.84
75
Conan-embedding-v1
76.77
66.33
85.68
72.76
76.67
63.67
72.5
73.65
zpoint large embedding zh
76.4
62.23
85.75
72.33
76.36
63.86
71.81
72.82
piccolo-large-zh-v2
76.42
62.16
85.22
70
74.36
63.46
70.86
71.94
Qwen3-Embedding-4B
75.46
77.89
83.34
66.05
77.03
61.26
72.27
73.51
QZhou-Embedding(我们的)
79.99
70.91
95.07
74.85
78.80
71.89
76.99
78.58

表 3:CMTEB(cmn,v1)上的性能

7 结论

在本技术报告中,我们介绍了 QZhou-Embedding,这是一种具有卓越文本表示能力的通用上下文化文本嵌入模型。我们设计了一个包含专门的数据转换和训练策略的统一多任务框架,有效地增强了训练数据的多样性。为了进一步提高训练数据的质量和模型的泛化能力,我们开发了一个利用 LLM API 的数据合成管道,整合了诸如释义、增强和困难负样本生成等技术。我们采用了一个两阶段训练策略,包括初始的以检索为重点的预训练,随后是全任务微调,使嵌入模型能够在基于强大的检索性能的基础上扩展其能力。我们的模型在 MTEB 和 CMTEB 基准测试中取得了最先进的结果,在两个排行榜上均排名第一。我们的研究结果表明,数据质量和多样性对于提升嵌入模型能力至关重要。在未来,我们将专注于开发多模态和多语言嵌入模型,以及探索在代理系统中有效应用嵌入模型,旨在整合尖端技术以优化这一经典领域。

参考文献

[1]Robertson, Stephen E., and Steve Walker. "Some simple effective approximations to the 2-poisson model for probabilistic weighted retrieval." In SIGIR'94: Proceedings of the Seventeenth Annual International ACM-SIGIR Conference on Research and Development in Information Retrieval, organized by Dublin City University, pp. 232-241. London: Springer London, 1994.

[2]Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pretraining of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.

[3]Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of machine learning research, 21(140):1–67, 2020.

[4]Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, and Furu Wei. Text embeddings by weakly-supervised contrastive pre-training. arXiv preprint arXiv:2212.03533, 2022.

[5]Gautier Izacard, Mathilde Caron, Lucas Hosseini, Sebastian Riedel, Piotr Bojanowski, Armand Joulin, and Edouard Grave. Unsupervised dense information retrieval with contrastive learning. arXiv preprint arXiv:2112.09118, 2021.

[6]Nils Reimers and Iryna Gurevych. Sentence-bert: Sentence embeddings using siamese bert-networks. arXiv preprint arXiv:1908.10084, 2019.

[7]Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021. SimCSE: Simple contrastive learning of sentence embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6894–6910, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.

[8]Jianmo Ni, Chen Qu, Jing Lu, Zhuyun Dai, Gustavo Hernández Ábrego, Ji Ma, Vincent Y Zhao, Yi Luan, Keith B Hall, Ming-Wei Chang, et al. Large dual encoders are generalizable retrievers. arXiv preprint arXiv:2112.07899, 2021.

[9]Brown, Tom, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D. Kaplan, Prafulla Dhariwal, Arvind Neelakantan et al. "Language models are few-shot learners." Advances in neural information processing systems 33(2020): 1877-1901.

[10]Ma, Xueguang, Liang Wang, Nan Yang, Furu Wei, and Jimmy Lin. "Fine-tuning llama for multi-stage text retrieval." In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 2421-2425. 2024.

[11]Springer, Jacob Mitchell, Suhas Kotha, Daniel Fried, Graham Neubig, and Aditi Raghunathan. "Repetition improves language model embeddings." arXiv preprint arXiv:2402.15449 (2024).

[12]Behnam Ghader, Parishad, Vaibhav Adlakha, Marius Mosbach, Dzmitry Bahdanau, Nicolas Chapados, and Siva Reddy. "Llm2vec: Large language models are secretly powerful text encoders." arXiv preprint arXiv:2404.05961 (2024).

[13]

[14]Zhang, Dun, Jiacheng Li, Ziyang Zeng, and Fulong Wang. "Jasper and stella: Distillation of sota embedding models." arXiv preprint arXiv:2412.19048 (2024).

[15]Chen, Jianlv, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. "Bge m3-embedding: Multi-lingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation." arXiv preprint arXiv:2402.03216 (2024).

[16]Ji, Yifan, Zhipeng Xu, Zhenghao Liu, Yukun Yan, Shi Yu, Yishan Li, Zhiyuan Liu, Yu Gu, Ge Yu, and Maosong Sun. "Learning more effective representations for dense retrieval through deliberate thinking before search." arXiv preprint arXiv:2502.12974 (2025).

[17]Choi J, Kim H, Jang H, et al. LG-ANNA-Embedding technical report[J]. arXiv preprint arXiv:2506.07438, 2025.

[18]Xiong, Lee, Chenyan Xiong, Ye Li, Kwok-Fung Tang, Jialin Liu, Paul Bennett, Junaid Ahmed, and Arnold Overwijk. "Approximate nearest neighbor negative contrastive learning for dense text retrieval." arXiv preprint arXiv:2007.00808 (2020).

[19]Lee, Chankyu, Rajarshi Roy, Mengyao Xu, Jonathan Raiman, Mohammad Shoeybi, Bryan Catanzaro, and Wei Ping. "Nv-embed: Improved techniques for training llms as generalist embedding models." arXiv preprint arXiv:2405.17428 (2024).

[20]Moreira, Gabriel de Souza P., Radek Osmulski, Mengyao Xu, Ronay Ak, Benedikt Schifferer, and Even Oldridge. "NV-Retriever: Improving text embedding models with effective hard-negative mining." arXiv preprint arXiv:2407.15831 (2024).

[21]Team, Qwen. "Qwen2 technical report." arXiv preprint arXiv:2407.10671 (2024).

[22]Xiao, Shitao, Zheng Liu, Peitian Zhang, Niklas Muennighoff, Defu Lian, and Jianyun Nie. "C-pack: Packed resources for general chinese embeddings." In Proceedings of the 47th international ACM SIGIR conference on research and development in information retrieval, pp. 641-649. 2024. Team, Qwen.

[23]Muennighoff, Niklas, Nouamane Tazi, Lo ̈ıc Magne, and Nils Reimers. "Mteb: Massive text embedding benchmark." arXiv preprint arXiv:2210.07316 (2022).

[24]Li, Shiyu, Yang Tang, Shizhe Chen, and Xi Chen. "Conan-embedding: General text embedding with more and better negative samples." arXiv preprint arXiv:2408.15710 (2024).

[25]Aizawa, Akiko. "An information-theoretic perspective of tf–idf measures." Information Processing & Management 39, no. 1 (2003): 45-65.

[26]Robertson, Stephen E., and Steve Walker. "Some simple effective approximations to the 2-poisson model for probabilistic weighted retrieval." In SIGIR'94: Proceedings of the Seventeenth Annual International ACM-SIGIR Conference on Research and Development in Information Retrieval, organized by Dublin City University, pp. 232-241. London: Springer London,

[27]Deerwester, Scott, Susan T. Dumais, George W. Furnas, Thomas K. Landauer, and Richard Harshman. "Indexing by latent semantic analysis." Journal of the American society for information science 41, no. 6 (1990): 391-407.

[28]Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, and Furu Wei. Improving text embeddings with large language models. arXiv preprint arXiv:2401.00368, 2023b.

[29]Meng, Rui, Ye Liu, Shafiq Rayhan Joty, Caiming Xiong, Yingbo Zhou, and Semih Yavuz. "Sfrembedding-mistral: Enhance text retrieval with transfer learning." Salesforce AI Research Blog 3 (2024): 6.

[30]Meng R, Liu Y, Joty S R, et al. Sfr-embedding-2: Advanced text embedding with multi-stage training, 2024[J].

[31]Muennighoff, Niklas, S.U. Hongjin, Liang Wang, Nan Yang, Furu Wei, Tao Yu, Amanpreet Singh, and Douwe Kiela. "Generative representational instruction tuning." In The Thirteenth International Conference on Learning Representations. 2024.

[32]Chaofan Li, Minghao Qin, Shitao Xiao, Jianlyu Chen, Kun Luo, Yingxia Shao, Defu Lian, and Zheng Liu. Making text embedders few-shot learners. arXiv preprint arXiv:2409.15700, 2024.

[33]Zehan Li, Xin Zhang, Yanzhao Zhang, Dingkun Long, Pengjun Xie, and Meishan Zhang. Towards general text embeddings with multi-stage contrastive learning, 2023. URL https://arxiv.org/abs/2308.03281.

[34]Zhang, Yanzhao, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang, Pengjun Xie, et al. "Qwen3Embedding: Advancing Text Embedding and Reranking Through Foundation Models." arXiv preprint arXiv:2506.05176 (2025).

[35]Su, Jianlin, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. "Roformer: Enhanced transformer with rotary position embedding." Neurocomputing 568 (2024): 127063.

[36]Zhang, Biao, and Rico Sennrich. "Root mean square layer normalization." Advances in neural information processing systems 32 (2019).

[37]Shazeer, Noam. "Glu variants improve transformer." arXiv preprint arXiv:2002.05202 (2020).

[38]https://seed1-6-embedding.github.io/

[39]Huang, Junqin, Zhongjie Hu, Zihao Jing, Mengya Gao, and Yichao Wu. "Piccolo2: General text embedding with multi-task hybrid loss training." arXiv preprint arXiv:2405.06932 (2024).

[40]Sun, Yifan, Changmao Cheng, Yuhan Zhang, Chi Zhang, Liang Zheng, Zhongdao Wang, and Yichen Wei. "Circle loss: A unified perspective of pair similarity optimization." In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition,

[41]Rodrigo Nogueira, Wei Yang, Jimmy Lin, and Kyunghyun Cho. 2019. Document expansion by query prediction. ArXiv preprint,

[42]Liang Wang, Nan Yang, and Furu Wei. 2023. Query2doc: Query expansion with large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9414–9423, Singapore. Association for Computational

[43]Zhuyun Dai, Vincent Y Zhao, Ji Ma, Yi Luan, Jianmo Ni, Jing Lu, Anton Bakalov, Kelvin Guu, Keith Hall, and Ming-Wei Chang. 2022. Promptagator: Fewshot dense retrieval from 8 examples. In The Eleventh International Conference on Learning

[44]Kexin Wang, Nandan Thakur, Nils Reimers, and Iryna Gurevych. 2022a. GPL: Generative pseudo labeling for unsupervised domain adaptation of dense retrieval. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2345–2360, Seattle, United States. Association for Computational

[45]Honovich, Or, Thomas Scialom, Omer Levy, and Timo Schick. "Unnatural instructions: Tuning language models with (almost) no human labor." arXiv preprint

[46]Xiong, Lee, Chenyan Xiong, Ye Li, Kwok-Fung Tang, Jialin Liu, Paul Bennett, Junaid Ahmed, and Arnold Overwijk. "Approximate nearest neighbor negative contrastive learning for dense text retrieval." arXiv preprint

[47]Moreira, Gabriel de Souza P., Radek Osmulski, Mengyao Xu, Ronay Ak, Benedikt Schifferer, and Even Oldridge. "NV-Retriever: Improving text embedding models with effective hard-negative mining." arXiv preprint

[48]Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint

[49]

[50]Xin Zhang, Yanzhao Zhang, Dingkun Long, Wen Xie, Ziqi Dai, Jialong Tang, Huan Lin, Baosong Yang, Pengjun Xie, Fei Huang, Meishan Zhang, Wenjie Li, and Min Zhang. mgte: Generalized long-context text representation and reranking models for multilingual text retrieval,

[51]Lee, Jinhyuk, Zhuyun Dai, Xiaoqi Ren, Blair Chen, Daniel Cer, Jeremy R. Cole, Kai Hui et al. "Gecko: Versatile text embeddings distilled from large language models, 2024." URL

[52]Junseong Kim, Seolhwa Lee, Jihoon Kwon, Sangmo Gu, Yejin Kim, Minkyung Cho, Jy yong Sohn, and Chanyeol Choi. Linq-embed-mistral: Elevating text retrieval with improved gpt data through task-specific control and quality refinement. linq ai research blog,

[53]

[54]Tsatsaronis G, Balikas G, Malakasiotis P, et al. An overview of the BIOASQ large-scale biomedical semantic indexing and question answering competition[J]. BMC bioinformatics, 2015, 16(1):

[55]Cui Y, Liu T, Che W, et al. A span-extraction dataset for Chinese machine reading comprehension[J]. arXiv preprint

[56]Wang A, Singh A, Michael J, et al. GLUE: A multi-task benchmark and analysis platform for natural language understanding[J]. arXiv preprint

[57]Yelp Dataset. Yelp Inc., [Year]. Available:

[58]Maas A, Daly R E, Pham P T, et al. Learning word vectors for sentiment analysis[C]//Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies. 2011:

[59]Jack FitzGerald, Christopher Hench, Charith Peris, Scott Mackie, Kay Rottmann, Ana Sanchez, Aaron Nash, Liam Urbach, Vishesh Kakarala, Richa Singh, Swetha Ranganath, Laurie Crist, Misha Britan, Wouter Leeuwis, Gokhan Tur, and Prem Natarajan. 2022. Massive: A 1m-example multilingual natural language understanding dataset with 51 typologically-diverse

[60]Eneko Agirre, Daniel Cer, Mona Diab, and Aitor Gonzalez-Agirre. 2012. SemEval-2012 Task 6: A pilot on semantic textual similarity. In *SEM 2012: The First Joint Conference on Lexical and Computational Semantics–Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012), pages

[61]Liu, Xin, Qingcai Chen, Chong Deng, Huajun Zeng, Jing Chen, Dongfang Li, and Buzhou Tang. "Lcqmc: A large-scale Chinese question matching corpus." In Proceedings of the 27th international conference on computational linguistics,

[62]Yang, Yinfei, Yuan Zhang, Chris Tar, and Jason Baldridge. "PAWS-X: A cross-lingual adversarial dataset for paraphrase identification." arXiv preprint

[63]Cer, Daniel, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. "SemEval-2017 Task 1: Semantic textual similarity - multilingual and cross-lingual focused evaluation." arXiv preprint

[64]Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, and Li Deng. 2016. MS MARCO: A human generated machine reading comprehension dataset. In Proceedings of the Workshop on Cognitive Computation: Integrating neural and symbolic approaches 2016 co-located with the 30th Annual Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain, December 9, 2016, volume 1773 of CEUR Workshop

[65]Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7: 453–466,

[66]Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. 2019. ELI5: Long Form Question Answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3558–3567, Florence, Italy. Association for Computational

[67]Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. HotpotQA: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2369–2380, Brussels, Belgium, October-November 2018. Association for Computational Linguistics. doi:10.18653/v1/D18-1259. URL

[68]Xinyu Zhang, Nandan Thakur, Odunayo Ogundepo, Ehsan Kamalloo, David Alfonso-Hermelo, Xiaoguang Li, Qun Liu, Mehdi Rezagholizadeh, and Jimmy Lin. Miracl: A multilingual retrieval dataset covering 18 diverse languages. Transactions of the Association for Computational Linguistics, 11: 1114–1131,

[69]Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100,000+ questions for machine comprehension of text. arXiv preprint

[70]James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. Fever: A large-scale dataset for fact extraction and verification. arXiv preprint

[71]Wei He, Kai Liu, Jing Liu, Yajuan Lyu, Shiqi Zhao, Xinyan Xiao, Yuan Liu, Yizhong Wang, Hua Wu, Qiaoqiao She, Xuan Liu, Tian Wu, and Haifeng Wang. 2018. DuReader: A Chinese Machine Reading Comprehension Dataset from Real-world Applications. In Proceedings of the Workshop on Machine Reading for Question Answering, pages 37–46, Melbourne, Australia. Association for Computational

[72]Yichen Jiang, Shikha Bordia, Zheng Zhong, Charles Dognin, Maneesh Singh, and Mohit Bansal. 2020. HoVer: A Dataset for Many-Hop Fact Extraction And Claim Verification. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 3441–3460, Online. Association for Computational

[73]Zhang X, Ma X, Shi P, et al. Mr.TyDi: A multi-lingual benchmark for dense retrieval[J]. arXiv preprint

[74]Kyle Lo, Lucy Lu Wang, Mark Neumann, Rodney Kinney, and Daniel Weld. 2020. S2ORC: The Semantic Scholar Open Research Corpus. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4969–4983, Online. Association for Computational

[75]Jinhyuk Lee, Feiyang Chen, Sahil Dua, Daniel Cer, Madhuri Shanbhogue, Iftekhar Naim, Gustavo Hernandez Ábrego, Zhe Li, Kaifeng Chen, Henrique Schechter Vera, et al. Gemini embedding: Generalizable embeddings from gemini. arXiv preprint

A 附录

A.1 框架约束

项目
解释
保持核心语义
保留核心语义内容,这是最基本的要求。
在形态、句法、语法、时态、修辞等方面多样化
允许词汇构成、句法结构、语法规则和时态使用的多样性。
长度在 ±15% 范围内
与原句相比,长度偏差不应超过 15%。
保持语言一致
使用的语言必须与原句一致。
保持领域相关性
内容必须严格与给定句子的领域保持一致。
主题转移、扩展、延伸,禁止纯改写
允许主题转移、扩展或阐述,但禁止与原始主题完全相同的纯粹释义内容。
正样本是完美答案(必要且充分)
正样本必须清晰且准确地回答查询(必要条件),同时仅包含相关内容,无多余信息(充分条件)。
负样本比正样本差:
- 语义偏差(不充分)
- 包含无关信息(不必要)
- 同一主题的不同方面
模仿:句法、句子结构、结构化
通过模仿给定正样本的结构和句法模式生成负样本,是使模型面临最大区分性挑战的关键步骤。

表 4:框架约束规格

A.2 指令示例

数据集
指令
Huatuo
给定一个医疗问题,检索最能回答该问题的用户回复。
Reddit
检索与给定陈述在语义上最相似的段落。
Law-GPT
检索与给定案例相关的法律条款或解释。
MNLI/SNLI
检索语义相似的文本。
Yelp
对商业评论进行分类。
Weibo
对微博评论进行情感分类。

表 5:部分训练数据的指令

A.3 数据合成示例

注意:黄色高亮显示的文本代表原始句子,随后是合成生成的内容。

表 6:释义示例(1)

查询
正样本
What is the best credit card for someone with no credit history?
If you've never had a credit card before, a likely reason can be due to lack of credit history. You can apply for a department store card.
What's the ideal credit card for a person without any credit history?
If you've never had a credit card, it's probably because you don't have a credit history. A department store card could be a good option to apply for.
What's the top credit card choice for someone who has no credit history?
If you've never owned a credit card, it's probably because you don't have a credit history. A department store card might be a good option to consider.

表 7:释义示例(2)

查询
正样本
Which English Poet Laureate wrote 'The Faerie Queene'?
English Renaissance to begin, shakily, in the 1520s, and it continued until perhaps 1620. England had a strong tradition of literature in the English vernacular, which gradually increased as English use of the printing press became common during the mid 16th century. By the time of Elizabethan literature a vigorous literary culture in both drama and poetry included poets such as Edmund Spenser, whose verse epic 'The Faerie Queene' had a strong influence on English literature but was eventually overshadowed by the lyrics of William Shakespeare, Thomas Wyatt and others. Typically, the works of these playwrights and poets circulated in manuscript form.
Who was the English Poet Laureate that penned 'The Faerie Queene'?
The English Renaissance began, albeit slowly, in the 1520s and likely lasted until around 1620. England boasted a robust literary tradition in its native tongue, which expanded as the printing press became more widely adopted during the mid-16th century. By the time of Elizabethan literature, a dynamic literary scene in both drama and poetry emerged, featuring writers like Edmund Spenser, whose epic poem The Faerie Queene profoundly influenced English literature, although it was eventually overshadowed by the works of William Shakespeare, Thomas Wyatt, and others. Generally, the writings of these poets and playwrights circulated in manuscript form.
Which English Poet Laureate authored 'The Faerie Queene'?
The English Renaissance began somewhat uncertainly in the 1520s, continuing through to around 1620. England had a rich literary heritage in its native tongue, which expanded as the printing press became more widely used in the mid-16th century. By the Elizabethan era, a thriving literary culture in both drama and poetry emerged, with poets like Edmund Spenser, whose epic The Faerie Queene profoundly impacted English literature, though it was eventually eclipsed by the works of William Shakespeare, Thomas Wyatt, and others. Generally, the writings of these playwrights and poets were circulated in manuscript form.

表 8:增强示例

查询
正样本
负样本
What is the best credit card for someone with no credit history?
If you’ve never had a credit card before a likely reason can be due to lack of credit history. You can apply for a department store card.
Which credit card is easiest to get approved for with bad credit? For those with poor credit scores, secured credit cards from Capital One or Discover are often the most accessible options since they require a refundable deposit. Some premium travel cards like Chase Sapphire have great rewards but usually need excellent credit. Store cards may accept lower scores but have high interest rates.
What is the best credit card for someone with no credit history?
If you’ve never had a credit card before a likely reason can be due to lack of credit history. You can apply for a department store card.
What credit cards can I get as a college student with no credit? Students without credit history often qualify for starter cards like Discover it Student or Capital One Journey, which are designed to help build credit. Premium cards like American Express Platinum require good credit history, though some banks offer student accounts with debit cards.
Which English Poet Laureate wrote 'The Faerie Queene'?
...By the time of Elizabethan literature a vigorous literary culture in both drama and poetry included poets such as Edmund Spenser, whose verse epic 'The Faerie Queene' had a strong influence on English literature but was eventually overshadowed by the lyrics of William ...
What major epic poem did Edmund Spenser write during Queen Elizabeth’s reign? Christopher Marlowe’s 'Hero and Leander' was another notable Elizabethan poem, but unlike Spenser’s work it wasn’t an epic allegory. Edmund Spenser composed 'The Faerie Queene', an allegorical epic poem that became one of the most significant works of Elizabethan literature though later eclipsed by Shakespeare’s popularity.
Which English Poet Laureate wrote 'The Faerie Queene'?
...By the time of Elizabethan literature a vigorous literary culture in both drama and poetry included poets such as Edmund Spenser, whose verse epic 'The Faerie Queene' had a strong influence on English literature but was eventually overshadowed by the lyrics of William ...
Which poet created 'Paradise Lost' during the English Renaissance? William Blake’s 'The Marriage of Heaven and Hell' also dealt with religious themes, though it was more prophetic than epic in style compared to Milton’s masterpiece. John Milton authored the epic poem 'Paradise Lost' in the 17th century, a monumental work that explored biblical themes through blank verse and became a cornerstone of English literature.

表 9:困难负样本生成示例

查询
正样本
负样本
What territory was King Hussein afraid Israel would obtain?
...Hussein was nonetheless wary that an Egyptian-Israeli war would risk the West Bank’s occupation by Israel...
What territory was King Hussein afraid Israel would obtain? ...Hussein was nonetheless wary that an Egyptian-Israeli war would risk the West Bank’s occupation by Israel... King Hussein expressed concerns about potential Israeli expansion during the Arab-Israeli conflicts, though his warnings to Nasser were delayed and initially dismissed, while other Arab leaders focused more on direct military preparations against Israel.
What territory was King Hussein afraid Israel would obtain?
...Hussein was nonetheless wary that an Egyptian-Israeli war would risk the West Bank’s occupation by Israel...
What territory was King Hussein afraid Israel would obtain? ...Hussein was nonetheless wary that an Egyptian-Israeli war would risk the West Bank’s occupation by Israel... King Hussein expressed concerns about potential Israeli territorial expansion during the 1967 tensions, though his warnings were delayed in reaching Nasser and mixed with broader regional tensions, while Egyptian military movements in Sinai were already underway under Amer’s orders.

【声明】内容源于网络
0
0
我爱数据科学
精通R语言及Python,传递数据挖掘及可视化技术,关注机器学习及深度学习算法及实现,分享大模型及LangChain的使用技巧。编著多本R语言、python、深度学习等书籍。
内容 322
粉丝 0
我爱数据科学 精通R语言及Python,传递数据挖掘及可视化技术,关注机器学习及深度学习算法及实现,分享大模型及LangChain的使用技巧。编著多本R语言、python、深度学习等书籍。
总阅读108
粉丝0
内容322