GloVe: Global Vectors for Word Representation

Jeffrey Pennington, Richard Socher, Christopher D. Manning

2014 · EMNLP

GloVe: Global Vectors for Word Representation

Problem

Framing

Count models used global corpus statistics but missed the linear regularities seen in predictive embeddings. GloVe closes this gap with a weighted log-bilinear fit to co-occurrence counts, reaching 75.0% analogy accuracy with 300d vectors on 42B tokens.

Currently Used Methods

Foundational

Proposed Method

Architecture

GloVe learns word vectors wi\mathbf{w}_i, context vectors w~j\tilde{\mathbf{w}}_j, and biases bi,b~jb_i, \tilde{b}_j. It regresses logXij\log X_{ij} from a bilinear score and uses wi+w~i\mathbf{w}_i + \tilde{\mathbf{w}}_i as the final embedding.

Verified figure: equation \mathbf{w}_i^T \tilde{\mathbf{w}}_k + b_i + \tilde{b}_k = \log(X_{ik}) beside the weighting curve f(X_{ij}), which saturates at x_{\max} with \alpha=3/4.

Loss / Objective

The model minimizes a weighted least-squares fit over nonzero co-occurrences.

J=i,j=1Vf(Xij)(wiTw~j+bi+b~jlogXij)2J = \sum_{i,j=1}^{V} f(X_{ij}) \left( \mathbf{w}_i^T \tilde{\mathbf{w}}_j + b_i + \tilde{b}_j - \log X_{ij} \right)^2 f(x)={(x/xmax)αif x<xmax1if xxmaxf(x)= \begin{cases} (x/x_{\max})^{\alpha} & \text{if } x < x_{\max} \\ 1 & \text{if } x \ge x_{\max} \end{cases}

Algorithm

After optimization, the final representation sums the two learned embeddings.

zi=wi+w~i\mathbf{z}_i = \mathbf{w}_i + \tilde{\mathbf{w}}_i

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Table 1: Word analogy accuracy across models, dimensions, and corpus sizes

ModelDim.SizeSem.Syn.Tot.
ivLBL1001.5B55.950.153.2
HPCA1001.6B4.216.410.8
GloVe1001.6B67.554.360.3
SG3001B616161
CBOW3001.6B16.152.636.1
vLBL3001.5B54.264.860.0
ivLBL3001.5B65.263.064.0
GloVe3001.6B80.861.570.3
SVD3006B6.38.17.3
SVD-S3006B36.746.642.1
SVD-L3006B56.663.060.1
CBOW^{\dagger}3006B63.667.465.7
SG^{\dagger}3006B73.066.069.1
GloVe3006B77.467.071.7
CBOW10006B57.368.963.7
SG10006B66.165.165.6
SVD-L30042B38.458.249.2
GloVe30042B81.969.375.0

Ablations

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers