arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.09642cs.CL
收藏

答案即你所需:通过回答问题实现遵循指令的文本嵌入

Answer is All You Need: Instruction-following Text Embedding via Answering the Question

University of California San Diego(加利福尼亚大学圣迭戈分校);Cisco(思科公司)

Letian Peng, Yuwei Zhang, Zilong Wang, Jayanth Srinivasa, Gaowen Liu, Zihan Wang, Jingbo Shang

AI总结:

本文提出InBedder,通过将指令视为问题并编码预期答案,在问答任务上微调语言模型,构建了能捕捉用户指定文本特征的嵌入器,显著提升了指令遵循能力并具备高可解释性。

摘要:

本工作旨在构建一个能够捕捉由用户指令指定的文本特征的文本嵌入器。尽管其在部署面向用户的嵌入方面具有巨大潜力,但以往的方法均未为此提供具体解决方案。本文提出了一种新视角,将指令视为关于输入文本的问题,并编码预期答案以相应地获得表示。直观上,具有相同(隐式)语义的文本在遵循指令时会共享相似答案,从而产生更相似的嵌入。具体而言,我们提出了InBedder,仅通过在抽象问答任务上微调语言模型来实例化这一通过回答进行嵌入的思想。根据我们提出的指令感知测试和指令鲁棒性测试,当应用于大型语言模型(LLMs)(如llama-2-7b)和较小的基于编码器的LMs(如roberta-large)时,InBedder展现出显著提升的遵循指令能力。此外,我们对同一语料库应用不同指令所获得的聚类结果进行的定性分析,展示了高度的可解释性。

英文摘要:

This work aims to build a text embedder that can capture characteristics of texts specified by user instructions. Despite its tremendous potential to deploy user-oriented embeddings, none of previous approaches provides a concrete solution for it. This paper offers a new viewpoint, which treats the instruction as a question about the input text and encodes the expected answers to obtain the representation accordingly. Intuitively, texts with the same (implicit) semantics would share similar answers following the instruction, thus leading to more similar embeddings. Specifically, we propose InBedder that instantiates this embed-via-answering idea by only fine-tuning language models on abstractive question answering tasks. InBedder demonstrates significantly improved instruction-following capabilities according to our proposed instruction awareness tests and instruction robustness tests, when applied to both large language models (LLMs) (e.g., llama-2-7b) and smaller encoder-based LMs (e.g., roberta-large). Additionally, our qualitative analysis of clustering outcomes, achieved by applying different instructions to the same corpus, demonstrates a high degree of interpretability.

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

↑