Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Statistical Uncertainty in Word Embeddings: GloVe-V

GloVe-V gives word embeddings uncertainty estimates for hypothesis testing

  • Problem Point estimates of word embeddings hide how much sparse co-occurrence data limits each word's position. Bootstrapping the corpus is computationally intractable on large datasets, so researchers rarely check which similarities rest on thin evidence.
  • Method GloVe-V estimates a covariance for each word's GloVe vector analytically.
  • Results GloVe-V enables significance tests for word embedding comparisons, such as cosine similarity between word pairs. In the SemEval-2012 test, GloVe is significantly above the random baseline on only two of four relations.

Why point estimates hide word-level noise

Word embeddings now sit inside many computational social science pipelines, from charting meaning change to measuring bias. Most of these studies use one vector per word and don't ask how stable that vector is. That gap matters because a word should be less certain about its position when the raw text gives less data on its co-occurrences.

Researchers who rely on point estimates have no direct way to see which similarities rest on thin evidence.

Existing remedies try to fill this gap but come at a high cost. Bootstrapping the documents in the training corpus, or permuting the word list or lexicon, is computationally intractable on large datasets. These approaches also respond to which documents or words were selected. So a method that targets the co-occurrence data itself addresses the source of the noise directly.

A likelihood around the fitted GloVe vectors

The probability model that makes per-word variances computable starts from GloVe's fitted parameters, with the context vectors and constant terms held fixed at their optimal values. Under that condition, each GloVe center vector is the optimal parameter of a weighted multivariate normal model for the rows of the logged co-occurrence matrix.

The model writes each row of log X as the word's vector times the context vectors, plus constant terms, plus a normal error term.

The model treats the rows of log X as independent once those fixed quantities are given, and this independence lets the calculation run word by word. Brunet et al. (2019) make a similar assumption when estimating how individual documents influence embedding statistics, so the authors treat it as an established tool. The authors note that this assumption keeps the variance computation tractable on large vocabularies rather than making the model exact.

Each word's residual is modeled as normal with variance σ_i² scaled by the inverse of a weight matrix D_K built from the nonzero co-occurrence weights. The covariance of the word's center vector takes the form Σ_i = σ_i² (Σ_{j∈K} f(X_ij) v_j* v_j*ᵀ)⁻¹, where K is the set of context words with nonzero co-occurrence. The matrix inside the parentheses is the word's Hessian block, so the covariance is its inverse scaled by the reconstruction error σ_i².

The reconstruction error σ_i² is unknown, so the authors replace it with a plug-in estimate. The estimate is a weighted sum of squared gaps between the logged counts and the fitted terms, divided by |K| minus D. The covariance estimator is valid only for words that co-occur with more unique context words |K| than the dimensionality D.

Keeping the inverse stable on small corpora

The GloVe-V covariance only exists for words whose number of unique context words |K| exceeds the vector dimension D. Reducing the dimensionality D is the simplest fix for smaller corpora, since it raises the share of words with a valid covariance. When |K| is close to D, the inverse in Equation 6 can produce numerical problems even if it is technically possible to compute.

The authors handle these ill-conditioned words by switching to a different calculation for each affected word. The switch applies to any word whose Hessian block Hi = Pj∈K f (Xij)v∗j (v∗j )T has a condition number implying numerical error above 1e-10 in its inverse. For such a word, they compute the Moore-Penrose pseudo-inverse of Hi as VΛ+UT, using the singular value decomposition of Hi.

Each singular value Λjj below 1e-3 times the largest singular value is set to zero in Λ+, so the pseudo-inverse drops those directions.

The pseudo-inverse keeps the variance calculation defined for words that would otherwise fail, so the downstream steps can still run. Once each word has a covariance block, the delta method carries that variance to any differentiable test statistic, such as cosine similarity. Because the gradient is sparse when a statistic depends on few words, this propagation stays cheap.

Carrying variance to test statistics

Once the covariance for each word is in hand, the question is how it reaches a downstream statistic such as cosine similarity. For differentiable test statistics, the authors use the delta method, which is the most computationally efficient route to an asymptotic variance. The delta method states that if the embedding converges to a normal distribution with covariance Σ, the transformed statistic converges to a normal with variance ϕ′(W)T Σϕ′(W).

If the test statistic depends on only a subset of words, the computation stays cheap, because the gradient is sparse.

Non-differentiable statistics need a different route, and researchers can draw repeatedly from the estimated multivariate normal distribution. For each draw, they recalculate the test statistic of interest, a procedure that the authors cite to Tanner (1996). The distribution used for these draws is the one in Equation 6, which is the block-diagonal covariance for W.

The authors provide a tutorial and starter code in their repository, so any downstream test statistic can use this method.

