Abstract
Contextualized models like BERT excel at capturing nuance but often suffer from "over-sensitivity" to context, leading to a "contextualization gap" where they underperform compared to static embeddings on traditional lexical semantic tasks. We present a zero-shot post-processing technique that uses static word embeddings as anchors to refine these representations. Our method significantly improves performance on both within-word and inter-word tasks with minimal computational overhead.
Introduction
In the current NLP landscape, contextualized models such as BERT, RoBERTa, and XLNet are the gold standard because they generate dynamic vectors based on a word's surroundings (e.g., distinguishing "bank" as a financial institution versus a riverbank). However, these models exhibit a surprising weakness: they often perform worse than "old-school" static embeddings (like word2vec or FastText) on traditional tasks measuring general word similarity and analogy.
The authors identify a "contextualization gap." Because these models are highly dynamic, they can become over-sensitive to minor variations in a sentence, leading to "noisy" representations even for monosemous words (words with only one meaning). This research explores how to inject the stable, global semantic knowledge found in static embeddings into contextualized models without requiring expensive fine-tuning or labeled datasets.
Methodology: The "Meeting-in-the-Middle" Alignment
The proposed framework utilizes a zero-shot post-processing technique to align contextualized spaces with static ones. The process involves three main steps:
- Creating Static Anchors: To enable comparison between dynamic BERT vectors and fixed FastText vectors, the authors generate "static anchors" for the contextualized models. They calculate the average representation for the top 200,000 words from Wikipedia across all their corpus contexts.
- Orthogonal Alignment: Using Procrustes analysis, an orthogonal alignment matrix ($W$) is found to rotate the target space (e.g., FastText) to match the source space (e.g., BERT’s anchors).
- Linear Transformation: A linear mapping ($M$) is learned to transform the source space toward the average of the source and the newly rotated target.
Crucially, this mapping $M$ is applied to the original dynamic contextualized embeddings at test time, anchoring the dynamic vectors to a more stable semantic space.
Experimental Setup
The method was evaluated on two categories of lexical semantic tasks:
- Within Word Tasks: Assessing handling of different usages of the same word (Usim, WiC, CoSimlex-I).
- Inter Word Tasks: Measuring relations between different words in context (CoSimlex-II, SCWS).
The anchoring process leveraged the top 200k most frequent words from English Wikipedia.
Results and Discussion
The proposed method yielded consistent improvements across BERT, RoBERTa, and XLNet. Notably, the Usim task saw a substantial improvement of approximately 0.04 in Spearman’s $\rho$, while SCWS improved by roughly 0.03.
Key Insights
- Static Guidance is Superior: Using static models like FastText as a "guide" provided more consistent gains than using other contextualized models. Static embeddings appear to capture complementary information that transformers lack.
- Reducing Contextual Noise: Qualitative analysis indicates the transformation helps most by reducing variance in monosemous words. For instance, BERT might initially perceive the word "daughter" differently in two similar sentences; the transformation pulls these representations closer, correcting "False Negative" errors in tasks like WiC.
- Efficiency: Unlike fine-tuning, this post-processing takes approximately 10 seconds on a standard machine and requires no labeled data.
Conclusion and Future Work
While highly effective, the current approach relies on linear transformations for efficiency; non-linear mappings might capture even more complex relationships. Furthermore, while theoretically language-agnostic, the study focused on English. Future work should explore performance in morphologically rich languages and downstream applications like Word Sense Disambiguation (WSD).
Summary updated