Skip to main content
QUICK REVIEW

[论文解读] Revisiting Word Embeddings in the LLM Era

Mahajan, Yash, Matthew Freestone|arXiv (Cornell University)|Feb 16, 2024
Library Science and Information SystemsComputer Science被引用 3
一句话总结

本文研究了基于大语言模型(LLM)的词嵌入与经典模型(如SBERT和USE)相比,是否能提供根本不同的语义表征。基于WordNet和BATS类比数据集,比较了六种模型在余弦相似度分布和类比任务表现上的差异。主要发现显示,ADA和PaLM等LLM能更紧密地聚类语义相关的词语,并在类比任务上优于经典模型;而SBERT与LLM的相似度出人意料地接近,表明其在资源受限场景下仍是强大且高效的替代方案。

ABSTRACT

Large Language Models (LLMs) have recently shown remarkable advancement in various NLP tasks. As such, a popular trend has emerged lately where NLP researchers extract word/sentence/document embeddings from these large decoder-only models and use them for various inference tasks with promising results. However, it is still unclear whether the performance improvement of LLM-induced embeddings is merely because of scale or whether underlying embeddings they produce significantly differ from classical encoding models like Word2Vec, GloVe, Sentence-BERT (SBERT) or Universal Sentence Encoder (USE). This is the central question we investigate in the paper by systematically comparing classical decontextualized and contextualized word embeddings with the same for LLM-induced embeddings. Our results show that LLMs cluster semantically related words more tightly and perform better on analogy tasks in decontextualized settings. However, in contextualized settings, classical models like SimCSE often outperform LLMs in sentence-level similarity assessment tasks, highlighting their continued relevance for fine-grained semantics.

研究动机与目标

  • 确定基于LLM的词嵌入是否与经典模型(如SBERT和USE)产生显著不同的潜在语义表征。
  • 评估LLM在NLP任务中的性能提升是否源于模型规模,还是源于根本上改进的词向量语义。
  • 评估LLM与经典模型在语义和形态关系上的词对相似度排序上的一致程度。
  • 探究轻量级经典模型(如SBERT)在语义相似度任务中是否可作为重型LLM的有效且高效的替代方案。

提出的方法

  • 从WordNet构建了包含80,000个唯一词语的语料库,生成约64亿对词用于相似度分析。
  • 计算六种模型(三种基于LLM:ADA-002、PaLM2 Gecko-001、LLaMA2-7B;三种经典模型:SBERT、USE、LASER)所有词对的余弦相似度分布。
  • 在Bigger Analogy Test Set(BATS)上评估模型,将词对分为语义相关、形态相关和无关三类。
  • 基于余弦相似度对每个词的最近邻进行排序,以评估不同模型间相对语义接近度。
  • 计算模型对之间词对相似度排序的Kendall’s τ和Spearman’s ρ相关系数,以量化其一致性。
  • 通过统计分析比较不同模型在语义间距、聚类行为及类比任务表现上的差异。
Figure 1: The distribution of cosine similarities between all pairs of words for each model.
Figure 1: The distribution of cosine similarities between all pairs of words for each model.

实验结果

研究问题

  • RQ1基于LLM的嵌入是否与经典词嵌入模型产生显著不同的潜在语义空间?
  • RQ2LLM嵌入在聚类语义相关和形态相关词语方面,与经典模型相比表现如何?
  • RQ3LLM在词类比任务上的准确率是否高于经典模型?哪些模型表现最佳?
  • RQ4LLM在词对相似度排序上与彼此以及与经典模型的一致程度如何?

主要发现

  • 基于LLM的嵌入,特别是ADA-002和PaLM2,对随机词对的平均余弦相似度高于经典模型,表明语义聚类更紧密。
  • ADA-002和PaLM2在Bigger Analogy Test Set(BATS)上达到最高准确率,显著优于SBERT和USE等经典模型。
  • 尽管是轻量级模型,SBERT在语义相似度排序上与ADA-002和PaLM2表现出高度一致性,尤其在语义相关词对上。
  • LLaMA2-7B与其他模型的一致性最低,尤其与LASER差异显著,后者在所有类别中均表现出强烈分歧,表明其具有独特的语义表征。
  • Kendall’s τ和Spearman’s ρ相关系数显示,SBERT与ADA-002在语义上最为相似,而USE与ADA-002在相似度判断上差异最大。
  • 结果表明,尽管LLM在语义聚类和类比任务表现上更优,SBERT仍是高度有效且高效的替代方案,尤其适用于低资源环境。
Figure 2: Histogram showing the distribution of cosine similarities for random, morphologically related, and semantically related pairs of words for each model.
Figure 2: Histogram showing the distribution of cosine similarities for random, morphologically related, and semantically related pairs of words for each model.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。