CMV-BERT: Contrastive multi-vocab pretraining of BERT

Wei Zhu, Daniel Cheung · DOI

TL;DR

This paper introduces CMV-BERT, a novel pre-training method for language models that combines contrastive learning with multiple vocabularies. By leveraging both fine-grained and coarse-grained tokenizations of sentences, CMV-BERT captures richer contextual information, leading to improved performance on downstream NLP tasks.

What Problem Does This Paper Address?

Pre-trained language models (PLMs) like BERT have revolutionized Natural Language Processing (NLP). However, existing pre-training methods, particularly for sentence-level tasks, face challenges and have room for improvement. The authors observe that contrastive learning, a successful technique in computer vision for learning representations by distinguishing similar from dissimilar examples, has not been extensively explored in the context of language model pre-training. They hypothesize that by creating different "views" of a sentence and training the model to align these views, they can enhance its understanding of language.

Methods

CMV-BERT introduces two key innovations to BERT's pre-training:

  • Contrastive Learning: Inspired by SimSiam (Chen & He, 2020), the framework uses a stop-gradient strategy to learn representations. The core idea is to present the model with two different views of the same sentence and train it to maximize the similarity between their encoded representations while minimizing similarity with other sentences.
  • Multiple Vocabularies: The paper utilizes two distinct vocabularies for tokenizing a sentence:
  • A fine-grained vocabulary (character-level in their experiments).
  • A coarse-grained vocabulary (word-level in their experiments). These two tokenizations create different perspectives of the same input sentence.

The CMV-BERT architecture shares an encoder across both branches but uses separate pooling layers. During pre-training, both tokenizations are used, and the contrastive objective is applied. For fine-tuning on downstream tasks, only one of the vocabularies is used, making it compatible with standard BERT fine-tuning procedures. This approach is designed to be modular and can be combined with other pre-training tasks like Masked Language Modeling (MLM).

Datasets

  • Pre-training Corpus: Chinese Wikipedia.
  • Downstream Tasks:
    • Text Classification: Book review (book_review) from Douban.
  • Sentence Pair Classification: XNLI (xnli) and LCQMC (lcqmc).
  • Named Entity Recognition (NER): CCKS NER (ccks) from medical records.

Key Insights and Ideas

  • Contrastive Learning for Language: The paper successfully demonstrates that contrastive learning, a technique proven effective in vision, can be beneficially applied to pre-train language models.
  • Multi-Vocabulary Synergy: Using multiple vocabularies (fine-grained and coarse-grained) provides complementary views of a sentence, leading to richer contextual understanding than a single vocabulary alone.
  • Fine-grained for Token-Level Tasks: The experiments suggest that fine-grained vocabularies are particularly advantageous for token-level tasks like NER.

Key Results

The experimental results presented in Table 1 show that CMV-BERT consistently outperforms the baseline ALBERT model across various downstream tasks.

  • CMV-BERT with a fine-grained vocabulary achieves an accuracy of 80.05% on the book review task, compared to ALBERT's 78.53%.
  • On the LCQMC task, CMV-BERT with a coarse-grained vocabulary reaches 81.04% accuracy, outperforming ALBERT's 79.27%.
  • For the XNLI task, CMV-BERT with a fine-grained vocabulary achieves 60.86% accuracy, while ALBERT achieves 59.71%.
  • On the CCKS NER task, CMV-BERT with a coarse-grained vocabulary achieves an exact F1 score of 87.16%, compared to ALBERT's 83.96%.

These results indicate that CMV-BERT improves PLMs' downstream performance on both sentence-level and token-level tasks.

Limitations and Future Work

  • Limitations: The paper does not explicitly detail limitations. However, the reliance on specific vocabulary choices and the computational cost of contrastive learning could be implicit limitations.
  • Future Work: The authors suggest that their proposed CMV objective is off-the-shelf and can be easily combined with other pre-training tasks, implying future work could explore such combinations. They also highlight the potential for further exploration of different vocabulary granularities and their impact on various NLP tasks.

Summary updated

BibTeX
@misc{zhu2020cmv,
  author = {Wei Zhu and Daniel Cheung},
  title = {{CMV-BERT: Contrastive multi-vocab pretraining of BERT}},
  year = {2020},
  eprint = {2012.14763},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.14763},
}
Figure