A Self-Supervised Integration Method of Pretrained Language Models and Word Definitions

Hwiyeol JoACL 2023

Abstract

Pretrained Language Models (PLMs) like BERT have revolutionized Natural Language Processing by mastering contextual nuances through distributional semantics. However, they often fail to capture the stable, explicit meanings found in lexical semantics—the formal definitions provided by dictionaries. This paper introduces DefBERT, a self-supervised fine-tuning framework designed to align a model's internal word representations with human-written definitions and example sentences. By bridging the gap between contextual usage and definitional knowledge, DefBERT significantly enhances performance on word similarity, sense disambiguation, and the representation of neologisms.

Introduction: The "Love" Problem

In standard PLMs, word meanings are learned by observing surrounding context. While effective for many tasks, this approach creates a disconnect from formal lexical semantics. The authors identified a startling discrepancy: the internal vector representation BERT holds for a word like "love" is mathematically closer to the definition of a random word like "number" than to its own dictionary definition. This suggests that PLMs lack a grounded understanding of core semantic identities, which limits their effectiveness when dealing with rare words, fine-grained sense distinctions, or newly coined terms (neologisms).

Methodology: The DefBERT Framework

To address this, the authors propose DefBERT, which utilizes the inherent structure of dictionaries (Word $\rightarrow$ Definition $\rightarrow$ Example) to inject lexical knowledge into the model without requiring manual labeling. The architecture processes three distinct inputs to generate aligned embeddings: the target word, its definition, and an example sentence using that word in the correct sense.

The DefBERT architecture for aligning word (W), definition (D), and example (E) representations.

The training objective minimizes the distance between these representations using three primary self-supervised losses:

  1. Word-Definition ($W-D$): Aligns the embedding of a single word with its formal dictionary definition.
  2. Definition-Example ($D-E$): Aligns the definition embedding with the representation of an example sentence where the word is used in that specific sense.
  3. Calibration Losses: To prevent the model from losing its general linguistic capabilities, additional losses align specific word tokens with the model's global [CLS] representation and ensure consistency between the word and its usage in context.

Analysis of Internal Representations

A key finding of this research is the phenomenon of Upper Layer Drift. In vanilla BERT, as information passes through deeper layers, the model focuses increasingly on specific contextual features of the input sentence. Consequently, the distance between a word and its stable dictionary definition actually increases in the deeper layers of the network.

Average distance between word and definition embeddings across BERT hidden layers, illustrating the "upper layer drift" in standard models.

DefBERT corrects this drift by enforcing alignment across these layers, ensuring that the model retains a strong link to the word's core semantic definition even as it processes complex contextual information.

Experimental Evaluation and Results

The authors evaluated DefBERT using the Oxford+ dataset, a large-scale resource containing over 30,000 words and 1.1 million example sentences. They also introduced two new benchmarks: DefRank (ranking the correct definition for a word) and SenseRank (distinguishing between different meanings of the same word in context).

  • Word Similarity: On standard similarity tasks (e.g., WordSim, SimLex-999), DefBERT achieved a Spearman correlation of 57.1, a massive improvement over vanilla BERT's 9.7.
  • Definition Ranking: In the DefRank task, DefBERT correctly identified the proper definition out of four candidates with 84.67% accuracy, compared to just 32.41% for the base model.
  • Sense Disambiguation: On SenseRank, DefBERT reached 97.27% accuracy, nearly doubling the performance of the baseline.
  • Neologisms: The model showed remarkable strength in representing words it had never seen during pretraining, such as "ohana." By "reading" the definition, DefBERT can generate a high-quality vector for new terms, a task where standard PLMs typically fail.

Conclusion and Future Work

DefBERT demonstrates that integrating explicit lexical knowledge into PLMs provides a significant boost to semantic understanding. While the model excels at dictionary-based tasks and word similarity, the authors note a potential for "catastrophic forgetting" of general-purpose reasoning tasks (like those in the GLUE benchmark). Future research will focus on balancing definition injection with general linguistic performance and extending the method to models with different tokenization schemes, such as RoBERTa.

Summary updated

BibTeX
@inproceedings{jo2023self,
  author = {Hwiyeol Jo},
  title = {{A Self-Supervised Integration Method of Pretrained Language Models and Word Definitions}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.2},
}
Figure