Skip to main content
QUICK REVIEW

[Paper Review] Dict-BERT: Enhancing Language Model Pre-training with Dictionary

Wenhao Yu, Chenguang Zhu|arXiv (Cornell University)|Oct 13, 2021
Topic ModelingComputer Science17 citations
TL;DR

Dict-BERT enhances pre-trained language models by integrating dictionary definitions of rare words during pre-training to improve semantic representations. It introduces two novel self-supervised tasks—word-level contrastive learning and sentence-level definition discrimination—resulting in state-of-the-art performance on GLUE and domain-specific benchmarks, with a +1.15% average accuracy gain over BERT and significant gains in rare word understanding.

ABSTRACT

Pre-trained language models (PLMs) aim to learn universal language representations by conducting self-supervised training tasks on large-scale corpora. Since PLMs capture word semantics in different contexts, the quality of word representations highly depends on word frequency, which usually follows a heavy-tailed distributions in the pre-training corpus. Therefore, the embeddings of rare words on the tail are usually poorly optimized. In this work, we focus on enhancing language model pre-training by leveraging definitions of the rare words in dictionaries (e.g., Wiktionary). To incorporate a rare word definition as a part of input, we fetch its definition from the dictionary and append it to the end of the input text sequence. In addition to training with the masked language modeling objective, we propose two novel self-supervised pre-training tasks on word and sentence-level alignment between input text sequence and rare word definitions to enhance language modeling representation with dictionary. We evaluate the proposed Dict-BERT model on the language understanding benchmark GLUE and eight specialized domain benchmark datasets. Extensive experiments demonstrate that Dict-BERT can significantly improve the understanding of rare words and boost model performance on various NLP downstream tasks.

Motivation & Objective

  • To address the poor optimization of rare word embeddings in pre-trained language models due to their low frequency in training corpora.
  • To enhance language model pre-training by incorporating external knowledge from dictionary definitions of rare words.
  • To design self-supervised pre-training objectives that align input text with rare word definitions at both word and sentence levels.
  • To ensure that dictionary definitions do not distort original sentence semantics during fine-tuning through a knowledge attention mechanism.
  • To evaluate the effectiveness of the approach on general NLP benchmarks and specialized domain datasets.

Proposed method

  • Appends the dictionary definition of a rare word to the end of the input text sequence during pre-training.
  • Introduces a word-level contrastive objective to maximize mutual information between the representation of a rare word and its definition.
  • Proposes a sentence-level discriminative objective to distinguish between correct and randomly polluted definitions.
  • Applies a knowledge attention mechanism during fine-tuning that restricts attention to only the corresponding rare word and its definition.
  • Uses Wiktionary to retrieve definitions for rare words identified via word frequency thresholds.
  • Employs a two-stage training process: pre-training with augmented input and fine-tuning with knowledge-aware attention.

Experimental results

Research questions

  • RQ1Can incorporating dictionary definitions of rare words improve the semantic representation of rare words in pre-trained language models?
  • RQ2Does self-supervised alignment between input text and word definitions enhance downstream NLP performance?
  • RQ3How does the use of knowledge attention during fine-tuning affect model performance compared to full attention?
  • RQ4To what extent does the method improve performance on rare word understanding tasks compared to vanilla BERT?
  • RQ5Does the approach generalize across diverse domains, including specialized and low-resource settings?

Key findings

  • Dict-BERT achieves a +1.15% average accuracy gain over vanilla BERT on the GLUE benchmark when pre-trained from scratch.
  • On eight specialized domain datasets under domain-adaptive pre-training, Dict-BERT improves F1 scores by +0.5% to +0.7% over BERT-DAPT and RoBERTa-DAPT.
  • On the WNLaMPro benchmark, Dict-BERT improves MRR by +23.93% and P@3 by +28.30% for rare words (0,10) compared to vanilla BERT.
  • The knowledge attention mechanism consistently outperforms full attention, preventing semantic distortion from appended definitions.
  • Performance is most stable when 10% of the rarest words are selected as targets for definition injection, though results are robust across 5%, 10%, and 15% ratios.
  • Ablation studies confirm that both the contrastive and discriminative objectives contribute significantly to performance gains, with the full model outperforming variants without either component.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.