Abstract
Pre-trained language models (PLMs) often struggle with "long-tail" vocabulary—rare words that appear infrequently in training corpora. This paper introduces Dict-BERT, a framework that leverages external dictionary definitions to improve the representation of rare words. By dynamically appending definitions and employing two novel pre-training objectives—Word-level Mutual Information Maximization (MIM) and Sentence-level Definition Discrimination (DD)—Dict-BERT significantly enhances model performance on both general and domain-specific benchmarks.
Introduction: The Rare Word Problem
Modern NLP relies heavily on PLMs like BERT and RoBERTa. However, these models exhibit a distinct "frequency bias": they learn effectively from common words but produce "noisy" or poorly optimized embeddings for rare terms. This limitation is particularly evident when models encounter novel terms or specialized jargon. While previous attempts to inject external knowledge (e.g., knowledge graphs) have been made, they often suffer from "vector space inconsistency," where external data conflicts with the model's internal logic. Dict-BERT addresses this by treating dictionary definitions as a primary source of grounding during the pre-training phase.
Methodology
Dict-BERT integrates dictionary knowledge through a four-stage process:
- Dynamic Rare Word Selection: The model identifies the bottom 10% of words by frequency in the corpus as "rare."
- Input Augmentation: For every rare word in a sentence, its definition (sourced from Wiktionary) is appended to the end of the input sequence.
- Novel Pre-training Objectives:
- Word-level Mutual Information Maximization (MIM): Uses an InfoNCE loss to maximize shared information between the rare word's contextual representation and its formal definition.
- Sentence-level Definition Discrimination (DD): Trains the model to identify the correct definition for a rare word among randomly sampled "polluted" alternatives.
- Knowledge-visible Attention: A visibility matrix ensures that definition tokens only interact with the specific rare word they describe, preventing the original sentence's context from being diluted.
Experimental Results
The researchers evaluated Dict-BERT across the GLUE benchmark and eight specialized domain datasets spanning Biomedical, Computer Science, News, and E-commerce fields.
General and Domain Performance
Dict-BERT achieved a +1.15% average accuracy improvement over vanilla BERT on GLUE. Gains were most pronounced on smaller datasets like RTE, where rare word understanding is a critical bottleneck. In specialized domains, Dict-BERT outperformed standard Domain-Adaptive Pre-training (DAPT) by 0.5% to 0.7% F1, demonstrating its robustness in handling technical jargon.
Rare Word Probing
On the WNLaMPro benchmark, Dict-BERT improved Mean Reciprocal Rank (MRR) by 23.93% and Precision@3 by 28.30% compared to standard BERT. This confirms that the model develops a much deeper understanding of rare word semantics.
Discussion: Key Insights
- Grounding in Standardized Meaning: Formal definitions provide a "ground truth" that stabilizes embeddings for words that lack sufficient contextual variety in the training data.
- Surgical Information Injection: The Knowledge-visible Attention mechanism is vital. It allows the dictionary to act as a targeted lookup table, ensuring the model isn't confused by the additional text.
- Parameter Efficiency: By offloading the "meaning" of rare words to the dictionary, the model may free up capacity to learn more complex linguistic interactions.
Conclusion and Future Work
Dict-BERT effectively bridges the gap between contextual learning and formal lexical knowledge. However, challenges remain regarding polysemy—currently, the model defaults to the primary dictionary entry, which may not match the specific sense used in context. Future work will explore more sophisticated negative sampling for the discrimination task and methods to reduce the inference overhead caused by increased sequence lengths.
Summary updated