BERTje: A Dutch BERT Model

Wietse de Vries, Andreas van Cranenburgh, Arianna Bisazza, Tommaso Caselli, Gertjan van Noord, Malvina NissimarXiv 2019

Introduction

The introduction of BERT (Bidirectional Encoder Representations from Transformers) revolutionized Natural Language Processing (NLP), primarily for English. For other languages like Dutch, researchers often relied on multilingual models such as Multilingual BERT (mBERT), which is trained on over 100 languages simultaneously. However, mBERT has notable drawbacks: it is trained exclusively on Wikipedia's encyclopedic style and its parameters are shared across many languages, diluting its capacity for any single language. BERTje was developed to address these issues, providing a high-capacity, monolingual Dutch transformer model trained on a massive, diverse dataset.

Methodology

BERTje utilizes the BERT-base architecture, featuring 12 transformer blocks, 768 hidden units, and 12 attention heads. The authors incorporated several modern refinements to the original pre-training objective to improve performance:

  • Sentence Order Prediction (SOP): Replacing the Next Sentence Prediction (NSP) task, SOP requires the model to distinguish between consecutive sentences and their reversed order, forcing it to learn finer-grained coherence.
  • Whole-Word Masking: During Masked Language Modeling (MLM), entire words are masked instead of individual sub-word tokens, preventing the model from exploiting local sub-word cues to guess missing pieces.
  • Extended Training: The model was trained for 1 million iterations, with performance monitored at an 850k-iteration checkpoint to track the learning curve of different linguistic features.

Datasets

The pre-training corpus for BERTje is a massive 2.4 billion token (12GB) collection, far more diverse than the Wikipedia-only data used for mBERT. It includes:

  • Books: 4.4GB of contemporary and historical fiction.
  • News: 4.0GB from the TwNC corpus and recent web news.
  • SoNaR-500: 2.2GB from a multi-genre reference corpus.
  • Wikipedia: 1.5GB from an October 2019 dump.

Evaluation and Results

BERTje was evaluated against mBERT across several Dutch NLP benchmarks, consistently demonstrating superior performance across word-level and sentence-level tasks.

Named Entity Recognition (NER)

On the CoNLL-2002 test set, BERTje achieved an F1 score of 88.3, significantly outperforming mBERT's 80.7. This demonstrates the model's strong grasp of semantic entities within the Dutch language.

Table 1: Named Entity Recognition (NER) performance on CoNLL-2002 and SoNaR-1 datasets.

Part-of-Speech (POS) Tagging

In POS tagging tasks, BERTje reached 96.3% accuracy on the UD-LassySmall dataset, compared to 92.5% for mBERT. Performance on these lower-level linguistic tasks tended to plateau earlier in the training process compared to higher-level semantic tasks.

Table 2: Part-of-Speech (POS) tagging performance on UD-LassySmall and SoNaR-1 datasets.

Sentiment Analysis

On the 110k Dutch Book Reviews Dataset, BERTje achieved 93.0% accuracy, beating mBERT (89.1%) and nearly matching the specialized ULMFiT model (93.8%) without requiring task-specific hyperparameter tuning.

Discussion

The results confirm that a dedicated monolingual model outperforms a multilingual one of the same size. The authors observed a "hierarchy of learning," where lower-level linguistic features (like POS tags) are mastered early, while semantically complex tasks (like NER) continue to improve with more training iterations. Additionally, prioritizing high-quality, grammatically correct data over noisy social media text likely contributed to BERTje's strong benchmark performance.

Conclusion

BERTje establishes a new state-of-the-art for Dutch NLP, demonstrating the value of language-specific pre-training on diverse datasets. Future research will focus on probing the model's internal representations and its performance on tasks requiring deep inter-sentence understanding.

Model Availability: The pre-trained BERTje model is available at https://github.com/wietsedv/bertje.

Summary updated

BibTeX
@misc{vries2019bertje,
  author = {Wietse de Vries and Andreas van Cranenburgh and Arianna Bisazza and Tommaso Caselli and Gertjan van Noord and Malvina Nissim},
  title = {{BERTje: A Dutch BERT Model}},
  year = {2019},
  eprint = {1912.09582},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.09582},
}
Figure