Abstract
Detecting semantic shifts in word usage across different time periods or social groups is a cornerstone of digital humanities and social science research. While current state-of-the-art methods rely on complex vector space alignment (AlignCos), they often suffer from instability, interpretability issues, and a fundamental "alignment paradox." We present a simpler approach based on Nearest Neighbors (NN) that bypasses alignment entirely. By measuring the intersection of a word's top neighbors across corpora, our method achieves higher stability and accuracy on benchmarks while providing intuitive, local explanations for detected changes.
Introduction
How does the meaning of a word evolve? Whether comparing language use between generations or tracking shifts over decades, researchers need robust tools to identify words that have "moved" in their semantic context. The prevailing paradigm, AlignCos, involves training word embeddings on two separate corpora and then mathematically aligning the resulting vector spaces. However, this approach is plagued by three major issues:
- Instability: Stochastic training of embeddings leads to inconsistent results across runs. If trained twice on the same data, the list of "top changed words" can vary wildly.
- The Alignment Paradox: The process of alignment tries to minimize distances between identical word forms across spaces. This inherently suppresses the very usage changes researchers seek to find, as the algorithm forces words that have changed to stay in the same place.
- Lack of Interpretability: Global transformations make it difficult to pinpoint why a specific word is flagged as changed when the decision is based on a black-box global transformation.
Methodology: The Nearest Neighbors Approach
We propose a "Nearest Neighbors" (NN) method that avoids global alignment. For any target word $w$, we identify its top $k$ nearest neighbors in Corpus A and Corpus B using cosine similarity. The degree of usage change is then inversely proportional to the size of the intersection between these two neighbor lists. A high overlap suggests stable usage, while a low overlap indicates a shift into a new semantic neighborhood.
This approach is inherently local, focusing only on the immediate context of the word. This avoids being distracted by global shifts in the vector space that might be artifacts of the training process rather than genuine linguistic change.
Experimental Results
We evaluated the NN method across diverse datasets, including Twitter splits (by age, gender, and profession), historical English (Google Books Ngrams), and diachronic French and Hebrew data.
Stability and Accuracy
Quantitative tests demonstrate that the NN method is far more stable than alignment-based approaches. As shown in Figure 3, the NN method (solid lines) maintains a much higher "Intersection@k" score across different random initializations compared to AlignCos (dashed lines). This stability ensures that researchers obtain reproducible results.
On the SURel benchmark for domain-based change, our method achieved a Spearman correlation of 0.859, significantly outperforming AlignCos's 0.800. Furthermore, the NN method handles proper nouns naturally—identifying, for instance, that "Harlem" is used as a neighborhood by celebrity "performers" but in the context of the Globetrotters by "athletes."
Qualitative Interpretability
One of the primary advantages of the NN method is its transparency. Because the change is defined by specific neighbor words, researchers can immediately see the nature of the shift. For example, the word "clutch" exhibits a distinct split in Twitter usage between genders.
In female-authored tweets, "clutch" is surrounded by fashion terms like handbag, sequin, and dress. In male-authored tweets, its neighborhood shifts entirely to basketball terminology like layups, free-throws, and game-winning.
Conclusion
By prioritizing locality and simplicity, the Nearest Neighbors method provides a more reliable and interpretable alternative to complex alignment-based techniques. It avoids the self-contradictory nature of global space alignment and provides consistent, explainable results across diverse linguistic contexts. Future work will explore applying this logic to contextualized embeddings like BERT for even more granular analysis.
Summary updated