Skip to main content
QUICK REVIEW

[Paper Review] Revisiting Word Embeddings in the LLM Era

Mahajan, Yash, Matthew Freestone|arXiv (Cornell University)|Feb 16, 2024
Library Science and Information SystemsComputer Science3 citations
TL;DR

This paper investigates whether Large Language Model (LLM)-based word embeddings offer fundamentally different semantic representations compared to classical models like SBERT and USE. Using WordNet and the BATS analogy dataset, it compares cosine similarity distributions and analogy task performance across six models. Key findings show LLMs like ADA and PaLM cluster semantically related words more tightly and outperform classical models on analogy tasks, while SBERT surprisingly aligns closely with LLMs, suggesting it remains a strong, efficient alternative for resource-constrained settings.

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.

Motivation & Objective

  • To determine whether LLM-based word embeddings produce significantly different latent semantic representations compared to classical models like SBERT and USE.
  • To evaluate if the performance gains of LLMs in NLP tasks stem from model scale or from fundamentally improved word vector semantics.
  • To assess the degree of agreement between LLM and classical models in ranking word pair similarities across semantic and morphological relations.
  • To investigate whether lightweight classical models like SBERT can serve as effective, efficient alternatives to heavy LLMs in semantic similarity tasks.

Proposed method

  • Constructed a corpus of 80,000 unique words from WordNet, generating approximately 6.4 billion word pair combinations for similarity analysis.
  • Computed cosine similarity distributions for all word pairs across six models: three LLM-based (ADA-002, PaLM2 Gecko-001, LLaMA2-7B) and three classical (SBERT, USE, LASER).
  • Evaluated models on the Bigger Analogy Test Set (BATS), categorizing word pairs into semantically related, morphologically related, and unrelated groups.
  • Ranked nearest neighbors for each word based on cosine similarity to assess relative semantic proximity across models.
  • Calculated Kendall’s τ and Spearman’s ρ correlation coefficients between model pairs to quantify agreement in word pair similarity rankings.
  • Used statistical analysis to compare semantic spacing, clustering behavior, and performance on analogy tasks across models.
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.

Experimental results

Research questions

  • RQ1Do LLM-based embeddings produce significantly different latent semantic spaces compared to classical word embedding models?
  • RQ2How do LLM-based embeddings compare to classical models in clustering semantically and morphologically related words?
  • RQ3Do LLMs achieve higher accuracy on word analogy tasks than classical models, and which models perform best?
  • RQ4To what extent do LLMs agree with each other and with classical models in ranking word pair similarities?

Key findings

  • LLM-based embeddings, particularly ADA-002 and PaLM2, produce higher average cosine similarity for random word pairs than classical models, indicating tighter semantic clustering.
  • ADA-002 and PaLM2 achieved the highest accuracy on the Bigger Analogy Test Set (BATS), significantly outperforming classical models like SBERT and USE.
  • Despite being a lightweight model, SBERT showed strong agreement with ADA-002 and PaLM2 in semantic similarity rankings, particularly on semantically related word pairs.
  • LLaMA2-7B exhibited the least agreement with other models, especially LASER, which also showed strong disagreement across all categories, indicating distinct semantic representations.
  • Kendall’s τ and Spearman’s ρ correlations revealed that SBERT and ADA-002 are the most semantically similar models, while USE and ADA-002 are the most different in their similarity judgments.
  • The results suggest that while LLMs offer improved semantic clustering and analogy performance, SBERT remains a highly effective and efficient alternative, especially in low-resource settings.
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.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.