The results section that follows applies these variances to COHA for the 20th century, using 300-dimensional GloVe embeddings. The corpus covers fiction, non-fiction, magazines, and newspapers from 1900–1999, with a symmetric context window of 8 words.

Frequency pattern and the bootstrap comparison

GloVe-V variances trained on COHA shrink smoothly as word frequency rises, so rare words carry more uncertainty. The authors train GloVe on COHA for 1900 to 1999 with 300 dimensions and a symmetric context window of 8 words. Each model ran for 80 iterations and took about 40 minutes on a workstation using 48 CPU cores. Across a random sample of 5,000 words drawn in proportion to frequency, the L2-norm of the variance diagonal falls as frequency rises.

Rare words such as illumination and rigs carry more uncertainty than frequent words such as she and large. The higher uncertainty for rare words follows from the estimated covariance matrices themselves, not from any added assumption.

For words where |K| is close to D, the authors consider the estimation approach a reasonable estimate of the variance. The pseudo-inverse route from Section 3.3 handles these words, where the inverse can be numerically unstable.

The document bootstrap answers a different question, because it treats the corpus as a random sample from a wider population of documents. That mismatch with the embedding estimation target means document-level uncertainty can understate or overstate the standard error of a downstream statistic. The opposite case also happens, because a word very common in only a few documents can show high document-level uncertainty.

Across 1,600 randomly sampled word pairs, GloVe-V standard errors for cosine similarity are more sensitive to word frequency. The GloVe-V standard errors are also more efficient to compute than the document bootstrap. The authors suggest using the document bootstrap to test sensitivity to particular documents. They suggest using GloVe-V to run hypothesis tests with the corpus held fixed.

Whether the nearest neighbor of doctor is really nearest

Nearest-neighbor lists feed both evaluation and analysis, but point estimates hide which similarities rest on thin co-occurrence data. The authors rank healthcare occupations by their cosine similarity to doctor and plot a 95% GloVe-V uncertainty interval around each score. The ranks come from the point estimates, so each occupation gets a nearest-neighbor position printed above its point.

Word analogy tasks also rely on nearest neighbors, so the same ranking problem reaches those evaluations.

The top three neighbors cannot be statistically distinguished from one another. Neighbors four through ten also cannot be separated, so they form a second group with the same problem. For example, the difference between the cosine similarity of doctor with surgeon and of doctor with dentist gives p = 0.10. Which neighbor counts as nearest is therefore uncertain, and that uncertainty would stay invisible without the GloVe-V variances.

The authors separate two uses of uncertainty here, with the document bootstrap and GloVe-V serving different purposes. The document bootstrap can test sensitivity to particular documents, while GloVe-V holds the corpus fixed and supports hypothesis tests. The nearest-neighbor example is one case of this hypothesis-testing use, which the authors frame as significance testing beyond point estimates.

Whether GloVe beats random on relational similarity

SemEval-2012 relational similarity is a closed-list benchmark, so the authors can test GloVe against a random baseline. Random baselines pair words at random, which sets a lower bound on the expected performance of any model. The authors compare GloVe trained on COHA for 1900 to 1999 with a random rating across four relation classes. They score each relation with the Spearman correlation and with the MaxDiff choice procedure.

The benchmark covers a taxonomy of 79 types of relations across 10 classes, and the authors report only a subset.

The point estimates suggest GloVe outperforms the random baseline on every relation. Once uncertainty is added to both point estimates, that conclusion becomes much weaker. For the MaxDiff metric, the p-values for relations 1 to 4 are 0.08, below 0.001, 0.02 and 0.08. So GloVe is significantly above random on only two of the four relations.

The GloVe-V intervals also separate performance across relation classes, not only against chance. GloVe does better on Contrast than on Cause-Purpose, with p = 0.03 for MaxDiff. But Cause-Purpose does not beat Part-Whole, with p = 0.92, even though its point estimate is higher. The point-estimate ordering of Cause-Purpose above Part-Whole therefore isn't statistically supported.

Uncertainty from sparse co-occurrences shapes these benchmark verdicts, so the authors' conclusions depend on the intervals.

Surname frequency and bias scores

Bias studies often drop rare surnames, because point estimates give no way to show their extra uncertainty. Lower frequency surnames carry higher uncertainty in their embedded positions, and dropping them risks the representativeness of the word list. The authors instead compute the cosine bias score of Garg et al. (2018) for an Asian surname list in COHA, split into frequency quartiles.

The bias measure averages cosine similarity between Asian surnames and 20 Otherization words, relative to White surnames. A more positive score means Asian surnames sit closer to these negative Otherization words than White surnames do.

The bias estimate becomes more positive for more frequent surnames, so the most frequent names give an exaggerated result. The authors trace this to frequent names such as Ghandi, Mao and Mohammed, which are not representative of the whole class. A single GloVe-V interval for the master list of Asian surnames absorbs both high and low frequency names.

