RobBERT: a Dutch RoBERTa-based Language Model

Pieter Delobelle, Thomas Winters, Bettina Berendt

Abstract

Pre-trained language models have been dominating the field of natural language processing in recent years, and have led to significant performance gains for various complex natural language tasks. One of the most prominent pre-trained language models is BERT, which was released as an English as well as a multilingual version. Although multilingual BERT performs well on many tasks, recent studies show that BERT models trained on a single language significantly outperform the multilingual version. Training a Dutch BERT model thus has a lot of potential for a wide range of Dutch NLP tasks. While previous approaches have used earlier implementations of BERT to train a Dutch version of BERT, we used RoBERTa, a robustly optimized BERT approach, to train a Dutch language model called RobBERT. We measured its performance on various tasks as well as the importance of the fine-tuning dataset size. We also evaluated the importance of language-specific tokenizers and the model’s fairness. We found that RobBERT improves state-of-the-art results for various tasks, and especially significantly outperforms other models when dealing with smaller datasets. These results indicate that it is a powerful pre-trained model for a large variety of Dutch language tasks. The pre-trained and fine-tuned models are publicly available to support further downstream Dutch NLP applications.

Introduction

The advent of Transformer-based architectures like BERT and RoBERTa has fundamentally shifted the landscape of Natural Language Processing (NLP). While these models have achieved remarkable success in English, their application to other languages often relies on multilingual variants like mBERT. However, research consistently demonstrates that monolingual models, tailored to the specificities of a single language, tend to outperform their multilingual counterparts.

RobBERT addresses this for the Dutch language. By applying the "robustly optimized" RoBERTa training regime to a massive Dutch corpus, RobBERT provides a state-of-the-art foundation for Dutch NLP tasks, overcoming the limitations of previous Dutch models that relied on smaller datasets or older training methodologies.

Methodology

RobBERT utilizes the RoBERTa architecture, which enhances the original BERT framework by removing the Next Sentence Prediction (NSP) objective and employing larger batch sizes and more extensive training data.

Model Architecture and Training

The model consists of 12 self-attention layers with 12 heads, totaling approximately 117 million parameters. It was trained exclusively on the Masked Language Modeling (MLM) task. Training was conducted on a high-performance cluster using up to 80 Nvidia P100 GPUs over three days.

Tokenization

Two versions of the model were developed to test the impact of tokenization:

  • RobBERT v1: Utilized the original RoBERTa tokenizer.
  • RobBERT v2: Employed a custom Byte-Pair Encoding (BPE) tokenizer trained specifically on Dutch text to better capture the language's unique linguistic features.

Datasets

The model was pre-trained on the Dutch portion of the OSCAR corpus, a massive 39GB dataset containing 6.6 billion words derived from Common Crawl. This dataset is significantly larger than those used for previous Dutch models like BERTje (12GB) or BERT-NL (2.2GB).

Evaluation was performed across several benchmarks, including the Dutch Book Reviews Dataset (DBRD) for sentiment analysis, a custom "die/dat" disambiguation task based on Europarl, Lassy UD for Part-of-Speech (POS) tagging, and CoNLL-2002 for Named Entity Recognition (NER).

Key Insights and Results

State-of-the-Art Performance

RobBERT v2 established new benchmarks for Dutch NLP. In sentiment analysis on the DBRD dataset, it achieved 95.1% accuracy, surpassing both BERTje (93.0%) and the previous ULMFiT state-of-the-art (93.8%). In the "die/dat" disambiguation task, it reached a near-perfect 98.75% accuracy in a zero-shot setting, demonstrating that the model internalizes complex Dutch grammatical structures during pre-training.

Data Efficiency

A critical advantage of RobBERT v2 is its performance in low-resource scenarios. Unlike many large models that require vast amounts of fine-tuning data to reach peak performance, RobBERT v2 maintains high accuracy even with very small datasets.

Accuracy on POS tagging as a function of training size, showing RobBERT v2's superior performance with limited data.

As shown in the figure above, when fine-tuned on as few as 100 to 1,000 sequences, RobBERT v2 significantly outperforms other models like mBERT and BERTje. This makes it exceptionally useful for specialized Dutch NLP applications where labeled data is scarce.

The Importance of Language-Specific Tokenization

The transition from v1 to v2 highlighted the importance of tokenization. By using a Dutch-specific BPE tokenizer, the error rate on the "die/dat" task was halved compared to v1. This suggests that a model's ability to represent language-specific subwords is vital for capturing linguistic nuances.

Fairness and Bias

As with many models trained on large-scale web data, RobBERT reflects societal biases present in its training corpus. The researchers conducted a fairness evaluation to determine how the model associates gender with various professions across different sentence templates.

Gender bias evaluation across different sentence templates, showing the model's association of certain professions with specific genders.

The evaluation revealed that RobBERT often associates specific occupations with gendered pronouns (e.g., associating "nurse" with "she" or "manager" with "he"). These findings underscore the need for ongoing research into bias mitigation strategies for monolingual models.

Conclusion and Future Work

RobBERT represents a significant step forward for Dutch NLP, providing a robust, high-performance model that excels even in data-constrained environments. Future work will focus on addressing document-level context, exploring morpheme-based tokenizers for compound words, and implementing active debiasing techniques. The pre-trained weights for RobBERT are publicly available to support further downstream Dutch NLP applications.

Summary updated

BibTeX
@inproceedings{delobelle2020robbert,
  author = {Pieter Delobelle and Thomas Winters and Bettina Berendt},
  title = {{RobBERT: a Dutch RoBERTa-based Language Model}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  url = {https://openreview.net/forum?id=dpOPOT_D8SP},
}
Figure