TL;DR
This paper reveals that cosine similarity, a standard metric for comparing BERT embeddings, systematically underestimates the semantic similarity of high-frequency words compared to human judgments. The authors demonstrate that this bias is rooted in the representational geometry of the embedding space, where frequent words occupy significantly larger volumes (bounding balls), leading to distorted similarity measurements.
What Problem Does This Paper Address?
Measuring semantic similarity is fundamental to NLP tasks like Question Answering (QA), Information Retrieval (IR), and Machine Translation (MT). Many modern metrics, such as BERTScore, rely on the cosine similarity between contextualized embeddings.
While previous research has highlighted the instability of low-frequency word embeddings, this paper identifies a critical flaw at the other end of the spectrum: high-frequency words. The authors show that BERT's cosine similarity scores for common words are "pushed apart" in a way that doesn't align with human perception. This systematic underestimation persists even after controlling for polysemy (the number of word senses), suggesting a fundamental geometric bias in how large language models represent frequent terms.
Methods
The researchers investigated BERT-base-cased embeddings using a multi-pronged approach:
- Frequency Estimation: They approximated word frequencies in BERT’s pre-training corpus using a combination of Wikipedia and BookCorpus data.
- Regression Analysis: They used Ordinary Least Squares (OLS) regression to measure the effect of frequency on cosine similarity, controlling for confounders like polysemy, part-of-speech, and lemma.
- Geometric Characterization: To understand why this happens, they introduced the concept of Minimum Bounding Hyperspheres. They calculated the radius of the smallest sphere that contains all contextual embeddings (the "sibling cohort") for a specific word type.
- Theoretical Modeling: They provided a formal 2D geometric argument to illustrate how an increase in the radius of a word's representational "ball" leads to lower cosine similarity scores relative to a target vector.
Datasets
The study utilized two primary datasets that pair contextualized word instances with human similarity judgments:
- Word-In-Context (WiC): Expert-judged pairs of sentences where a target word is labeled as having the "same" or "different" meaning.
- Stanford Contextualized Word Similarity (SCWS): Non-expert ratings of word similarity on a scale of 1 to 10.
- BERT Pre-training Corpus: Used to derive the frequency counts for the target words.
Key Insights and Ideas
-
Frequency is a Hidden Confounder: Even when two instances of a word have the exact same meaning, their cosine similarity decreases as their training frequency increases.
Figure 1: Ordinary Least Squares regression of co- sine similarity against frequency, for examples with the same meaning (blue) and different meaning (orange). Both regressions show a significant negative associa- tion between cosine similarity and frequency. -
Geometric "Dilution": High-frequency words occupy a much larger volume in the embedding space. The radius of a word's "sibling cohort" correlates strongly with its log-frequency ($r = 0.62$).
Figure 3: The radius of the minimal bounding ball of sibling embeddings of words is correlated with log(word frequency). (Pearson’s r = 0.62, p < .001) -
The Threshold Problem: Geometrically, if a word's representational ball grows while remaining tangent to a target vector, a smaller fraction of its points will fall within the "similarity threshold" required to match human judgment.
Figure 4: An illustration of how using cosine similar- ity can underestimate word similarity. The cosine simi- larity between a contextualized representation (orange) and ⃗w is the dot product of the former’s projection onto the red arc of the unit circle (with length 2θ) and ˆw. Only points in the blue region are close enough to ˆw to be deemed similar by humans. As the bounding ball grows (e.g., with higher frequency words), if it remains tangent to ⃗w, the fraction of points in the blue region will shrink, leading to underestimation.
Key Results
-
Underestimation vs. Humans: In the highest frequency bin of the WiC dataset, humans judged 54% of word pairs as having the same meaning. However, a cosine-based model (with a tuned threshold) only predicted 25% as the same meaning.
Figure 2: Percentage of examples labeled as having the “same meaning”. In high frequency words, cosine similarity-based predictions (blue/left) on average un- der-estimate the similarity of words as compared to hu- man judgements (green/right). -
Predictive Power of Geometry: The radius of the bounding ball alone explains 17% of the variance in cosine similarity across the WiC dataset.
- Persistent Bias: The negative effect of frequency remains significant in regression models even after accounting for human ratings, indicating that cosine similarity is failing to capture semantic nuances that humans easily recognize in common words.
Limitations and Future Work
The authors acknowledge that a simple linear correction for frequency does not fully resolve the underestimation problem, as the improvement in predicting human ratings was marginal.
Future research directions include:
- Investigating the downstream impact of these distortions on metrics like BERTScore and tasks like IR.
- Developing frequency-based interventions during the pre-training phase (e.g., modifying training data distributions).
- Exploring post-processing techniques to mitigate these geometric biases and better align embedding similarity with human semantic perception.
- Examining how other factors, such as sentiment or context-specific similarity, interact with these frequency-induced geometric distortions.
Summary updated