Introduction
Researchers from Huawei have introduced JABER and SABER (Junior and Senior Arabic BERt), two new state-of-the-art language models specifically optimized for the Arabic language. While multilingual models like mBERT are versatile, they often lag behind language-specific models in monolingual settings. Arabic, with its complex morphology and diverse dialects, is a prime candidate for a dedicated model. This paper addresses the "under-trained" nature of existing models and the lack of standardized evaluation in Arabic NLP by providing a rigorous comparison and a refined pre-training recipe.
Methodology
The authors introduce two model sizes: JABER (Junior), a 12-layer base model, and SABER (Senior), a 24-layer large model. Their approach deviates from standard Arabic BERTs in three key ways: BBPE tokenization, aggressive data cleaning, and whole word masking.
- BBPE Tokenization: Instead of standard WordPiece, they use Byte-level Byte Pair Encoding (BBPE). This treats text as a sequence of bytes, effectively eliminating the "out-of-vocabulary" (OOV) problem common in Arabic's rich vocabulary.
- Aggressive Data Cleaning: The team filtered a 514GB corpus down to 115GB (a 78% reduction) using in-house heuristics to strip away gibberish and near-duplicate sentences.
- Whole Word Masking: During pre-training, the model masks entire words rather than individual sub-token fragments, forcing the model to learn better linguistic context.
Datasets and Evaluation
The 115GB cleaned corpus was sourced from Common Crawl, news sites (OSIAN and EL-KHEIR), and Arabic Wikipedia. Models were evaluated on the ALUE benchmark (Arabic Language Understanding Evaluation), which consists of eight diverse tasks including sentiment analysis, dialect identification (MDD), and natural language inference (XNLI). They also evaluated on ANERcorp for Named Entity Recognition.
Key Results
SABER achieved a new state-of-the-art score of 77.3% on the ALUE leaderboard. In comparative evaluations, JABER (the base model) outperformed the previous best model, ARBERT, by approximately 2% on average across all ALUE tasks.
On the ANERcorp dataset, JABER achieved an F1 score of 84.20, outperforming all other Arabic BERT-base models. Notably, despite not being specifically trained on social media data, JABER and SABER performed exceptionally well on tweet-based tasks, indicating that high-quality pre-training on formal text (MSA) yields strong transferable representations for dialects.
Key Insights
- Quality Over Quantity: Discarding nearly 80% of raw data produced a model that outperformed others trained on much larger, noisier datasets.
- Scaling Benefits: Scaling up to 24 layers (SABER) provided a consistent boost over the 12-layer version, suggesting Arabic NLU tasks still benefit from increased capacity.
- BBPE Advantage: Using a 64k vocabulary with BBPE allows the models to handle rare words and dialectal variations more robustly.
Conclusion and Future Work
While JABER and SABER set new benchmarks, the authors acknowledge room to improve dialect awareness. Future work will involve integrating massive amounts of tweet data to better capture regional nuances and exploring different architectures like T5 or GPT-style models tailored for Arabic.
Summary updated