Solving Cosine Similarity Underestimation between High Frequency Words by $\ell_2$ Norm Discounting
Saeth Wannasuphoprasit, Yi Zhou, Danushka Bollegala
Findings: Semantics: Lexical Findings Paper
Session 1: Semantics: Lexical (Virtual Poster)
Conference Room: Pier 7&8
Conference Time: July 10, 11:00-12:30 (EDT) (America/Toronto)
Global Time: July 10, Session 1 (15:00-16:30 UTC)
Spotlight Session: Spotlight - Metropolitan West (Spotlight)
Conference Room: Metropolitan West
Conference Time: July 10, 19:00-21:00 (EDT) (America/Toronto)
Global Time: July 10, Spotlight Session (23:00-01:00 UTC)
Keywords:
word embeddings
TLDR:
Cosine similarity between two words, computed using their contextualised token embeddings obtained from masked language models (MLMs) such as BERT has shown to underestimate the actual similarity between those words~CITATION.
This similarity underestimation problem is particularly severe for high fr...
You can open the
#paper-P2112
channel in a separate window.
Abstract:
Cosine similarity between two words, computed using their contextualised token embeddings obtained from masked language models (MLMs) such as BERT has shown to underestimate the actual similarity between those words~CITATION.
This similarity underestimation problem is particularly severe for high frequent words.
Although this problem has been noted in prior work, no solution has been proposed thus far.
We observe that the $\ell_2$ norm of contextualised embeddings of a word correlates with its log-frequency in the pretraining corpus.
Consequently, the larger $\ell_2$ norms associated with the high frequent words reduce the cosine similarity values measured between them, thus underestimating the similarity scores.
To solve this issue, we propose a method to \emph{discount} the $\ell_2$ norm of a contextualised word embedding by the frequency of that word in a corpus when measuring the cosine similarities between words.
We show that the so called \emph{stop} words behave differently from the rest of the words, which require special consideration during their discounting process.
Experimental results on a contextualised word similarity dataset show that our proposed discounting method accurately solves the similarity underestimation problem.{An anonymized version of the source code of our proposed method is submitted to the reviewing system.