Reconsidering Token Embeddings with the Definitions for Pre-trained Language Models

Ying Zhang, Dongyuan Li, Manabu Okumura

Abstract

Pre-trained Language Models (PLMs) often struggle with rare token representations, which lack semantic depth despite the models' overall robustness against global representation degeneration. We present DefinitionEMB, a framework that leverages dictionary definitions to reconstruct high-quality embeddings for rare tokens. Our results demonstrate that while encoder-based models maintain global geometric stability during fine-tuning, local semantic "hollowness" in rare tokens persists. DefinitionEMB addresses this by re-anchoring rare tokens using external knowledge, leading to significant performance gains in summarization and linguistic tasks.

Introduction

In Natural Language Processing, word embeddings must be "isotropic"—uniformly spread in vector space—to capture distinct meanings effectively. However, models often suffer from representation degeneration, where embeddings collapse into a narrow, anisotropic "cone." In this state, words become difficult to distinguish, and rare tokens often lack the semantic depth needed for complex tasks. While previous work suggested that all models eventually degenerate, this paper investigates whether that holds true for modern encoder-based PLMs during fine-tuning.

Methodology: DefinitionEMB

The authors introduce DefinitionEMB, an architecture-agnostic framework designed to "re-anchor" token embeddings using external knowledge.

  1. The Mimicking Approach: The model uses a denoising autoencoder that takes a dictionary definition (from Wiktionary) as input and attempts to reconstruct the embedding of the target word.
  2. Training and Denoising: The model is trained to match the embeddings of high-frequency tokens. A "cloze exercise" style corruption is used during training to force the model to understand core meanings rather than just memorizing strings.
  3. Inference: Before fine-tuning for a specific task (like summarization), the original embeddings for rare tokens are replaced with the high-quality embeddings generated by DefinitionEMB.

Key Insights and Geometric Analysis

Global Robustness vs. Local Degeneration

A critical finding of this research is that encoder-based PLMs (like BART) are surprisingly robust against global "cone" degeneration during fine-tuning. As shown in the comparison between models trained from scratch and pre-trained models, the global geometric distribution of pre-trained models remains relatively stable.

Figure 3: Comparison of embedding distributions for models with and without pre-training. Pre-trained models (c, d) avoid the "V-shaped" degeneration seen in models trained from scratch (b).

However, this global stability masks a "local" problem: rare tokens still cluster together regardless of their actual meaning, making them semantically "hollow."

The Importance of Semantic Direction

The researchers found that simply improving isotropy (the spread of vectors) does not necessarily improve performance. Post-processing baselines like DelDirection, which force embeddings to be more spread out, actually hurt model performance. This suggests that the specific direction of the vectors—their semantic alignment—is more important than their global spatial distribution.

Figure 6: Visualization of the effect of the DelDirection baseline on token embeddings. Simply increasing isotropy does not preserve the semantic relationships between tokens.

Experimental Results

  • Summarization: On the CNN/DailyMail dataset, BART with DefinitionEMB saw a significant boost in ROUGE-L scores. For sentences with a high proportion of rare tokens, the improvement exceeded 1.25 points over standard BART.
  • Linguistic Accuracy: The method improved performance across the GLUE benchmark, particularly in tasks requiring precise semantic understanding like paraphrase detection (MRPC).
  • Semantic Probing: In tests identifying if a rare token represented a number, BART+DefinitionEMB achieved 98.3% accuracy, significantly outperforming both the baseline (96.4%) and isotropy-fixing methods (84.8%).

Conclusion

DefinitionEMB demonstrates that the "rare word problem" in PLMs is not a matter of global geometry but of local semantic accuracy. By using dictionary definitions as anchors, researchers can inject external knowledge into the embedding layer, significantly enhancing the model's ability to handle infrequent but semantically important tokens. Future work will explore applying these techniques to decoder-only architectures like GPT-4.

Summary updated

Abstract

Learning token embeddings based on token co-occurrence statistics has proven effective for both pre-training and fine-tuning in natural language processing. However, recent studies have pointed out that the distribution of learned embeddings degenerates into anisotropy (i.e., non-uniform distribution), and even pre-trained language models (PLMs) suffer from a loss of semantics-related information in embeddings for low-frequency tokens. This study first analyzes the fine-tuning dynamics of encoder-based PLMs and demonstrates their robustness against degeneration. On the basis of this analysis, we propose DefinitionEMB, a method that utilizes definitions to re-construct isotropically distributed and semantics-related token embeddings for encoder-based PLMs while maintaining original robustness during fine-tuning. Our experiments demonstrate the effectiveness of leveraging definitions from Wiktionary to re-construct such embeddings for two encoder-based PLMs: RoBERTa-base and BART-large. Furthermore, the re-constructed embeddings for low-frequency tokens improve the performance of these models across various GLUE and four text summarization datasets.
BibTeX
@misc{zhang2024reconsidering,
  author = {Ying Zhang and Dongyuan Li and Manabu Okumura},
  title = {{Reconsidering Token Embeddings with the Definitions for Pre-trained Language Models}},
  year = {2024},
  eprint = {2408.01308},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.01308},
}
Figure