Skip to main content
QUICK REVIEW

[Paper Review] Pretraining without Wordpieces: Learning Over a Vocabulary of Millions of Words

Zhangyin Feng, Duyu Tang|arXiv (Cornell University)|Feb 24, 2022
Natural Language Processing TechniquesComputer Science4 citations
TL;DR

This paper proposes WordBERT, a BERT-style model trained over a vocabulary of whole words instead of subword units (wordpieces), using a sampling-based training strategy to handle large vocabularies. It achieves significant gains on cloze tests and machine reading comprehension, consistently outperforms BERT on POS tagging, chunking, and NER, and shows strong gains on Chinese NLP tasks, with comparable inference speed to BERT despite larger vocabulary size.

ABSTRACT

The standard BERT adopts subword-based tokenization, which may break a word into two or more wordpieces (e.g., converting "lossless" to "loss" and "less"). This will bring inconvenience in following situations: (1) what is the best way to obtain the contextual vector of a word that is divided into multiple wordpieces? (2) how to predict a word via cloze test without knowing the number of wordpieces in advance? In this work, we explore the possibility of developing BERT-style pretrained model over a vocabulary of words instead of wordpieces. We call such word-level BERT model as WordBERT. We train models with different vocabulary sizes, initialization configurations and languages. Results show that, compared to standard wordpiece-based BERT, WordBERT makes significant improvements on cloze test and machine reading comprehension. On many other natural language understanding tasks, including POS tagging, chunking and NER, WordBERT consistently performs better than BERT. Model analysis indicates that the major advantage of WordBERT over BERT lies in the understanding for low-frequency words and rare words. Furthermore, since the pipeline is language-independent, we train WordBERT for Chinese language and obtain significant gains on five natural language understanding datasets. Lastly, the analyse on inference speed illustrates WordBERT has comparable time cost to BERT in natural language understanding tasks.

Motivation & Objective

  • To address the limitations of subword tokenization in BERT, such as fragmented word representations and difficulty in predicting multi-word tokens via cloze tasks.
  • To explore whether training a BERT-style model directly over a large vocabulary of whole words improves contextual representation learning.
  • To evaluate the performance of word-level pretraining across multiple NLP tasks and languages, including English and Chinese.
  • To analyze whether WordBERT better captures representations for low-frequency and rare words compared to BERT.
  • To demonstrate that word-level pretraining is feasible and efficient at scale, even with vocabularies of up to 1 million words.

Proposed method

  • Train a BERT-style model using a word-level vocabulary instead of subword units, eliminating wordpiece tokenization.
  • Adopt a sampling-based training strategy to reduce computational cost during pretraining, updating only a subset of word embeddings per batch.
  • Use a standard Transformer architecture with masked language modeling and next sentence prediction objectives, adapted for whole-word inputs.
  • Experiment with different vocabulary sizes (500K, 1M) and initialization strategies, including pre-trained GloVe embeddings.
  • Train a dedicated Chinese WordBERT model using a large Chinese word vocabulary to evaluate cross-lingual effectiveness.
  • Use dictionary lookup for word embedding inference, ensuring minimal performance overhead despite large vocabulary size.

Experimental results

Research questions

  • RQ1Can a BERT-style model trained over a vocabulary of whole words outperform standard subword-based BERT on downstream NLP tasks?
  • RQ2Does word-level pretraining improve the model's ability to predict compound or rare words in cloze-style tasks?
  • RQ3How does WordBERT perform on low-frequency and rare words compared to BERT, especially in zero-shot probing scenarios?
  • RQ4Is the word-level pretraining approach scalable and efficient across different languages, such as English and Chinese?
  • RQ5Does the larger vocabulary size of WordBERT lead to increased inference time, or is it comparable to BERT?

Key findings

  • WordBERT achieves significant improvements on cloze tests and machine reading comprehension, outperforming BERT by a large margin.
  • On POS tagging, chunking, and NER, WordBERT consistently achieves higher F1 scores than BERT across multiple datasets.
  • Probing analysis shows WordBERT generates more diverse and meaningful predictions, especially for rare and low-frequency words, while BERT tends to produce common words or subwords.
  • The Chinese WordBERT model achieves substantial gains on the CLUE benchmark, demonstrating the effectiveness of the approach in low-resource and morphologically complex languages.
  • Despite having up to 768 million word embedding parameters, WordBERT maintains comparable inference speed to BERT due to efficient dictionary-based lookup and shorter input sequences.
  • The sampling-based training strategy effectively reduces computational cost during pretraining, enabling training on large word-level vocabularies without prohibitive overhead.

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.