Lost in Context? On the Sense-wise Variance of Contextualized Word Embeddings
This work addresses the problem of semantic consistency in NLP for researchers and practitioners, but it is incremental as it builds on existing understanding of contextualized embeddings.
The study quantified the variance of contextualized word embeddings across different contexts in pre-trained language models, finding that embeddings are generally consistent but influenced by factors like part-of-speech and sentence length, and identified a position bias where first words are more similar.
Contextualized word embeddings in language models have given much advance to NLP. Intuitively, sentential information is integrated into the representation of words, which can help model polysemy. However, context sensitivity also leads to the variance of representations, which may break the semantic consistency for synonyms. We quantify how much the contextualized embeddings of each word sense vary across contexts in typical pre-trained models. Results show that contextualized embeddings can be highly consistent across contexts. In addition, part-of-speech, number of word senses, and sentence length have an influence on the variance of sense representations. Interestingly, we find that word representations are position-biased, where the first words in different contexts tend to be more similar. We analyze such a phenomenon and also propose a simple way to alleviate such bias in distance-based word sense disambiguation settings.