Parameter and Data Efficient Continual Pre-training for Robustness to Dialectal Variance in Arabic

Soumajyoti Sarkar, Kaixiang Lin, Sailik Sengupta, Leonard Lausen, Sheng Zha, Saab MansourarXiv 2022

Abstract

The use of multilingual language models for tasks in low and high-resource languages has been a success story in deep learning. In recent times, Arabic has been receiving widespread attention on account of its dialectal variance. While prior research studies have tried to adapt these multilingual models for dialectal variants of Arabic, it still remains a challenging problem owing to the lack of sufficient monolingual dialectal data and parallel translation data of such dialectal variants. It remains an open problem on whether the limited dialectical data can be used to improve the models trained in Arabic on its dialectal variants. First, we show that multilingual-BERT (mBERT) incrementally pretrained on Arabic monolingual data takes less training time and yields comparable accuracy when compared to our custom monolingual Arabic model and beat existing models (by an avg metric of +6.41). We then explore two continual pre-training methods -- (1) using small amounts of dialectical data for continual finetuning and (2) parallel Arabic to English data and a Translation Language Modeling loss function. We show that both approaches help improve performance on dialectal classification tasks (+4.64 avg. gain) when used on monolingual models.

Introduction: The Challenge of Arabic Diglossia

Arabic is a "diglossic" language, characterized by a sharp divide between Modern Standard Arabic (MSA)—used in formal writing, news, and education—and various regional dialects (e.g., Egyptian, Levantine, Maghrebi) used in daily speech and social media. For Natural Language Processing (NLP), this creates a significant hurdle: while high-quality training data is abundant for MSA, dialect-specific datasets are scarce and morphologically distinct. This paper investigates efficient methods to adapt existing models to these dialects without the prohibitive cost of training large-scale monolingual models from scratch.

Methodology

The research focuses on two pillars: parameter efficiency and data-efficient continual learning.

1. Model Truncation

To address memory and inference-time constraints, the researchers utilized 4-layer transformer architectures. They observed that truncating standard 12-layer BERT-Base models to the first 4 layers provided a significant reduction in parameters (roughly one-third) without substantial degradation in performance on target tasks.

2. Continual Pre-training Strategies

Three primary model variants were developed and compared:

  • m-B-Ar: A multilingual BERT (mBERT) model continually pre-trained on a large Arabic corpus.
  • B-Ar: A 4-layer BERT model trained from scratch on the same Arabic corpus.
  • t-B-Ar: A model trained from scratch utilizing a custom tokenizer optimized specifically for the morphological richness of Arabic.

3. Dialectal and Parallel Data Injection

The study explored the impact of adding small amounts of Egyptian Arabic data ([C2]) and parallel Arabic-to-English data ([C3]). For the parallel data, a Translation Language Modeling (TLM) loss was employed, which encourages the model to align cross-lingual meanings by predicting masked words in concatenated parallel sentence pairs.

Comparative Performance

The proposed 4-layer models were evaluated against established baselines, including AraBERT and the original mBERT, using the ALUE benchmark. This benchmark includes eight tasks, six of which contain dialectal data, such as Dialect Identification (MDD) and Irony Detection (FID).

Performance comparison of proposed 4-layer models against standard baselines on the ALUE benchmark.

As shown in the results, the custom models consistently outperformed existing public models. Notably, the t-B-Ar model, which utilized custom tokenization, achieved the highest overall average metric. Furthermore, the continually pre-trained m-B-Ar reached convergence in only 60% of the time required for the B-Ar model, demonstrating the efficiency of leveraging multilingual starting points.

Impact of Dialectal and Parallel Data

A key finding of the study was the sensitivity of monolingual models to small amounts of dialectal data compared to their multilingual counterparts.

Effect of incremental dialectal (C2) and parallel (C3) data on the performance of multilingual and monolingual models.

While m-B-Ar saw marginal gains from the additional data, the monolingual B-Ar model showed significant improvement. Adding just 102K sentences of Egyptian Arabic ([C2]) and parallel data ([C3]) boosted the B-Ar average performance from 68.99 to 73.14. This suggests that while multilingual models provide a fast start, monolingual architectures may be better suited for fine-grained dialectal adaptation when even small amounts of specific data are available.

Conclusion and Future Directions

This research demonstrates that parameter-efficient, 4-layer models can outperform larger baselines when properly adapted through continual pre-training. The study highlights the importance of custom tokenization for Arabic and the high value of even small dialectal datasets for monolingual model refinement. Future work will investigate whether these benefits scale to larger architectures and explore adversarial training to further improve robustness against the vast linguistic variance across the Arab world.

Summary updated

BibTeX
@misc{sarkar2022parameter,
  author = {Soumajyoti Sarkar and Kaixiang Lin and Sailik Sengupta and Leonard Lausen and Sheng Zha and Saab Mansour},
  title = {{Parameter and Data Efficient Continual Pre-training for Robustness to Dialectal Variance in Arabic}},
  year = {2022},
  eprint = {2211.03966},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.03966},
}
Figure