Researchers don't have to drop any surnames to keep the conclusions general.

For gender bias, the WEAT effect size is compared across three queries with GloVe-V intervals. The career-family versus male-female comparison is distinguishable from math-arts at p < 0.001. That same comparison isn't distinguishable from science-arts, with p = 0.11. Estimating the anti-Asian bias decade by decade shows no significant trend over time.

That result suggests the time trends reported in Garg et al. (2018) should be tested for significance too.

Alternatives that were tried and dropped

The authors first tried a word-level error measure based on the skip-gram with negative-sampling (SGNS) model. Levy and Goldberg show that SGNS implicitly factorizes a matrix of shifted pointwise mutual information (PMI). For a word w, they took the median of d(w, c) over all context words c, measuring the deviation from the optimal value.

This measure is useful for judging estimation quality, but it is not a probabilistic model. So it offers no obvious way to run hypothesis tests on downstream applications, which is why the authors sought a different approach.

Han et al. (2018) adapt this method to SGNS embeddings and add document covariate metadata for corpus subsets such as time periods or genres. Training meaningful embeddings with this method proved challenging on COHA. On the MEN similarity task, the best run reached a mean Pearson similarity of 0.41, against 0.51 for the same benchmark.

The authors tried refinements such as different weight initialization schemes and re-weighting the Kullback-Leibler divergence term. None of these refinements gave greater success. This scaling problem made it effectively impossible to draw meaningful samples from these distributions. Posterior standard deviations fell as frequency rose for higher frequency words, the same inverse pattern as in Figure 3.

For lower frequency words, the posterior standard deviations stayed at their initialization value, and the convergence diagnostics confirmed that these parameters weren't training correctly.

What GloVe-V doesn't cover

Reducing the dimensionality helps small corpora, since variances can be computed for 96% of word embeddings in the New York Times Annotated Corpus with 50-dimensional vectors. At 300 dimensions, the same corpus gives variances for only 36% of its embeddings.

Researchers who want their own variances need access to the co-occurrence matrix, because the variances rely on an empirical estimate of the reconstruction error. The methodology applies solely to GloVe, because its statistical foundations don't carry over to other embedding models.

GloVe-V intervals capture only uncertainty from sparsity in the co-occurrence matrix, which is one of many uncertainty types. Instability from the documents in the corpus and uncertainty from model hyperparameters are both held fixed. Statistical uncertainty in the context vector positions and bias terms is also treated as constant for computational tractability.

Treating these terms as constants, together with the conditional independence assumption on words, reduces the number of free parameters. The same kind of independence assumption enables a computationally efficient approximation to a document bootstrap in Brunet et al. (2019). The authors tried other approaches, detailed in Appendix A.4, and found GloVe-V balances probabilistic rigor with computational tractability.

Paper info

Authors
Andrea Vallebueno, Cassandra Handan-Nader, Christopher D. Manning, Daniel E. Ho
Venue
arXiv · Preprint
First published
2024-6-18
Added
2026-11-5
Updated
2024-6-18
Version
v1
arXiv
2406.12165
Category
cs.CL
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

Static word embeddings are ubiquitous in computational social science applications and contribute to practical decision-making in a variety of fields including law and healthcare. However, assessing the statistical uncertainty in downstream conclusions drawn from word embedding statistics has remained challenging. When using only point estimates for embeddings, researchers have no streamlined way of assessing the degree to which their model selection criteria or scientific conclusions are subject to noise due to sparsity in the underlying data used to generate the embeddings. We introduce a method to obtain approximate, easy-to-use, and scalable reconstruction error variance estimates for GloVe (Pennington et al., 2014), one of the most widely used word embedding models, using an analytical approximation to a multivariate normal model. To demonstrate the value of embeddings with variance (GloVe-V), we illustrate how our approach enables principled hypothesis testing in core word embedding tasks, such as comparing the similarity between different word pairs in vector space, assessing the performance of different models, and analyzing the relative degree of ethnic or gender bias in a corpus using different word lists.

Quote from the paper

Andrea Vallebueno, Cassandra Handan-Nader, Christopher D. Manning, Daniel E. Ho (2024). Statistical Uncertainty in Word Embeddings: GloVe-V. arXiv:2406.12165v1. https://arxiv.org/abs/2406.12165v1

BibTeX
@misc{vallebueno2024statistical,
  title = {{Statistical Uncertainty in Word Embeddings: GloVe-V}},
  author = {Andrea Vallebueno and Cassandra Handan-Nader and Christopher D. Manning and Daniel E. Ho},
  year = {2024},
  eprint = {2406.12165},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.12165v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up