arXiv:2412.12591cs.CL2024-12综述被引 52

大模型不仅能生成文本,还能高效生成高质量嵌入表示。

LLMs are Also Effective Embedding Models: An In-depth Overview

  • 通过直接提示和数据调优两种方式,从LLM中提取嵌入
  • 在多种任务上表现媲美传统Embedding模型,支持长文本与多模态
  • 适合想用大模型做向量表示的研究者和工程师

大语言模型(LLMs)在自然语言处理中取得了突破性进展。近期研究发现,它们也可作为高效的嵌入模型,标志着从ELMo、BERT等编码器模型向GPT、LLaMA、Mistral等解码器架构的范式转变。本综述系统梳理了该转变历程:首先回顾了大模型时代前的嵌入技术;随后重点分析两类基于LLM的嵌入方法——1)直接提示法,探讨提示设计与嵌入生成原理;2)数据驱动调优,涵盖模型结构、训练目标、数据构建等关键因素。进一步讨论了长文本、多语言、代码、跨模态及推理增强等复杂场景下的嵌入生成技术。还分析了模型选择的关键影响因素,包括性能/效率对比、稠密与稀疏嵌入、池化策略及缩放定律。最后指出当前挑战:跨任务一致性、效率与精度权衡、低资源、长上下文处理、数据偏见与鲁棒性等问题。本文为研究人员和实践者提供了全面的进展总结与未来方向框架。

原文摘要 · Abstract (English)

Large language models (LLMs) have revolutionized natural language processing by achieving state-of-the-art performance across various tasks. Recently, their effectiveness as embedding models has gained attention, marking a paradigm shift from traditional encoder-only models like ELMo and BERT to decoder-only, large-scale LLMs such as GPT, LLaMA, and Mistral. This survey provides an in-depth overview of this transition, beginning with foundational techniques before the LLM era, followed by LLM-based embedding models through two main strategies to derive embeddings from LLMs. 1) Direct prompting: We mainly discuss the prompt designs and the underlying rationale for deriving competitive embeddings. 2) Data-centric tuning: We cover extensive aspects that affect tuning an embedding model, including model architecture, training objectives, data constructions, etc. Upon the above, we also cover advanced methods for producing embeddings from longer texts, multilingual, code, cross-modal data, as well as reasoning-aware and other domain-specific scenarios. Furthermore, we discuss factors affecting choices of embedding models, such as performance/efficiency comparisons, dense vs sparse embeddings, pooling strategies, and scaling law. Lastly, the survey highlights the limitations and challenges in adapting LLMs for embeddings, including cross-task embedding quality, trade-offs between efficiency and accuracy, low-resource, long-context, data bias, robustness, etc. This survey serves as a valuable resource for researchers and practitioners by synthesizing current advancements, highlighting key challenges, and offering a comprehensive framework for future work aimed at enhancing the effectiveness and efficiency of LLMs as embedding models.

大模型嵌入表示LLM应用综述

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。