AraBERT: Transformer-based Model for Arabic Language Understanding
Written for the Research library (claude-opus-5-5) from the paper text, in our own words: the license "arXiv — non-exclusive licence to distribute" does not allow redistributing the text itself. Original — arxiv.org/pdf/2003.00104
Summary
Arabic has rich morphology, limited NLP resources and little in common with Latin-script languages. As a result, multilingual models such as Google's multilingual BERT represent it poorly. The authors address this by training a BERT model only on Arabic, called AraBERT. It uses the standard BERT-base architecture and two pre-training objectives: Masked Language Modeling with whole-word masking, and Next Sentence Prediction. The training data is about 24GB of deduplicated text, combining news articles scraped by the authors with two public collections, the 1.5 billion words Arabic Corpus and OSIAN.
Arabic often attaches prefixes such as the article "Al-" directly to words, which can fill a vocabulary with near-duplicate tokens. To reduce this, the text is first split into stems and affixes with Farasa, and a SentencePiece vocabulary is then trained on the segmented text. A second variant, AraBERTv0.1, skips segmentation for comparison.
AraBERT was evaluated on three downstream tasks (classifying sentiment, identifying named entities, and answering questions) with datasets covering both Modern Standard Arabic and dialects. It beat multilingual BERT and reached state-of-the-art results on most benchmarks. The models are publicly released.
Key points
- Architecture: BERT-base with 12 encoder layers, 768 hidden units, 12 attention heads, sequences up to 512 tokens, and roughly 110M parameters. In masking, 15% of tokens are selected, and these are replaced with [MASK], a random token or the original token in an 80/10/10 split.
- Pre-training corpus: about 70 million sentences (~24GB). Sources are scraped Arabic news, the 1.5 billion words Arabic Corpus (El-Khair, 2016; over 5M articles, 10 sources, 8 countries) and OSIAN (3.5M articles, ~1B tokens, 31 sources, 24 Arab countries). Words containing Latin characters were kept.
- Tokenization: Farasa segmentation followed by SentencePiece in unigram mode, giving about 60K subwords. The final vocabulary has 64K entries, including about 4K unused slots reserved for later pre-training. AraBERTv0.1 is trained on unsegmented text.
- Evaluation: tasks are SA, NER (IOB2 tagging, using only the first sub-token of each word) and QA (predicting answer start and end positions). The SA datasets include HARD, which has 93,700 hotel reviews in MSA and dialects.
- Release: the models are available at github.com/aub-mind/araBERT and through popular NLP libraries.
Cited by
- ARBERT & MARBERT: Deep Bidirectional Transformers for Arabic
- Improving Arabic Diacritization with Regularized Decoding and Adversarial Training
- AlephBERT: Language Model Pre-training and Evaluation from Sub-Word to Sentence Level
- A Transformer-based parser for Syriac morphology
- Do Diacritics Matter? Evaluating the Impact of Arabic Diacritics on Tokenization and LLM Benchmarks
- Nahw: A Comprehensive Benchmark of Arabic Grammar Understanding, Error Detection, Correction, and Explanation
- Overview of the WANLP 2021 Shared Task on Sarcasm and Sentiment Detection in Arabic
- SemEval-2022 Task 6: iSarcasmEval, Intended Sarcasm Detection in English and Arabic
- Multilingual Sequence-to-Sequence Models for Hebrew NLP
- Challenges and Strategies in Cross-Cultural NLP
- The Interplay of Variant, Size, and Task Type in Arabic Pre-trained Language Models
- ArabicMMLU: Assessing Massive Multitask Language Understanding in Arabic
- HeBERT & HebEMO: a Hebrew BERT Model and a Tool for Polarity Analysis and Emotion Recognition
- Explicit Morphological Knowledge Improves Pre-training of Language Models for Hebrew
- Offensive Hebrew Corpus and Detection using BERT
- Exploring Tokenization Strategies and Vocabulary Sizes for Enhanced Arabic Language Models
- HEBATRON: A Hebrew-Specialized Open-Weight Mixture-of-Experts Language Model
- FlauBERT: Unsupervised Language Model Pre-training for French
- When Being Unseen from mBERT is just the Beginning: Handling New Languages With Multilingual Language Models
- Having Beer after Prayer? Measuring Cultural Bias in Large Language Models
- Pre-trained Models for Natural Language Processing: A Survey
- How Good is Your Tokenizer? On the Monolingual Performance of Multilingual Language Models
- Jais and Jais-chat: Arabic-Centric Foundation and Instruction-Tuned Open Generative Large Language Models
- CamelParser2.0: A State-of-the-Art Dependency Parser for Arabic
Cite
@misc{antoun2020arabert,
title = {{AraBERT: Transformer-based Model for Arabic Language Understanding}},
author = {Antoun, Wissam and Baly, Fady and Hajj, Hazem},
year = {2020},
doi = {10.48550/arxiv.2003.00104},
eprint = {2003.00104},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2003.00104}
}References
- Abdelali, A., Darwish, K., Durrani, N., and Mubarak, H. (2016). Farasa: A fast and furious segmenter for arabic. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Demonstrations, pages 11–16. find our card
- Abdul-Mageed, M., Alhuzali, H., and Elaraby, M. (2018). You tweet what you speak: A city-level dataset of arabic dialects. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018). find
- Abu Farha, I. and Magdy, W. (2019). Mazajak: An online Arabic sentiment analyser. In Proceedings of the Fourth Arabic Natural Language Processing Workshop, pages 192–198, Florence, Italy, August. Association for Computational Linguistics. find
- Adiwardana, D., Luong, M.-T., So, D. R., Hall, J., Fiedel, N., Thoppilan, R., Yang, Z., Kulshreshtha, A., Nemade, G., Lu, Y., and Le, Q. V. (2020). Towards a human-like open-domain chatbot. find our card
- Al Sallab, A., Hajj, H., Badaro, G., Baly, R., El-Hajj, W., and Shaban, K. (2015). Deep learning models for sentiment analysis in arabic. In Proceedings of the second workshop on Arabic natural language processing, pages 9–17. find
- Al-Sallab, A., Baly, R., Hajj, H., Shaban, K. B., El-Hajj, W., and Badaro, G. (2017). Aroma: A recursive deep learning model for opinion mining in arabic as a low resource language. ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP), 16(4):1–20. find
- Alomari, K. M., ElSherif, H. M., and Shaalan, K. (2017). Arabic tweets sentimental analysis using machine learning. In International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems, pages 602–610. Springer. find
- Aly, M. and Atiya, A. (2013). LABR: A large scale Arabic book reviews dataset. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 494–498, Sofia, Bulgaria, August. Association for Computational Linguistics. find
- Badaro, G., Baly, R., Hajj, H., Habash, N., and El-Hajj, W. (2014). A large scale arabic sentiment lexicon for arabic opinion mining. In Proceedings of the EMNLP 2014 workshop on arabic natural language processing (ANLP), pages 165–173. find
- Baly, R., Hajj, H., Habash, N., Shaban, K. B., and El-Hajj, W. (2017). A sentiment treebank and morphologically enriched recursive deep models for effective sentiment analysis in arabic. ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP), 16(4):1–21. find
- Baly, R., Khaddaj, A., Hajj, H., El-Hajj, W., and Shaban, K. B. (2018). Arsentd-lev: A multi-topic corpus for target-based sentiment analysis in arabic levantine tweets. In OSACT 3: The 3rd Workshop on Open-Source Arabic Corpora and Processing Tools, page 37. find
- Benajiba, Y. and Rosso, P. (2007). Anersys 2.0: Conquering the ner task for the arabic language by combining the maximum entropy with pos-tag information. In IICAI, pages 1814–1823. find
- Bojanowski, P., Grave, E., Joulin, A., and Mikolov, T. (2017). Enriching word vectors with subword information. Transactions of the Association for Computational Linguistics, 5:135–146. find
- Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., Grave, E., Ott, M., Zettlemoyer, L., and Stoyanov, V. (2019). Unsupervised cross-lingual representation learning at scale. find
- Dahou, A., Elaziz, M. A., Zhou, J., and Xiong, S. (2019a). Arabic sentiment classification using convolutional neural network and differential evolution algorithm. Computational intelligence and neuroscience, 2019. find
- Dahou, A., Xiong, S., Zhou, J., and Elaziz, M. A. (2019b). Multi-channel embedding convolutional neural network model for arabic sentiment classification. ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP), 18(4):1–23. find
- de Vries, W., van Cranenburgh, A., Bisazza, A., Caselli, T., van Noord, G., and Nissim, M. (2019). Bertje: A dutch bert model. arXiv preprint arXiv:1912.09582. ↗ our card
- DeepsetAI. (2019). Open sourcing german bert. find
- Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2018). Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. ↗
- El Bazi, I. and Laachfoubi, N. (2019). Arabic named entity recognition using deep learning approach. International Journal of Electrical & Computer Engineering (2088-8708), 9(3). find
- El-Khair, I. A. (2016). 1.5 billion words arabic corpus. arXiv preprint arXiv:1611.04033. ↗
- ElJundi, O., Antoun, W., El Droubi, N., Hajj, H., El-Hajj, W., and Shaban, K. (2019). hulmona: The universal language model in arabic. In Proceedings of the Fourth Arabic Natural Language Processing Workshop, pages 68– 77. find
- Elnagar, A., Khalifa, Y. S., and Einea, A. (2018). Hotel arabic-reviews dataset construction for sentiment analysis applications. In Intelligent Natural Language Processing: Trends and Applications, pages 35–52. Springer. find
- Erdmann, A., Zalmout, N., and Habash, N. (2018). Addressing noise in multidialectal word embeddings. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 558–565. find
- Howard, J. and Ruder, S. (2018). Universal language model fine-tuning for text classification. arXiv preprint arXiv:1801.06146. ↗
- Huang, Z., Xu, W., and Yu, K. (2015). Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991. ↗ our card
- Kudo, T. (2018). Subword regularization: Improving neural network translation models with multiple subword candidates. find
- Kwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Kelcey, M., Devlin, J., Lee, K., Toutanova, K. N., Jones, L., Chang, M.-W., Dai, A., Uszkoreit, J., Le, Q., and Petrov, S. (2019). Natural questions: a benchmark for question answering research. Transactions of the Association of Computational Linguistics. find our card
- Lafferty, J. D., McCallum, A., and Pereira, F. C. (2001). Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML. find
- Lample, G., Ballesteros, M., Subramanian, S., Kawakami, K., and Dyer, C. (2016). Neural architectures for named entity recognition. arXiv preprint arXiv:1603.01360. ↗
- Lan, Z., Chen, M., Goodman, S., Gimpel, K., Sharma, P., and Soricut, R. (2019). Albert: A lite bert for self-supervised learning of language representations. find
- Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. (2019). Roberta: A robustly optimized bert pretraining approach. find
- Martin, L., Muller, B., Suárez, P. J. O., Dupont, Y., Romary, L., Éric Villemonte de la Clergerie, Seddah, D., and Sagot, B. (2019). Camembert: a tasty french language model. find our card
- Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., and Dean, J. (2013). Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pages 3111– 3119. find
- Mikolov, T., Grave, E., Bojanowski, P., Puhrsch, C., and Joulin, A. (2017). Advances in pre-training distributed word representations. arXiv preprint arXiv:1712.09405. ↗ our card
- Mozannar, H., Maamary, E., El Hajal, K., and Hajj, H. (2019). Neural arabic question answering. In Proceedings of the Fourth Arabic Natural Language Processing Workshop, pages 108–118. find
- Nabil, M., Aly, M., and Atiya, A. (2015). ASTD: Arabic sentiment tweets dataset. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 2515–2519, Lisbon, Portugal, September. Association for Computational Linguistics. find
- Pennington, J., Socher, R., and Manning, C. (2014). Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532– 1543. find
- Peters, M. E., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., and Zettlemoyer, L. (2018). Deep contextualized word representations. In Proceedings of NAACL-HLT, pages 2227–2237. find
- Polignano, M., Basile, P., de Gemmis, M., Semeraro, G., and Basile, V. (2019). AlBERTo: Italian BERT Language Understanding Model for NLP Challenging Tasks Based on Tweets. In Proceedings of the Sixth Italian Conference on Computational Linguistics (CLiC-it 2019), volume 2481. CEUR. find
- Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. (2019). Exploring the limits of transfer learning with a unified text-to-text transformer. find
- Rajpurkar, P., Zhang, J., Lopyrev, K., and Liang, P. (2016). Squad: 100,000+ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250. ↗ our card
- Ratnaparkhi, A. (1998). Maximum entropy models for natural language ambiguity resolution. find
- Sang, E. F. and De Meulder, F. (2003). Introduction to the conll-2003 shared task: Language-independent named entity recognition. arXiv preprint cs/0306050. find
- Soliman, A. B., Eissa, K., and El-Beltagy, S. R. (2017). Aravec: A set of arabic word embedding models for use in arabic nlp. Procedia Computer Science, 117:256–265. find
- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. (2017). Attention is all you need. find
- Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R., and Le, Q. V. (2019). Xlnet: Generalized autoregressive pretraining for language understanding. find our card
- Zeroual, I., Goldhahn, D., Eckart, T., and Lakhouaja, A. (2019). OSIAN: Open source international Arabic news corpus - preparation and integration into the CLARIN-infrastructure. In Proceedings of the Fourth Arabic Natural Language Processing Workshop, pages 175–182, Florence, Italy, August. Association for Computational Linguistics. find
- Zhu, Y., Kiros, R., Zemel, R., Salakhutdinov, R., Urtasun, R., Torralba, A., and Fidler, S. (2015). Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. find our card