[Paper Review] DziriBERT: a Pre-trained Language Model for the Algerian Dialect
DziriBERT is a BERT-based language model pre-trained on 1.1 million Algerian dialect tweets to address the lack of NLP resources for this low-resource, Roman-script-using dialect. Despite training on only 150 MB of data—significantly less than other models—it achieves state-of-the-art performance on sentiment, emotion, and topic classification tasks, especially in Roman script (Arabizi), outperforming multilingual and Arabic-specific models like XLM-R and MARBERT.
Pre-trained transformers are now the de facto models in Natural Language Processing given their state-of-the-art results in many tasks and languages. However, most of the current models have been trained on languages for which large text resources are already available (such as English, French, Arabic, etc.). Therefore, there are still a number of low-resource languages that need more attention from the community. In this paper, we study the Algerian dialect which has several specificities that make the use of Arabic or multilingual models inappropriate. To address this issue, we collected more than one million Algerian tweets, and pre-trained the first Algerian language model: DziriBERT. When compared with existing models, DziriBERT achieves better results, especially when dealing with the Roman script. The obtained results show that pre-training a dedicated model on a small dataset (150 MB) can outperform existing models that have been trained on much more data (hundreds of GB). Finally, our model is publicly available to the community.
Motivation & Objective
- To address the lack of NLP resources for the Algerian dialect, a low-resource language with significant sociolinguistic presence in social media.
- To overcome the limitations of existing multilingual and Arabic-specific models, which are ill-suited for the Algerian dialect’s unique features such as Roman script (Arabizi) and mixed-script writing.
- To demonstrate that high performance in low-resource NLP can be achieved with smaller, domain-specific pre-training data.
- To provide a publicly available, dedicated language model for the Algerian dialect to support downstream NLP applications.
Proposed method
- Collected 1.2 million tweets from Algerian cities using Twitter API, filtering for dialectal expressions and multilingual scripts.
- Pre-processed data by anonymizing user mentions, emails, and URLs, resulting in 1.1 million unique tweets (150 MB) for training and evaluation.
- Trained a WordPiece tokenizer on the training data with a 50k vocabulary size to handle morphological and orthographic variations.
- Fine-tuned a BERT-base architecture (12 layers, 768 hidden dimensions, 12 attention heads) using Masked Language Modeling with a 25% masking probability, omitting the Next Sentence Prediction task.
- Trained the model on an AWS g4dn.2xlarge instance with a T4 GPU for 50 epochs (~800k steps), achieving convergence in 10 days.
- Released the final model on Hugging Face Transformers Hub for public access and future fine-tuning on downstream tasks.
Experimental results
Research questions
- RQ1Can a BERT-based model pre-trained on a small, domain-specific dataset (150 MB) outperform larger multilingual and Arabic-specific models on the Algerian dialect?
- RQ2How does the performance of pre-trained models differ when handling the Algerian dialect written in Roman script (Arabizi) versus Arabic script?
- RQ3To what extent does a dedicated model for the Algerian dialect improve downstream NLP tasks compared to generic multilingual or Arabic models?
- RQ4Does reducing vocabulary size and model parameters improve deployment efficiency without sacrificing performance on low-resource dialects?
Key findings
- DziriBERT achieved state-of-the-art results on the Twifil dataset (Arabic script), with 81.1% F1 score on sentiment classification, outperforming mBERT, XLM-R, and AraBERT.
- On the Narabizi dataset (Roman script), DziriBERT achieved 63.5% accuracy in sentiment classification and 62.8% in topic classification—significantly outperforming MARBERT (+5.5% and +13.8% respectively).
- Despite being trained on only 150 MB of data, DziriBERT surpassed MARBERT, which was pre-trained on 128 GB of text, demonstrating that data efficiency is possible even in low-resource settings.
- DziriBERT has a smaller model footprint (498 MB) and fewer parameters (124 million) than most baselines due to its 50k vocabulary, making it more deployable on public cloud platforms.
- The model’s performance gap on Roman script highlights its superiority in handling non-standard orthographies, a key challenge for existing multilingual models.
- Error analysis revealed that DziriBERT struggles more than MARBERT on non-Algerian Arabic content, indicating that its strength lies in dialect-specific generalization rather than broad multilingualism.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.