Skip to main content
QUICK REVIEW

[Paper Review] Linking GloVe with word2vec

Tianze Shi, Zhiyuan Liu|arXiv (Cornell University)|Nov 20, 2014
Topic ModelingComputer Science3 references16 citations
TL;DR

This paper demonstrates that Skip-gram with Negative Sampling (SGNS) and GloVe, despite different training objectives, implicitly factorize similar matrices—specifically, shifted pointwise mutual information (PMI) and a specialized form of GloVe, respectively. The key finding is that GloVe's bias terms converge toward values matching those in SGNS, suggesting both models optimize toward equivalent objectives, with empirical results showing high correlation (R² = 0.892) between GloVe biases and log-frequency terms after training.

ABSTRACT

The Global Vectors for word representation (GloVe), introduced by Jeffrey Pennington et al. is reported to be an efficient and effective method for learning vector representations of words. State-of-the-art performance is also provided by skip-gram with negative-sampling (SGNS) implemented in the word2vec tool. In this note, we explain the similarities between the training objectives of the two models, and show that the objective of SGNS is similar to the objective of a specialized form of GloVe, though their cost functions are defined differently.

Motivation & Objective

  • To investigate the theoretical and empirical relationship between GloVe and SGNS, two leading word embedding models.
  • To determine whether the training objectives of SGNS and GloVe are fundamentally similar despite differing cost functions.
  • To examine whether the bias terms in GloVe converge toward values used in SGNS, particularly log-frequency terms.
  • To evaluate the impact of weighting functions and sampling strategies on model optimization and performance.

Proposed method

  • The paper compares the local cost functions of GloVe and SGNS, showing both aim to factorize matrices derived from word-context co-occurrence counts.
  • It derives the optimal solution for SGNS as a shifted PMI matrix, where the objective is to align the dot product of word and context vectors with log-co-occurrence counts minus bias terms.
  • It reformulates the GloVe objective to show that its ideal solution is equivalent to a shifted PMI matrix, with bias terms absorbing log-frequency components.
  • The authors conduct empirical experiments on a 1.5-billion-token Wikipedia corpus, training GloVe with varying $x_{\text{max}}$ and $\alpha$ values to observe bias convergence.
  • They compute Pearson correlation coefficients between GloVe bias terms and log-frequency terms ($\log{\#(w_i)}$, $\log{\#(c_j)}$) to assess convergence.
  • They use symmetric co-occurrence counting and 50 training iterations to evaluate bias stability and correlation over time.

Experimental results

Research questions

  • RQ1Are the training objectives of SGNS and GloVe fundamentally similar despite different cost functions?
  • RQ2Can the bias terms in GloVe be shown to converge toward the log-frequency terms used in SGNS?
  • RQ3How does the choice of weighting function in GloVe affect the convergence of bias terms to log-frequency values?
  • RQ4To what extent do the implicit factorizations of SGNS and GloVe align with a shifted PMI matrix?
  • RQ5Does negative sampling in SGNS implicitly down-weight rare co-occurrences in a way analogous to GloVe's weighting function?

Key findings

  • After 50 training iterations, the Pearson correlation between GloVe word bias terms and $\log{\#(w_i)}$ reached $R^2 = 0.892$ when $x_{\text{max}} = 10$, indicating strong convergence toward log-frequency terms.
  • The correlation between GloVe context bias terms and $\log{\#(c_j)}$ also increased significantly, reaching $R^2 = 0.892$ under the same conditions.
  • With $x_{\text{max}} = 100$, the correlation between word biases and log-frequencies reached $R^2 = 0.773$ after 50 iterations, showing slower but stable convergence.
  • The bias terms in GloVe were observed to converge toward values matching those used in SGNS, suggesting that the SGNS bias initialization is a reasonable approximation for globally optimal solutions.
  • The weighting function in GloVe, which down-weights rare co-occurrences, was found to improve convergence stability, with smaller $x_{\text{max}}$ values yielding higher correlations.
  • The results confirm that both models implicitly factorize a shifted PMI matrix, with SGNS's objective being equivalent to a specialized form of GloVe's objective.

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.