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

LLM2Vec-Gen:从大型语言模型生成嵌入向量

LLM2Vec-Gen: Generative Embeddings from Large Language Models

McGill University(麦吉尔大学);Mila–Quebec AI Institute(米拉-魁北克人工智能研究所);ServiceNow Research(ServiceNow研究院);Cohere;Canada CIFAR AI Chair(加拿大CIFAR人工智能主席)

Parishad BehnamGhader, Vaibhav Adlakha, Fabian David Schmidt, Nicolas Chapados, Marius Mosbach, Siva Reddy

AI总结:

LLM2Vec-Gen通过自监督学习生成大型语言模型的嵌入向量,无需微调,提升MTEB基准测试性能,并保留语义和推理能力。

摘要:

通过对比学习微调基于LLM的文本嵌入器将输入和输出映射到新表示空间,丢弃LLM的输出语义。我们提出LLM2Vec-Gen,一种自监督替代方法,通过学习模型的潜在响应生成嵌入。具体而言,可训练的特殊标记被附加到输入并优化,以压缩LLM的响应到固定长度嵌入,由无监督嵌入教师和重建目标引导。关键在于LLM主干保持冻结,训练仅需无标签查询。LLM2Vec-Gen在大规模文本嵌入基准(MTEB)上达到最先进的自监督性能,比无监督嵌入教师提升8.8%。由于嵌入保留LLM响应空间语义,继承了安全对齐(有害内容检索减少22.6%)和推理(推理密集型检索提升35.6%)能力。最后,学习到的嵌入也可解码回文本以揭示其语义内容。

英文摘要:

Fine-tuning LLM-based text embedders via contrastive learning maps inputs and outputs into a new representational space, discarding the LLM's output semantics. We propose LLM2Vec-Gen, a self-supervised alternative that instead produces embeddings directly in the LLM's output space by learning to represent the model's potential response. Specifically, trainable special tokens are appended to the input and optimized to compress the LLM's own response into a fixed-length embedding, guided by an unsupervised embedding teacher and a reconstruction objective. Crucially, the LLM backbone remains frozen and training requires only unlabeled queries. LLM2Vec-Gen achieves state-of-the-art self-supervised performance on the Massive Text Embedding Benchmark (MTEB), improving by 8.8% over the unsupervised embedding teacher. Since the embeddings preserve the LLM's response-space semantics, they inherit capabilities such as safety alignment (up to 22.6% reduction in harmful content retrieval) and reasoning (up to 35.6% improvement on reasoning-intensive retrieval). Finally, the learned embeddings are also interpretable: they can be decoded back into text to reveal their semantic content. Our code, data, and pretrained models are publicly available at https://github.com/McGill-NLP/llm2vec-gen.

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

↑