让大模型嵌入更懂上下文,提升文本表征效果
Following the Autoregressive Nature of LLM Embeddings via Compression and Alignment
- 基于嵌入的条件概率分布设计新对比学习框架
- 在相同数据下性能接近顶尖模型,显著优于传统方法
- 适合需要高质量文本嵌入的研究者和应用开发
当前趋势是通过对比学习将大语言模型(LLM)用作密集文本编码器。然而,由于LLM嵌入本质上是预测下一个词的概率分布,具有生成性和分布特性,与对比学习要求嵌入捕捉完整语义并通过余弦相似度对齐的需求相冲突。这一矛盾限制了预训练大模型能力的充分发挥,导致学习效率低下。为此,我们提出AutoRegEmbed,一种基于嵌入条件概率分布的新对比学习方法,融合两个核心任务:信息压缩与条件分布对齐。信息压缩任务将文本编码至嵌入空间,确保嵌入向量捕捉全局语义;条件分布对齐任务则利用嵌入的条件分布,对齐正样本嵌入,并同时降低从文本嵌入生成负样本的可能性,从而实现嵌入对齐与均匀性。实验表明,该方法显著优于传统对比学习,且在相同数据量下性能可媲美当前最优模型。
原文摘要 · Abstract (English)
A new trend uses LLMs as dense text encoders via contrastive learning. However, since LLM embeddings predict the probability distribution of the next token, they are inherently generative and distributive, conflicting with contrastive learning, which requires embeddings to capture full-text semantics and align via cosine similarity. This discrepancy hinders the full utilization of LLMs' pre-training capabilities, resulting in inefficient learning. In response to this issue, we propose AutoRegEmbed, a new contrastive learning method built on embedding conditional probability distributions, which integrates two core tasks: information compression and conditional distribution alignment. The information compression task encodes text into the embedding space, ensuring that the embedding vectors capture global semantics. The conditional distribution alignment task focuses on aligning text embeddings with positive samples embeddings by leveraging the conditional distribution of embeddings while simultaneously reducing the likelihood of generating negative samples from text embeddings, thereby achieving embedding alignment and uniformity. Experimental results demonstrate that our method significantly outperforms traditional contrastive learning approaches and achieves performance comparable to state-of-the-art models when using the same amount of data.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。