Substitution-based Semantic Change Detection using Contextual Embeddings

Dallas CardACL 2023

Abstract

Lexical Semantic Change Detection (LSCD)—the task of identifying shifts in word meaning over time—has traditionally been a stronghold for static word vectors, which often outperform complex contextual models like BERT. This paper introduces Substitution-based Semantic Change Detection (SBSCD), a refreshingly simple approach that leverages a pretrained language model to predict "fill-in-the-blank" substitutes for words across different eras. By comparing these substitute distributions, the method achieves state-of-the-art accuracy while providing a human-readable "paper trail" of semantic evolution.

Introduction

In Natural Language Processing, contextual embeddings (e.g., BERT) are the standard for most tasks. However, in LSCD, they have historically struggled to surpass simpler static vectors like Word2Vec. The primary challenge is that contextual models produce a unique vector for every occurrence of a word, requiring researchers to average or cluster thousands of high-dimensional vectors to compare time periods. These "black box" comparisons are computationally expensive and offer little explanation for how or why a word's meaning changed.

Methodology: Substitution-based Detection

The proposed SBSCD method bypasses vector alignment issues by using the language model’s vocabulary as a fixed reference point. The process involves five key steps:

  1. Masking: Target words in a historical corpus are masked out.
  2. Predicting: A pretrained BERT model predicts the top-$k$ most probable substitutes based on the surrounding context.
  3. Distribution Building: These substitutes are aggregated into a probability distribution for each era.
  4. Comparison: Change is measured using Jensen-Shannon Divergence (JSD) between the distributions of different time periods.
  5. Frequency Correction: Raw scores are normalized using quantile scaling to account for the inherent noise in rare words, which naturally appear to change more.
Table 1: Examples of target words, their human ratings, and the top substitutes generated by the model for two different time periods.

As shown in Table 1, the method provides immediate interpretability. For instance, the word "plane" shifts from geometric contexts (surface, lines) in the 19th century to aviation contexts (aircraft, jet) in the 20th century.

Key Results and Performance

SBSCD was evaluated against five established benchmarks, including SemEval 2020 Task 1 (covering English, German, Latin, and Swedish) and the GEMS dataset.

Table 2: Comparison of SBSCD (Scaled JSD) against state-of-the-art static and contextual embedding methods across multiple datasets.

The results indicate that SBSCD (Scaled JSD) achieves the best average performance across all datasets. On a weighted average, it achieved a Spearman correlation of 0.514, significantly outperforming the best static vector baseline (0.452) and previous contextual methods (0.422).

Key Insights

  • Interpretability: Unlike vector distances, SBSCD provides a list of words that explain the shift. You can literally see the meaning of "graft" shifting from botanical terms to corruption-related terms.
  • Frequency Bias Mitigation: Raw divergence scores are heavily correlated with word frequency. The quantile scaling technique effectively ensures that semantic change detection is not dominated by false positives for low-frequency terms.
  • Efficiency: By storing only the top substitutes per token rather than high-dimensional floating-point vectors, the method is significantly more space-efficient for large-scale historical analysis.

Limitations and Future Work

Despite its success, the method's performance varies by language, likely due to the quality of available pretrained models for non-English languages like German and Swedish. Additionally, while storage-efficient, the initial inference step—running a massive corpus through a transformer—remains computationally intensive. Future research may focus on using more efficient or specialized historical language models to reduce this overhead.

Summary updated

BibTeX
@inproceedings{card2023substitution,
  author = {Dallas Card},
  title = {{Substitution-based Semantic Change Detection using Contextual Embeddings}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-short.52},
}
Figure