Abstract
Contextualized embeddings such as BERT can serve as strong input representations to NLP tasks, outperforming their static embeddings counterparts such as skip-gram, CBOW and GloVe. However, such embeddings are dynamic, calculated according to a sentence-level context, which limits their use in lexical semantics tasks. We address this issue by making use of dynamic embeddings as word representations in training static embeddings, thereby leveraging their strong representation power for disambiguating context information. Results show that this method leads to improvements over traditional static embeddings on a range of lexical semantics tasks, obtaining the best reported results on seven datasets.
Introduction
In Natural Language Processing (NLP), word representations generally fall into two categories: static embeddings (e.g., Word2Vec, GloVe) and dynamic/contextualized embeddings (e.g., BERT, ELMo). While static embeddings provide a fixed vector for each word, making them ideal for lexical semantics tasks like word similarity, they struggle with polysemy—where a single word like "bank" has multiple meanings. Dynamic embeddings address this by changing a word's vector based on its sentence context, but they are difficult to use in simple lookup-table scenarios.
This paper introduces a novel framework to "distill" the power of contextualized models into traditional static word embeddings. By using BERT to represent words during the training of a Skip-gram model, the authors create static embeddings that better handle word-sense ambiguity and complex relationships.
Methods
The proposed hybrid training framework integrates BERT into the classic Skip-gram algorithm. In a standard Skip-gram model, a "center word" is used to predict surrounding "context words," with both pulled from static lookup tables. The authors introduce two primary innovations:
- Dynamic Center Words: Instead of a static vector, the entire sentence is fed into a pre-trained BERT model. The BERT output for the specific center word in that context is used as the representation, allowing the model to disambiguate polysemous words during training.
- Attention Aggregation: An attention mechanism weights context words based on their relevance to the BERT-represented center word, rather than treating all words in a window equally.
A linear projection layer maps BERT’s 768-dimensional output down to a standard embedding size (e.g., 300), and the model is trained using Noise Contrastive Estimation (NCE) on a large Wikipedia corpus consisting of 1.1 billion tokens.
Results
The model was evaluated on word similarity (WordSim-353, SimLex-999, Rare Word, MEN-3K) and analogy tasks (Google Analogy, SemEval-2012). The proposed method outperformed traditional static embeddings (Skip-gram, GloVe, FastText) on 7 out of 8 datasets.
On WordSim-353 (WS353), the model improved performance by 6.5% over the best baselines. On the Google Analogy task, it achieved 75.8% accuracy, a significant jump from Skip-gram's 43.5%. Qualitative analysis via t-SNE showed a more organized vector space, with relational vectors (e.g., king-queen) exhibiting higher parallelism.
Discussion and Conclusion
The core insight is that BERT can act as a high-quality teacher for simpler models. By using BERT's context-aware vectors as input, the resulting static embeddings learn a more nuanced "average" meaning without being "polluted" by conflicting senses during training.
While the approach requires significant computational overhead due to BERT forward passes during training, the resulting static embeddings are highly efficient for downstream lookup. Future work may explore "sense embeddings" to explicitly represent multiple meanings per word and integrate syntactic information into the framework.
Summary updated