arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.09741cs.CL
收藏

一个嵌入器,任意任务:指令微调的文本嵌入

One Embedder, Any Task: Instruction-Finetuned Text Embeddings

The University of Hong Kong(香港大学);University of Washington(华盛顿大学);Meta AI;Allen Institute for AI(艾伦人工智能研究所)

Hongjin Su, Weijia Shi, Jungo Kasai, Yizhong Wang, Yushi Hu, Mari Ostendorf, Wen-tau Yih, Noah A. Smith, Luke Zettlemoyer, Tao Yu

AI总结:

本文提出 INSTRUCTOR,通过任务指令与文本共同嵌入并在 330 个任务上对比学习微调,使单一嵌入器无需进一步训练即可适配多种下游任务,在 70 个评估任务上以更少参数取得最先进性能。

摘要:

我们提出了 INSTRUCTOR,一种根据任务指令计算文本嵌入的新方法:每个文本输入都与解释使用场景(例如任务和领域描述)的指令一起嵌入。与先前工作中更专用的编码器不同,INSTRUCTOR 是一个单一的嵌入器,无需任何进一步训练即可生成针对不同下游任务和领域定制的文本嵌入。我们首先为 330 个多样化任务标注指令,并使用对比损失在这个多任务混合数据上训练 INSTRUCTOR。我们在 70 个嵌入评估任务(其中 66 个在训练期间未见)上评估 INSTRUCTOR,涵盖分类、信息检索、语义文本相似性和文本生成评估。INSTRUCTOR 的参数数量比之前最佳模型少一个数量级,却达到了最先进的性能,在 70 个多样化数据集上相比之前最佳结果平均提升了 3.4%。我们的分析表明,INSTRUCTOR 对指令变化具有鲁棒性,并且指令微调缓解了在多样化数据集上训练单一模型的挑战。我们的模型、代码和数据可在 https://instructor-embedding.github.io 获取。

英文摘要:

We introduce INSTRUCTOR, a new method for computing text embeddings given task instructions: every text input is embedded together with instructions explaining the use case (e.g., task and domain descriptions). Unlike encoders from prior work that are more specialized, INSTRUCTOR is a single embedder that can generate text embeddings tailored to different downstream tasks and domains, without any further training. We first annotate instructions for 330 diverse tasks and train INSTRUCTOR on this multitask mixture with a contrastive loss. We evaluate INSTRUCTOR on 70 embedding evaluation tasks (66 of which are unseen during training), ranging from classification and information retrieval to semantic textual similarity and text generation evaluation. INSTRUCTOR, while having an order of magnitude fewer parameters than the previous best model, achieves state-of-the-art performance, with an average improvement of 3.4% compared to the previous best results on the 70 diverse datasets. Our analysis suggests that INSTRUCTOR is robust to changes in instructions, and that instruction finetuning mitigates the challenge of training a single model on diverse datasets. Our model, code, and data are available at https://instructor-embedding.github.io.

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

↑