Lahjawi: A rabic Cross-Dialect Translator (2025)

Abstract: In this paper, we explore the rich diversity of Arabic dialects by introducing a suite of pioneering models called Lahjawi. The primary model, Lahjawi-D2D, is the first designed for cross-dialect translation among 15 Arabic dialects. Furthermore, we introduce Lahjawi-D2MSA, a model designed to convert any Arabic dialect into Modern Standard Arabic (MSA). Both models are fine-tuned versions of Kuwain-1.5B an in-house built small language model, tailored for Arabic linguistic characteristics. We provide a detailed overview of Lahjawi’s architecture and training methods, along with a comprehensive evaluation of its performance. The results demonstrate Lahjawi’s success in preserving meaning and style, with BLEU scores of 9.62 for dialect-to-MSA and 9.88 for dialect-to- dialect tasks. Additionally, human evaluation reveals an accuracy score of 58% and a fluency score of 78%, underscoring Lahjawi’s robust handling of diverse dialectal nuances. This research sets a foundation for future advancements in Arabic NLP and cross-dialect communication technologies.

## introduction arabic is the official language of 22 countries, with an estimated 400 million speakers globally (mohammed ameen and abdulrahman kadhim, 2023), it stands out as one of the world's most linguistically rich. with more than 120 morphological patterns @xcite , arabic offers a multitude of word formations that significantly amplify its expressive capacity. in everyday communication, arabs primarily use dialects, which vary significantly across countries and regions, posing challenges for cross-dialect communication, particularly in informal contexts. the importance of arabic dialect translation has grown significantly over the last decade, driven by increasing demand for digital communication and cultural exchanges. while early research focused on modern standard arabic (msa) translation, the need for comprehensive cross-dialectal translation has recently gained attention due to the language's rich diversity. this diversity presents substantial challenges, including significant vocabulary disparities (see to address these challenges, we present lahjawi, a set of dialect translation models designed to address the challenges of cross-dialect communication in arabic. our key contribution, lahjawi-d2d, is the first model developed for cross-dialect translation, covering 15 distinct arabic dialects. additionally, we introduce lahjawi-d2msa, which translates any arabic dialect into modern standard arabic (msa). this work advances arabic dialect translation and contributes to the broader goal of enhancing inclusivity and linguistic diversity in nlp. the remainder of this paper is organized as follows: section 2 reviews related works, section 3 details our dataset creation steps, section 4 presents our model and the proposed method, sec- msa levantine arabic egyptian arabic translation ‫؟‬ ‫؟‬ ‫؟‬ ‫ﺇﺯ‬ how are you? ‫ﻝ‬ ‫ﺏ‬ ‫ﺍ‬ ‫ﺃﺭ‬ ‫ﺃﺭﻭﺡ‬ ‫ﻱ‬ ‫ﺍ‬ ‫ﺃﺭﻭﺡ‬ i want to go home ‫ﺙ؟‬ ‫ﺫﺍ‬ ‫؟‬ ‫؟‬ ‫ﺍ‬ ‫ﺇ‬ what's happening? through this structured approach, we deliver an in-depth analysis of lahjawi's capabilities, highlighting its potential impact on arabic nlp and cross-dialectal communication. ## related work recent advancements in dialect translation research have been explored in various dimensions, with notable efforts focusing on translation from individual dialects to modern standard arabic (msa) and translation involving multiple dialects into msa @xcite . the former involves converting a specific dialect into msa, aiming for precise linguistic alignment between regional speech and formal arabic. the latter examines the translation of multiple dialects into msa, offering broader applicability across diverse dialectal variations and enhancing mutual intelligibility. beyond these, cross-dialect translation involves translating texts from one specific arabic dialect directly into another, bypassing the need for modern standard arabic (msa) as an intermediary. this approach is particularly relevant for improving communication between speakers of different dialects. however, despite its practical importance, research in this area remains limited. this may be because most other languages do not exhibit the same level of dialectal variation as arabic. as a result, cross-dialect translation is a challenge unique to arabic and a few other languages, which might explain the relatively limited attention it has received from researchers. consequently, only one foundational work @xcite has addressed this underexplored domain. ## dataset preparation and preprocessing our multi-dialect arabic translation model was developed using a combination of open-source datasets: madar @xcite , padic @xcite , nadi (2023) @xcite , dial2msa @xcite , arabic sts @xcite , ufal parallel corpus of north levantine 1.0 @xcite and multidialectal parallel corpus of arabic(mdpca) @xcite . these datasets were processed uniformly using two distinctive templates, with system prompts employed throughout, one for translating any dialect-to-msa, and another for translating between specific dialects (see figure 1 ). applying these templates results in two types of datasets: dialect-to-msa, and dialect-to-dialect datasets. the dialect-to-msa (d2msa) dataset consists of 197,042 samples, which are used to train the lahjawi-d2msa models. figure 2 shows the distribution of dialects within this dataset. as shown in the figure, the dataset exhibits significant dialect imbalance, with syrian arabic dominating at 66%, while other dialects have minimal representation ranging from 0.8% to 5.7%. the dialect-to-dialect (d2d) dataset contains 266,871 samples and is used to train the lahjawi-d2d model. this dataset was created by generating every possible combination of dialect pairs from all previously mentioned datasets, encompassing a wide range of dialect variations. the dataset includes 210 possible dialect translation pairs (see figure 3 ). the dataset shows significant skewness in the number of samples for each pair across the 15 dialects, with an over-representation of levantine dialects, specifically syrian, palestinian, and jordanian, and maghrebi dialects, particularly tunisian, moroccan, and algerian. we implemented a straightforward preprocessing pipeline to standardize the training data. this process includes the normalization of arabic characters and numerals, as well as the standardization of punctuation and spacing. these preprocessing steps ensure consistency across the datasets, enabling more accurate and reliable model training. to evaluate the performance of our models, we utilized two datasets. the first dataset is the nadi-2024 da-msa test and development data (abdul-mageed et al., 2024), which is available in four dialects: egyptian, emirati, jordanian, and palestinian. this benchmark facilitates the comparison of our results with others. additionally, we selected the madar parallel corpus test set @xcite to assess our model's performance on additional dialects, considering the absence of a standardized benchmark for testing the translation of other dialects into msa. we applied the same benchmark to evaluate lahjawi-d2d for crossdialectical translation, leveraging the fact that madar offers parallel translations between our targeted dialects. ## model lahjawi models are a fine-tuned adaptation of an in-house small language model kuwain 1.5b, specifically optimized for the challenging task of arabic dialect translation. in our approach, we reformulated the translation problem into a question-answering (qa) framework, which enabled more precise and focused training. this reframing allowed us to capture the nuances of dialect-specific translations better. as outlined in the previous section, we implemented a consistent template transformation across the entire training dataset, tailoring the input-output structures to align with dialectspecific translation tasks, as illustrated in figure 1 . this step was crucial in adapting the generalpurpose kuwain model to specialize in translating input text from one dialect to another, based on the prompt provided. the fine-tuning process followed the next-token prediction paradigm, with system prompts and embedding tokens carefully masked to ensure the model focused on relevant dialectal context. the training was conducted over three epochs us-ing a cosine learning rate schedule, with meticulously adjusted hyperparameters to maximize performance. these optimizations ensured the model's ability to capture both subtle and overt linguistic distinctions across the dialects, delivering robust translation quality across diverse sentence structures. see appendix a for configuration details. by combining the strengths of the kuwain model with our specialized fine-tuning approach, lahjawi models are uniquely positioned to address the complexities of arabic dialect translation. this tailored methodology enables lahjawi to serve as a powerful tool for facilitating crossdialectal communication, offering more accurate and context-aware translations between the various arabic dialects. ## experiments and results this section presents the results from four experiments conducted on arabic dialect translation. each experiment was designed to evaluate different aspects of the translation process. the first experiment, lahjawi-quadd, follows the methodology of several papers participating in nadi 2024 competition @xcite , to translate from specific arabic dialects to msa, serving as a benchmark to compare results. the second experiment, lahjawi-4isolate, was inspired by @xcite , which suggested that training a model separately for each dialect improves performance. however, our results contradicted this hypothesis, leading us to the third experiment, lahjawi-d2msa, which investigated the impact of increasing the number of dialects on overall performance. the fourth and final experiment, lahjawi-d2d, represents our primary contribution to developing the first-ever model for direct translation between arabic dialects. ## discussion first, we will examine the impact of the first experiment involved training a comprehensive model on four dialects collectively (lahjawi-quadd), compared to the second experiment focused on training separate individual models for each of these dialects (lahjawi-4isolate). as shown in observing the results of training individual models for each dialect reveals that separate training does not consistently lead to better performance, particularly for the jordanian model, which showed a notable drop in accuracy. this aligns with findings from (almusallam and ahmad, 2024), who observed that the jordanian and palestinian dialects tend to achieve high accuracy with minimal differences between them when used together for training, likely due to their close similarity to each other and modern standard arabic (msa).to confirm this, we compared the jordanian and palestinian models on the nadi development set. the results were as follows: jordanian achieved a bleu score of 5.67, while palestinian achieved 14.12, interestingly, when we tested the palestinian model on jordanian data, it scored 19.34, while the jordanian model scored 6.84 on palestinian data. these results suggest that the jordanian dataset is relatively small, and given the similarity between the two dialects, combining them leads to improved bleu scores. despite the limited number of training samples for the emirati dialect, the model performed well. this success could be attributed to the fact that kuwain was exposed to more gulf dialects during the pre-training phase, leading to a better understanding and representation of the emirati dialect within the model. as for the third experiment, traininglahjawi-d2msa as a unified model on 15 dialects yields slightly different scores, with similar overall averages. these small differences indicate that increasing the number of dialects adds translation challenges in some dialects due to the increase in complexity, while others may benefit from the existence of other dialects since similar words and contexts may be the same in different dialects. nevertheless, the model demonstrated strong adaptability across the diverse linguistic variations. compared to other models, our model lahjawi-d2msa produced mediocre results. in contrast, teams like arabic train @xcite and cufe(ibrahim, 2024), with superior models such as the jais-13b and llama-8b multilingual model, leveraged much larger architectures. additionally, teams like alson (almusallam and ahmad, 2024) and asos @xcite enhanced their performance by augmenting their datasets with higher quality and more extensive data. this suggests that using a larger model along with higher-quality data could significantly improve performance. in analyzing the results presented in figure 4 the lahjawi-d2d model highlights that certain dialects consistently achieve higher scores (e.g., qatari, palestinian) compared to others, such as iraqi and libyan, which exhibit notably lower scores. several factors could contribute to these disparities, including the quality and quantity of training data, as well as the presence of specific dialects during the pre-training phase of the kuwain model . moreover, it is observed that the model's translation capabilities are not always symmetri-cal. some dialects may translate more effectively in one direction than the other. for instance, the translation score from qatari to iraqi is 17.21, whereas from iraqi to qatari, it is 6.02. this asymmetry in translation performance highlights the complexity and nuances involved in accurately capturing the linguistic variations between different dialects. the results of the human evaluation accuracy in figure 5a indicate that the syrian dialect achieves the highest translation accuracy among the arabic dialects, largely due to its large dataset and close similarity to modern standard arabic and other eastern dialects (egyptian, saudia, palestinian, jordanian, and syrian) (see figure 3 ). in contrast, although the moroccan (tunisia, morocco) dialects have a large dataset, they achieve lower translation accuracy due to their divergence from modern standard arabic and its most closely related dialects. overall, the accuracy rating for this evaluation is 58%. figure 5b shows high fluency levels among most arabic dialects, with the eastern dialects showing high similarity and high fluency among them. while the moroccan dialects show lower variation and percentages for the same reasons related to the nature of the dialect and its rarity in the basic training data in the original model. the overall fluency level, as assessed, reaches 78%. ## limitations our work faced significant challenges due to the complexity and diversity of arabic dialects, which often deviate from modern standard arabic in vocabulary and grammar. the lack of standardized sentence structures and written forms in many dialects complicated the training and evaluation of our models. a significant limitation is the quality and availability of arabic dialect datasets, which are often small, unevenly distributed, and lack clear distinctions between dialects. parallel training corpora are usually built separately for each dialect, without highlighting their similarities and differences, making it challenging to train models that accurately differentiate between them. additionally, many translations in these datasets are rephrased rather than literal, adding complexity to both generating and evaluating precise translations. finally, the model's tendency to generate inaccurate outputs (hallucinations), particularly in smaller models, highlighted the resource constraints in developing accurate cross-dialect translators. ## acknowledgement this work was made possible through the support of misraj corporation, whose management and colleagues provided the necessary resources and technical infrastructure for this research. we express our sincere gratitude to dr. nada ghneim from arab international university for her thorough review and insightful feedback, which substantially improved this manuscript. textual similarity for modern standard and dialectal arabic using transfer learning. plos one, 17(8):e0272991. salwa saad alahmari. 2024. sirius_translators at osact6 2024 shared task: fin-tuning ara-t5 models for translating arabic dialectal text to modern standard arabic. in proceedings of the 6th workshop on open-source arabic corpora and processing tools (osact) with shared tasks on arabic llms hallucination and dialect to msa machine translation @ lrec-coling 2024, pages 117--123, torino, italia. elra and iccl. manan almusallam and samar ahmad. 2024. alson at nadi 2024 shared task: alson -a finetuned model for arabic dialect translation. in proceedings of the second arabic natural language processing conference, pages 764--768, bangkok, thailand. association for computational linguistics. hanin atwany, nour rabih, ibrahim mohammed, abdul waheed, and bhiksha raj. 2024. os-act 2024 task 2: arabic dialect to msa translation. in proceedings of the 6th workshop on open-source arabic corpora and processing tools (osact) with shared tasks on arabic llms hallucination and dialect to msa machine translation @ lrec-coling 2024, pages 98--103, torino, italia. elra and iccl. houda bouamor, nizar habash, and kemal oflazer. 2014. a multidialectal parallel corpus of arabic. in proceedings of the ninth international conference on language resources and evaluation (lrec'14), pages 1240--1245, reykjavik, iceland. european language resources association (elra). houda bouamor, nizar habash, mohammad salameh, wajdi zaghouani, owen rambow, dana abdulrahim, ossama obeid, salam khalifa, fadhl eryani, alexander erdmann, and kemal oflazer. 2018. the madar arabic dialect corpus and lexicon. in proceedings of the eleventh international conference on language resources and evaluation (lrec 2018), miyazaki, japan. european language resources association (elra). anastasiia demidova, hanin atwany, nour rabih, and sanad sha'ban. 2024. arabic train at nadi 2024 shared task: llms' ability to translate arabic dialects into modern standard arabic. in proceedings of the second arabic natural language processing conference, pages 729--734, bangkok, thailand. association for computational linguistics. wiem derouich, sameh kchaou, and rahma boujelbane. 2023. anlp-rg at nadi 2023 shared task: machine translation of arabic dialects: a comparative study of transformer models. in proceedings of arabicnlp 2023, pages 683--689, singapore (hybrid). association for computational linguistics. mohamed faheem, khaled wassif, hanaa bayomi, and sherif abdou. 2024. improving neural machine translation for low resource languages through non-parallel corpora: a case study of egyptian dialect to modern standard arabic translation. scientific reports, 14. murhaf fares. 2024. arat5-msaizer: translating dialectal arabic to msa. in proceedings of the 6th workshop on open-source arabic corpora and processing tools (osact) with shared tasks on arabic llms hallucination and dialect to msa machine translation @ lrec-coling 2024, pages 124--129, torino, italia. elra and iccl. michael ibrahim. 2024. cufe at nadi 2024 shared task: fine-tuning llama-3 to translate from arabic dialects to modern standard arabic. in proceedings of the second arabic natural language processing conference, pages 769--773, bangkok, thailand. association for computational linguistics. saméh kchaou, rahma boujelbane, and lamia hadrich-belguith. 2020. parallel resources for tunisian arabic dialect translation. in proceedings of the fifth arabic natural language processing workshop, pages 200--206, barcelona, spain (online). association for computational linguistics. abdullah khered, ingy abdelhalim, nadine abdelhalim, ahmed soliman, and riza batista-navarro. 2023. unimanc at nadi 2023 shared task: a comparison of various t5-based models for translating arabic dialectical text to modern standard arabic. in proceedings of arabicnlp a configuration of supervised fine-tuning lahjawi models are a fine-tuned adaptation of an in-house small language model kuwain 1.5b with 8 nvidia a100 80g gpus. we employ the adamw optimizer, with each batch consisting of 512 samples. we adopt 8 × 10 -6 as the maximum learning rate based on the model architecture. a cosine scheduler is employed for learning rate adjustment, with a weight decay of 0.1. we train for one epoch using a variety of experiments discussed in section 5.