WorksComputer Science
Benchmarking Arabic Dialects for Math Problems
Abstract
Mathematical reasoning remains underexplored for low-resource languages, including Dialectal Arabic. To bridge this gap, we introduce the DAR-MGSM (Dialectal Arabic Multilingual Grade School Math) Benchmark, the first manually curated benchmark for evaluating mathematical reasoning in Dialectal Arabic. DAR-MGSM consists of math word problems (MWPs) requiring multi-step reasoning and covers five major Arabic dialects alongside Modern Standard Arabic (MSA). The benchmark comprises two parallel versions: translated-only and translated & culturally localized. The latter version adapts entities and references to regional varieties. We evaluate eleven Arabic-centric and multilingual large language models on DAR-MGSM. The results show that the performance generally declines on the localized version, highlighting the challenges introduced by culturally grounded adaptations. However, the magnitude of this effect varies across models, with Arabic-centric models exhibiting different levels of sensitivity to localization. A mechanistic interpretability analysis shows that translated and localized variants of the same MWPs often induce distinct internal reasoning trajectories, even when aggregate accuracy remains similar. Overall, our results show that mathematical reasoning performance depends on both linguistic variety and cultural context.
Introduction
Large language models (LLMs) have demonstrated strong performance on complex tasks like mathematical reasoning in resource-rich languages such as English [9, 15 b] and French [17]. However, these capabilities do not consistently extend to low-resource languages [10, 18], nor to languages with numerous variants. Arabic is a prominent example: despite its rich dialectal diversity, most existing evaluation

Figure 1. An illustrative Math Word Problem adapted from MGSM-Rev2 in three versions: (i) Original English, (ii) Translated to MSA, and (iii) Localized to Egyptian Arabic dialect and entities.
mathematical benchmarks focus on Modern Standard Arabic (MSA).
The focus on MSA is understandable. Math textbooks and educational materials across the Arab world are written in MSA. Yet, teachers use Dialectal Arabic (DA) extensively in instruction. Amin and Badreddine [5] document the extensive use of dialect in science classes, while MSA is used in textbooks. Other studies such as Amara [4] mention extensive use of dialect in math classes to explain concepts.
This reflects Arabic’s diglossic nature [14], a critical challenge for LLM evaluation. Existing benchmarks focusing on MSA provide only a partial view of mathematical reasoning capabilities in Arabic. To bridge this gap, we aim to develop an LLM math word problem (MWP) benchmark that reflects classroom real-world conditions in the Arab world.
Leveraging existing benchmarks, we translate MWPs from English into Arabic, to further allow us to investigate LLM biases across MSA, and Arabic dialects. While translation captures linguistic differences, it often creates texts alien to Arab culture. American English MWPs, for instance, commonly use US-centric entities such as Western personal names and locations, or currencies, even when presented to Arabic-speaking users.1 See Figure 1 for an illustrative example.
Such choices influence how naturally problems are interpreted and processed.
To investigate these challenges, we distinguish between two orthogonal benchmark dimensions: linguistic translation, which adapts the language of a problem, and cultural entity alignment or localization, which adapts culturally grounded entities for names, locations, currencies, and numeral conventions. This distinction enables a controlled study of whether culturally aligned benchmark variants elicit different model behavior than direct translations of the same mathematical problem.
Additionally, we benchmark localization with mechanistic interpretability, providing insight not only into whether localization affects performance, but also how it influences internal model reasoning processes.
Our contributions are as follows:
We introduce DAR-MGSM (Dialectal Arabic Multilingual Grade School Math Benchmark), the first benchmark for evaluating grade-school mathematical reasoning in MSA and five major Arabic varieties: Egyptian (EGY), Emirati (UAE), Jordanian (JOR), Moroccan (MOR), and Saudi (KSA).
We release two parallel benchmark variants: a manually translated dataset and a translated & culturally localized dataset.
We conduct the first systematic evaluation of dialectal Arabic mathematical reasoning, benchmarking multiple Arabic-centric and multilingual LLMs.
We use mechanistic interpretability to compare model behavior on translated and localized data.
Our results show that performance generally declines on localized data compared to direct translations, with varying effects across a variety of models and dialects. The interpretability analysis reveals that localization alters LLM reasoning, highlighting the need for culturally grounded evaluation in Arabic and other multilingual settings, where translation alone may mask differences in model capabilities.
Related Work
Mathematical reasoning benchmarks Evaluation of LLMs on mathematical reasoning has expanded substantially beyond English in recent years. One of the widely used benchmarks is GSM8K ([9]) containing approximately 8,500 grade-school MWPs. Building on GSM8K, Shi et al. ((2023)) introduced MGSM, extending to ten additional languages translated from English. MGSM-Rev2 ([9, 31, 26]) is a revised version of MGSM. MGSM8KInstruct ([8]), is a multilingual instruction-following dataset built on MGSM. Other reasoning benchmarks, such as GPQA ([27]), remain predominantly English-centric. In the above benchmarks, Arabic is typically represented only through MSA, but not dialects. We bridge this gap by evaluating on language varieties, providing parallel grade-school math benchmarks for MSA and five major Arabic dialects.
Arabic mathematical reasoning Within the Arabic NLP landscape, mathematical reasoning resources remain comparatively limited. Multilingual evaluation suites such as BenchMAX ([18]) and MathMist ([10]) include MSA as one of several evaluation languages. More recently, Alenezi and Salman ((2026)) introduced large-scale Arabic mathematical reasoning datasets, including AGSM8K, Qudurat, and ArabicMWPs, where AGSM8K consists of GSM8K-style problems translated into MSA. ArMATH ([2]) provides a collection of manually authored MWPs in MSA designed to support the development of automatic MWP solvers. Other dialectal benchmarks focus on related reasoning tasks, such as multiple-choice question answering ((Altakori et al., 2026)), rather than open-ended mathematical problem solving. To the best of our knowledge, no benchmark currently evaluates grade-school mathematical reasoning across the Arabic dialects. Consequently, the effect of dialectal variation on LLM mathematical reasoning capabilities remains largely unexplored.
In contrast, we provide a benchmark specifically designed for evaluation covering multiple dialects.
Translation vs. localization A methodological limitation shared by many multilingual reasoning benchmarks is a reliance on direct translation from English. For example, MGSM was intentionally translated without localization to facilitate cross-lingual comparison [31]. Similarly, AGSM8K [1] relies on machine translation followed by manual review. Recent work has argued that translation alone is insufficient for culturally grounded evaluation. Studies in multilingual and culturally aware NLP demonstrate that direct translations can obscure important sociocultural differences and reduce linguistic naturalness, motivating the need for localization in benchmark design [13] (Zhou et al. 2025). This issue is particularly relevant for Arabic, where dialects are closely tied to specific regional and cultural contexts. Our work builds on these insights by explicitly separating translation and localization as two distinct dimensions of the benchmark. Unlike prior Arabic mathematical reasoning benchmarks, we provide both translated and culturally localized versions of the same MWPs. This design enables controlled evaluation of the impact of localization on mathematical reasoning performance while preserving the underlying problem structure.
Multilingual reasoning challenges Recent studies have shown that multilingual reasoning remains challenging for current LLMs. Models often achieve higher accuracy when reasoning in English than when reasoning directly in other languages, reflecting the predominance of English in training and optimization pipelines [28]. Particularly, Saji et al. [28] demonstrate that reasoning in English yields higher final-answer accuracy than reasoning in many other languages. These findings motivate our investigation of localized Arabic MWPs, where linguistic variation and cultural alignment can be studied independently. By comparing translated and localized variants of the same MWP, we isolate the effect of cultural grounding on mathematical reasoning performance and better understand how benchmark design influences model behavior.
Residual stream interpretability Mechanistic interpretability often treats the transformer residual stream as a shared computational workspace, where attention heads and MLPs read from and write to common subspaces [12]. Methods such as tuned lens probe intermediate residual representations, while causal tracing, activation patching, and path patching test whether specific hidden states or model components are necessary for a given behavior [6, 22, 24, 23]. More recent work studies reasoning as trajectories through residual-stream geometry and decomposes representations using sparse autoencoders and superposition analyses [11, 7, 20] (Templeton et al. 2024; Li et al. 2025). While prior work has primarily used these methods to study reasoning, factual recall, and circuit-level behavior, little attention has been paid to multilingual or culturally grounded evaluation settings. Here we bridge this gap.
Dataset Curation
We extended MGSM-Rev2 [9, 31, 26], to include MSA2 and five Arabic Dialects: Egyptian, Emirati, Jordanian, Moroccan, Saudi. MGSM-Rev2 comprises 250 selected MWPs from the GSM8K English benchmark [9]. The English versions were the source text for translation for all the multilingual variants in MGSM and MGSM-Rev2 and also represent our starting point. The MWP from MGSM-Rev2 in Figure 1 demonstrates the US-centric nature of the original benchmark data. We therefore undertake both a translation and a localization approach to curating the data. Below, we describe both versions: standalone and separately.
Manual Translation
We hired professional translators to translate the MGSM-Rev2 250 MWPs into MSA and the five Arabic dialects. Both a dedicated translator and a reviewer were assigned to each Arabic variety (see Appendix § 7 for additional information on the annotators). As an additional quality check, native speakers conducted an in-house review of the professional translations. Correction rates ranged from 4.0% for Saudi Arabic to 49.6% for MSA, mostly due to misinterpretation of English expressions encoding mathematical relationships (See Appendix § 7).
| ENG | <name> has an egg farm in <location>. His chickens produce <num1> eggs per day and he sells them for <num2> <currency> per dozen. How much does he make on eggs per week? |
| MSA | يمتلك <name> مزرعة بيض في <location>. تبيض دجاجاته <num1> بيضة يوميًا، ويبيع الدزينة ب <num2> <currency>. كم سيكسب في الأسبوع؟ |
| EGY | <name> عنده مزرعة بيض في <location>. فراخه بتبيض <num1> بيضة يوميًا، وبيبيع الدستة ب <num2> <currency>. بيكسب كام من البيض في الأسبوع؟ |
| JOR | <name> عنده مزرعة بيض في <location>. دجاجاته بيضوا <num1> بيضة في اليوم، وبيبيع الدزينة منهم ب <num2> <currency>. قديش بطلع دخله من البيض بالأسبوع؟ |
| KSA | <name> عنده مزرعة بيض في <location>. دجاجاته تبيض <num1> بيضة في اليوم ويبيعها ب <num2> <currency> لكل دزّن. كم مكسبه في الأسبوع؟ |
| MOR | <name> عندو فيرما ديال الدجاج ف <location>. الدجاج ديالو كيبيض <num1> بيضة ف النهار، كبيع البيض ب <num2> <currency> للّزينة. شحال كيخرج من البيض ف كل سيمانة؟ |
| UAE | عند <name> مزرعة دواجن في <location>. ديايه بيبيضون <num1> بيضة باليوم، وبيبيع الدرزن ب <num2> <currency>. كم يطلع دخله من البيض في الأسبوع؟ |
| ENG | Translated | MSA | EGY | JOR | KSA | MOR | UAE | |
| <name> | Lloyd | لويد<br>Lloyd | موسى<br>Musa | متولي<br>Metwally | وليد<br>Walid | عبد الرحيم<br>Abdul Rahim | إبراهيم<br>Ibrahim | مؤمن<br>Mumin |
| <location> | Toulouse | تولوز<br>Toulouse | تولوز<br>Toulouse | القاهرة<br>Cairo | اربد<br>Irbid | الرياض<br>Riyadh | مراكش<br>Marrakech | العين<br>Al-Ain |
| <num1> | 252 | 252 | ٢٥٢ | ٢٥٢ | ٢٥٢ | ٢٥٢ | 252 | ٢٥٢ |
| <num2> | 5 | 5 | ٥ | ٥ | ٥ | ٥ | 5 | ٥ |
| <currency> | dollar | دولار<br>dollar | دولار<br>dollar | جنيه<br>pound | دينار<br>dinar | ريال<br>riyal | درهم<br>dirham | درهم<br>dirham |
Table 1. Entity realizations across English, translated Arabic, MSA, EGY, JOR, KSA, MOR, and UAE.
| ENG | Translated | MSA | EGY | JOR | KSA | MOR | UAE | |
| <name> | Lloyd | لويد<br>Lloyd | موسى<br>Musa | متولي<br>Metwally | وليد<br>Walid | عبد الرحيم<br>Abdul Rahim | إبراهيم<br>Ibrahim | مؤمن<br>Mumin |
| <location> | Toulouse | تولوز<br>Toulouse | تولوز<br>Toulouse | القاهرة<br>Cairo | اربد<br>Irbid | الرياض<br>Riyadh | مراكش<br>Marrakech | العين<br>Al-Ain |
| <num1> | 252 | 252 | ٢٥٢ | ٢٥٢ | ٢٥٢ | ٢٥٢ | 252 | ٢٥٢ |
| <num2> | 5 | 5 | ٥ | ٥ | ٥ | ٥ | 5 | ٥ |
| <currency> | dollar | دولار<br>dollar | دولار<br>dollar | جنيه<br>pound | دينار<br>dinar | ريال<br>riyal | درهم<br>dirham | درهم<br>dirham |
Table 2. Entity realizations across English, translated Arabic, MSA, EGY, JOR, KSA, MOR, and UAE.
The translation guidelines emphasized that entities such as places, names, and currencies should remain in the original form, i.e., should not be localized (see examples in Table 2). Additionally, we advised that dialectal translations should be natural with minimal overlap with MSA. For borrowed words, we asked annotators to adhere to linguistic forms used naturally in their dialect. For instance, the word for email should be إيميل. We had also allowed for spelling variation, where the meaning remained intact (see translation guidelines in Appendix § 8). The final translated dataset consists of 250 MWPs per dialect, i.e., a total of 1,500 MWPs covering six varieties.
Localization
Since direct translation would fail to incorporate cultural alignment with the dialects, we augmented the translated data with a semi-automated localization step, by replacing math question’s entities with region-specific equivalents. We identified four entity types to be localized: names, locations, currencies, and numerals. See Table 2 for examples of entity replacements.
The localizable entities were semi-automatically replaced throughout the MSA dataset with placeholders (e.g., [person_m] for a human male name). Anchoring these placeholders to the translated text maintains structural and logical integrity, which is critical for such tasks. When multiple entities of the same category appeared in a single MWP, we assigned a unique index to each entity variable to distinguish between different instances within the same category. As an example, if a MWP contained more than one male name, we assigned each name an index (e.g., [person_m_1], [person_m_2]. This indexing scheme preserves the distinctions between the entities while maintaining consistent placeholder types. We then projected the placeholders onto the dialectal translations using a structured heuristic. The final phase of localization involved an automatic mapping of the variable placeholders to region-specific replacements. We replaced the names and the locations with regionally relevant counter-parts. We also adjusted the financial units to reflect country-specific currencies. Additionally, we localized numerical values and percentage signs to the Arabic-Indic numeral system for all dialects except Moroccan which uses Arabic numeral system. This ensured that both the linguistic and the mathematical components of the MWP aligned culturally with the target regions (see examples in Tables 1 and 2). A total of 51 MWPs did not have entities requiring localization (Appendix § 10 for more details). The dataset went through a final human validation step. The name category had the most issues with 47 wrong name replacement across all dialects (less than 1% for all replacements). For example, our automatic scripts assumed that a name would appear once in the math problem, which led to failed replacements in cases where a name was mentioned twice or more. We show the surface differences induced by each localization scheme in Table 8.
| Scheme | Char diff | Word diff | Char edit | Word edit | |
| All | 1194 | 10.8% | 18.0% | 19.1 | 6.2 |
| Names | 1190 | 6.3% | 7.2% | 10.9 | 2.4 |
| Currency | 522 | 5.7% | 11.4% | 10.6 | 4.2 |
| Location | 173 | 2.2% | 1.5% | 4.4 | 0.5 |
| Numerals | 1329 | 3.4% | 9.3% | 5.9 | 3.1 |
Table 8. Average surface difference by localization scheme. Localization edits are small and targeted rather than broad rewrites.
Experimental Setup
We experimented with several Arabic-centric and multilingual LLMs on their ability to answer MWPs from our dataset (for more details, see Appendix § 11). We evaluated the following multilingual models: Qwen-3.6, Gemma4 models, and GPT-5.4. We further evaluated the following Arabic-centric ones on dialectal models such as Atlas-Chat, NileChat, and Jais that provide support for different dialects. We used OpenRouter ([25]) where applicable, otherwise relying on a local GPU for inference. The models were prompted as follows:
Solve the provided math problem. End with ‘The answer is: [number]’.
We then extracted the numerical values and computed accuracy against a reference answer. Results were normalized by removing thousand separators. We note that Moroccan uses periods as thousand separators while other dialects use commas. We experimented with individual replacements. We manually audited model outputs to assess whether answer-extraction failures contributed to the reported errors. § 5.3 describes the audit, and Appendix § 15 provides the category breakdown.
Results
Benchmark Results
The overarching takeaway is that cultural localization exposes model fragility that direct translation conceals.
Overall evaluation results on DAR-MGSM Table 3 shows that the accuracy of Arabic-centric and multilingual models degrades when localized entities are introduced. This degradation can vary by model size and dialect. Individual replacements show only slight changes compared to all replacements.
| MSA | EGY | JOR | KSA | MOR | UAE | Average | ||||||||
| Model | T | L | T | L | T | L | T | L | T | L | T | L | T | L |
| Atlas-Chat-2B | 28.8 | 23.6 | 22.8 | 13.2 | 24.8 | 20.8 | 21.6 | 18.4 | 24.4 | 23.6 | 28.0 | 20.0 | 25.1 | 19.9 |
| Nile-Chat-4B | 38.0 | 28.4 | 35.2 | 32.4 | 36.8 | 31.2 | 35.2 | 24.4 | 15.2 | 14.8 | 36.4 | 36.0 | 32.8 | 27.9 |
| Atlas-Chat-9B | 66.0 | 61.6 | 55.2 | 52.0 | 61.6 | 58.4 | 56.4 | 55.2 | 60.0 | 60.0 | 62.4 | 61.2 | 60.0 | 58.1 |
| c4ai-r7b | 72.4 | 69.2 | 67.2 | 62.4 | 68.0 | 65.6 | 62.8 | 57.2 | 54.4 | 55.2 | 71.6 | 72.8 | 66.1 | 63.7 |
| Jais2-8B-Chat | 68.8 | 68.8 | 66.4 | 53.2 | 70.8 | 65.6 | 62.0 | 54.8 | 56.4 | 54.4 | 70.0 | 67.2 | 65.7 | 60.7 |
| Qwen2.5-7B | 75.6 | 69.6 | 69.6 | 63.6 | 72.0 | 72.0 | 62.0 | 65.2 | 38.8 | 38.4 | 76.8 | 74.0 | 65.8 | 63.8 |
| Gemma4-2B | 73.6 | 71.6 | 66.8 | 69.2 | 67.6 | 66.8 | 63.2 | 61.6 | 50.4 | 45.2 | 73.2 | 74.0 | 65.8 | 64.7 |
| Gemma4-4B | 84.4 | 81.2 | 80.0 | 79.6 | 82.8 | 84.0 | 75.2 | 73.2 | 66.4 | 66.8 | 85.6 | 83.2 | 79.1 | 78.0 |
| Gemma4-26B | 85.6 | 86.0 | 88.0 | 87.6 | 90.8 | 90.4 | 78.4 | 80.0 | 80.4 | 79.6 | 91.6 | 90.0 | 85.8 | 85.6 |
| Qwen-3.6 | 86.4 | 84.8 | 87.2 | 87.6 | 91.2 | 90.4 | 78.0 | 76.8 | 79.2 | 80.0 | 91.2 | 90.0 | 85.5 | 84.9 |
| GPT-5.4 | 90.0 | 89.2 | 89.2 | 90.0 | 93.2 | 94.8 | 85.6 | 86.4 | 84.4 | 84.8 | 92.0 | 93.2 | 89.1 | 89.7 |
| Average | 70.0 | 66.7 | 66.1 | 62.8 | 69.1 | 67.3 | 61.9 | 59.4 | 55.3 | 54.8 | 70.8 | 69.2 | 65.5 | 63.4 |
Table 3. Accuracy (%) of 11 models on translated (T) and localized (L) problems for MSA and five dialects. Bold: the higher of T and L. Underlined: T and L differ significantly (McNemar’s test, ).
Degradation can vary depending on model size While most models perform worse on localized data, flagship models like GPT 5.4 and Gemma 4 only show slight degradation. We observe that performance improves as the model size increases.
Localizations can impact a model’s ability to correctly answer a MWP In Figure 2, we also observe that across models, the accuracy drops for all Arabic varieties. Performance appears to vary depending on the type of culturally-aware replacement (see Table 10 and Table 11). For example, Mary vs Fatema, dirhams vs $ or ’dollar’, and so on. This reveals that adding localizations can impact on the model’s ability to answer the MWP correctly.

Figure 2. Performance by region and localization.
| T | L | Name | Curr. | Loc. | Num. | |
| MSA | 70.0 | 66.7 | 67.5 | 69.9 | 70.1 | 69.2 |
| EGY | 66.1 | 62.8 | 66.9 | 63.6 | 66.0 | 65.5 |
| JOR | 69.1 | 67.3 | 68.7 | 68.5 | 69.1 | 68.1 |
| KSA | 61.9 | 59.4 | 62.0 | 61.0 | 61.4 | 60.6 |
| MOR | 55.3 | 54.8 | 54.4 | 54.2 | 54.9 | 55.5 |
| UAE | 70.8 | 69.2 | 69.7 | 69.1 | 70.9 | 69.1 |
Table 10. Model evaluation average results across MSA and the dialects: EGY, JOR, KSA, MOR and UAE. We report accuracy for the different localizations schemes over the 250 problems. T denotes Translated data; L denotes Translated and fully Localized data, Name denotes name replacements only, Curr. denotes currency replacements only, Loc. denotes location replacements only and Num. denotes numerical value replacements only.
| Name | Curr. | Loc. | Num. | |
| MSA | 65.7 | 71.0 | 75.8 | 69.2 |
| EGY | 66.7 | 67.2 | 78.8 | 65.5 |
| JOR | 67.0 | 64.8 | 78.8 | 68.1 |
| KSA | 61.9 | 60.6 | 58.6 | 60.6 |
| MOR | 53.7 | 56.3 | 55.6 | 55.5 |
| UAE | 68.6 | 70.3 | 84.8 | 69.1 |
Table 11. Model evaluation average results across MSA and the dialects: EGY, JOR, KSA, MOR and UAE. We report accuracy for the different localizations schemes. Each scheme is evaluated only on the questions it applies to (localizable entities): Name, Curr., Loc. and Num..
Certain dialects are more vulnerable Results in Table 10 and Table 11 also reveal consistent model under-performance across both the translated and localized Moroccan MWPs in particular.
The largest drops in accuracy between translation-only and localization occur for MSA and Egyptian (-3.3 points each).
Statistical significance varies across different models Table 3 shows that, for flagship models that are large size, the results are not statistically significant.3 This does not indicate invariance, as upon further investigation, the models do not incorrectly answer the same questions across the translated and the localized MWPs. In smaller models such as Nile-Chat ([29]) and Atlas-Chat ([30]), however, the differences between translated and localized are statistically significant. This can indicate that these Arabic-centric models are more sensitive to regional differences. One possible explanation is that localizing MWPs can introduce challenges for these smaller models, and may result in performance degradation. Thus, the accuracy results do not provide a unified result: while some models show little change when introducing localizations, the MWPs that the models could correctly answer can differ. We further investigated this behavior focusing on Gemma 4 models through interpretability study, to understand the models behavior under localization.
Interpretability
We investigate the impact of localizations on a model’s ability to answer MWP correctly. Our hypothesis is that the model’s internal residual-stream trajectory changes, and so does the answer.
Sampling robustness of localization effects For each problem, we compare a baseline prompt (Translated) against localized variants (Localized) on the Gemma 4 models only for tractability. We divide examples into four groups: both correct, both wrong, baseline correct/localized wrong, and baseline wrong/localized correct. We refer to the latter two groups as discordant examples. We compute Root Mean Square (RMS) trajectory distances by model, dialect, localization scheme, layer, and correctness group to whether localized and non-localized versions diverge when correctness changes.
We use activation patching to test whether localization-relevant activations causally drive the observed discordant behavioral shifts. We patch entity-span representations in both directions and check if the model’s answer and residual trajectory shift toward the source condition. We compare source patching to controls: no patching, self-patching, shuffled non-localized sources, and patching an unrelated same-length span (See Appendix § 14 and Figure 3). We then tested whether localization effects could be explained by ordinary stochastic decoding. We generated three samples for the translated condition and three for the localized condition and compared seed-to-seed residual-stream RMS distances against matched translated-to-localized RMS distances.

Figure 3. Activation patching correctness by baseline. Source patching partially recovers source-condition behavior on discordant examples.
Localization changes which examples are solved Table 3 shows that aggregate accuracy is broadly stable across localization schemes for Gemma 4 models. However, Table 13 shows that paired outcomes are not stable. Under localization, models produce 316 discordant outcomes over 3,582 localizable pairs, corresponding to a discordance rate of 8.8%, while the mean accuracy change is -1.2. Thus, aggregate accuracy alone masks the effect: localization moves individual examples between the correct and the incorrect sets.
| Scheme | Discordant | Discord. rate | mean acc. | Localized only / Baseline only | |
| All | 3582 | 316 | 8.8% | −1.2 pp | 136 / 180 |
| Names | 3570 | 311 | 8.7% | −0.2 pp | 152 / 159 |
| Currency | 1566 | 153 | 9.8% | −3.0 pp | 53 / 100 |
| Location | 519 | 29 | 5.6% | +0.2 pp | 15 / 14 |
| Numerals | 3987 | 217 | 5.4% | +0.3 pp | 114 / 103 |
| Total | 13224 | 1026 | 7.8% | −0.6 pp | 470 / 556 |
Table 13. Paired discordance by localization scheme, pooled across the three Gemma4 models and six dialects. Only eligible, quality-filtered pairs are included for each scheme, so varies by scheme. The final column reports cases where only the localized prompt is correct and where only the translated baseline is correct; these totals match the discordant-group sizes in Table 12. Accuracy is localized minus translated accuracy in percentage points.
Smaller models are more sensitive, but larger models are not invariant The discordance effect decreases with model scale. Table 4 shows that, under full localization, Gemma4-2B has the highest discordance rate at 12.9%, while Gemma4-26B has the lowest at 5.6%. Larger models are therefore more stable under localization, but they exhibit paired examples where the baseline and localized prompts differ in correctness. This supports the idea that localizations can alter model predictions even for larger models.
| Model | Discord. | Discord. Rate | Mean Acc. | |
| Gemma4-2B | 1,194 | 154 | 12.9% | −1.7 pp |
| Gemma4-4B | 1,194 | 95 | 8.0% | −1.8 pp |
| Gemma4-26B | 1,194 | 67 | 5.6% | −0.3 pp |
Table 4. Model-level paired discordance under full localization. Smaller models are more sensitive, but localization effects remain present across scales. We exclude the 51 non-localizable MWPs that have differences in the numerals used and have slight discordance; however, we find it more interesting to study discordance among examples with bigger localization differences.
Correctness flips coincide with large residual-stream trajectory shifts We next ask whether paired behavioral changes correspond to changes
in internal computation. Figure 5 and Table 12 summarize the main mechanistic result: examples that remain correct in both conditions have small residual-stream distances, while examples that flip correctness have much larger distances (Figure 4 support the same conclusion). Pairs correct in both baseline and localized forms have mean RMS around 0.29.

Figure 4. Residual-stream path distance by correctness group; dashed line = unrelated-problem average.
| Correctness group | Mean RMS | |
| Baseline only correct | 556 | 1.50 |
| Localized only correct | 470 | 1.50 |
| Neither correct | 2722 | 1.22 |
| Both correct | 9476 | 0.29 |
Table 12. Mean residual-stream RMS distance by paired correctness group, pooled across the three Gemma4 models, six dialects, and localization schemes. Discordant examples exhibit substantially larger trajectory shifts than examples that are correct in both conditions.

Figure 5. Residual-stream RMS distance by paired correctness group. Discordant examples show substantially larger trajectory separation than examples that remain correct in both conditions.
In contrast, pairs where only the baseline is correct have mean RMS around 1.50, and pairs where only the localized version is correct have mean RMS around 1.50. Pairs wrong in both conditions are intermediate, with mean RMS around 1.22. This supports the hypothesis that when localization changes the answer, it also moves the model onto a different residual-stream trajectory.
Table 14 shows that matched translated-to-localized residual-stream distances exceed within-translated seed-to-seed distances in 17 of 18 model–dialect cells (although Gemma4-2B MSA is very close to a tie at 1.004). The effect is most pronounced for Gemma4-26B, whose localization-to-sampling RMS ratios range from 1.07 to 1.45. Gemma4-2B shows smaller shifts, with ratios from 1.004 to 1.214, while Gemma4-4B is more variable and falls below 1 only for MSA (0.97). Localization correctness-flip rates exceed sampling flip rates in 13 of 18 cells, are equal in one, and are lower in four. Thus, localization generally changes residual trajectories and correctness more than seed variation alone, although the magnitude depends on the model and dialect. These results suggest that the localization effect is not explained solely by stochastic decoding, but they do not independently establish a causal mechanism.
| Model | Dialect | Loc./S. RMS | Samp. flip | Loc. flip |
| Gemma4-2B | MSA | 1.004 | 16.0% | 12.0% |
| Gemma4-2B | EGY | 1.025 | 12.0% | 13.3% |
| Gemma4-2B | JOR | 1.214 | 4.0% | 14.7% |
| Gemma4-2B | KSA | 1.024 | 9.3% | 11.3% |
| Gemma4-2B | MOR | 1.111 | 13.3% | 18.7% |
| Gemma4-2B | UAE | 1.043 | 9.3% | 12.0% |
| Gemma4-4B | MSA | 0.965 | 4.0% | 6.7% |
| Gemma4-4B | EGY | 1.140 | 4.0% | 8.0% |
| Gemma4-4B | JOR | 1.091 | 4.0% | 6.0% |
| Gemma4-4B | KSA | 1.083 | 16.0% | 12.0% |
| Gemma4-4B | MOR | 1.158 | 8.0% | 8.0% |
| Gemma4-4B | UAE | 1.153 | 5.3% | 4.7% |
| Gemma4-26B | MSA | 1.197 | 2.7% | 3.3% |
| Gemma4-26B | EGY | 1.259 | 5.3% | 6.0% |
| Gemma4-26B | JOR | 1.073 | 6.7% | 4.0% |
| Gemma4-26B | KSA | 1.221 | 9.3% | 11.3% |
| Gemma4-26B | MOR | 1.182 | 4.0% | 4.7% |
| Gemma4-26B | UAE | 1.449 | 1.3% | 5.3% |
Table 14. Sampling robustness under full localization. Each model–dialect cell uses up to 50 matched problems and three generation seeds. Loc./S. RMS is the ratio of matched translated-to-localized RMS distance to within-translated seed-to-seed RMS distance, computed from unrounded mean values. Values above 1 indicate that localization changes residual trajectories more than sampling variation in the translated condition: this holds in 17 of 18 cells (smallest margin 1.004 for Gemma4-2B/MSA); the only exception is Gemma4-4B/MSA (0.965, italicized). Bold marks the largest ratio within each model. Flip rates report correctness changes across the corresponding paired comparisons; localization flip rates exceed sampling flip rates in 13 of 18 cells, equal them in 1, and fall below in 4.
Activation patching supports a causal role for entity-span representations As shown in Figure 3, RMS shifts show that answer flips coincide with trajectory changes, but do not establish causality. We therefore patch residual representations at the changed localization spans in both directions on discordant examples. Source patching outperforms the control-span baseline, reaching 54.7% best-layer correctness and a 0.31 best-layer source-closeness gain, compared with 35.7% and 0.22 for unrelated-span patching. This supports a causal role for representations in shifting the target toward both the source answer and source residual trajectory, although it does not isolate an exclusively example-specific semantic mechanism.
The effect is localized to entity spans, but not uniquely to matched entity identity The shuffled-source baseline is also strong, reaching 52.3% best-layer correctness and a 0.31 best-layer source-closeness gain, close to the matched source-patching results of 54.7% and 0.31. Because this control patches changed-span activations from mismatched examples, its performance suggests that recovery is not driven solely by transferring the exact matched name, location, currency, or numeral representation. We interpret the results as evidence that representations at localized spans are causally relevant, while the small gap between matched and shuffled sources leaves unresolved whether the operative signal encodes specific entity identity, a general source-condition representation, or a broader residual-state feature associated with those spans.
To summarize our results, these mechanistic shifts reveal that culturally adapting a MWP does not merely alter its surface vocabulary—it fundamentally changes the model’s reasoning pathway. This proves that benchmarks relying solely on translated text may mask vulnerabilities in a model’s real-world problem-solving capabilities.
Error Analysis
To further understand the results, we perform manual analysis of errors in UAE and JOR by categorizing the errors into five categories: (a) Reasoning/setup error, when the model is providing incorrect interpretation from the beginning (e.g., units); (b) Final step error, where reasoning is correct but the final step is wrong.; (c) Missing step, when a model fails to include a necessary step.; (d) localization error, when the model struggles with localized entities; and (e) translation error. Among the analyzed errors, reasoning/setup errors such as misinterpreting the percentage/proportional relationships is the most frequent category, or incorrect interpretation of comparative expressions such as ’double’. We observed arithmetic errors, such as providing the wrong sum. In Figure 6, the first example 175 + 140 + 280 is 595 not 695.

Figure 6. Examples of errors in Jordanian Arabic.
Some examples produced alternative but internally consistent interpretations of the problem statement. This could suggest that Some errors arise from ambiguity in the problem formulation rather than from incorrect reasoning. Interestingly, in the UAE dataset, we observe that incorrect MWP is because the reasoning language is Chinese (see examples in Appendix § 15 from JOR and UAE).
Conclusion and Future Work
We introduced DAR-MGSM, the first manually curated benchmark for mathematical reasoning across five Arabic dialects and Modern Standard Arabic, with parallel translated-only and culturally localized versions. Our evaluation of eleven LLMs showed that localization generally reduces accuracy and can substantially change which problems models solve correctly, even when overall performance remains similar. Interpretability analysis linked these changes to shifts in internal representations. These findings highlight the importance of evaluating mathematical reasoning across both linguistic varieties and cultural contexts.
In future work, we plan to expand DAR-MGSM’s coverage and to investigate methods for improving reasoning consistency across equivalent problem formulations. We also aim to extend this evaluation approach to other multilingual settings, supporting the development of educational AI that work reliably across languages and local contexts.
Limitations
DAR-MGSM covers five Arabic dialects and Modern Standard Arabic, with results scoped to these varieties and the evaluated models. Cultural localization focuses on names, locations, currencies, and numeral conventions rather than all aspects of cultural context. Localization applies only to problems containing relevant entities, so comparisons for individual localization categories use the corresponding subsets.
Ethics
DAR-MGSM is derived from MGSM-Rev2, which is distributed under the CC BY-SA 4.0 license. We use and adapt the source data in accordance with its license terms and provide attribution to its creators. The benchmark is intended to support research on mathematical reasoning across Arabic varieties and cultural contexts.
Annotator Demographics
| ID | Dataset | Native | Residence | Age | Gender | Degree | Task | Background |
| A1 | MSA | EGY | EGY | 30s | F | PhD | T | L, LA |
| A2 | MSA | UAE | UAE | 40s | F | MA | R | L, CL |
| A3 | MSA | PAL | UAE | 30s | F | PhD | V | CL |
| A4 | EGY | EGY | EGY | 30s | F | PhD | T | L, LA |
| A5 | EGY | EGY | UAE | 40s | F | MA | R | L, CL |
| A6 | EGY | PAL | UAE | 30s | F | PhD | V | CL |
| A7 | JOR | JOR | JOR | 30s | M | BA | T | L, LA |
| A8 | JOR | PAL | UAE | 30s | F | PhD | R | CL |
| A9 | JOR | PAL | UAE | 30s | F | PhD | V | CL |
| A10 | KSA | KSA | KSA | 20s | F | BA | T | CS |
| A11 | KSA | KSA | KSA | 30s | F | BA | R | LA |
| A12 | KSA | PAL | UAE | 30s | F | PhD | V | CL |
| A13 | MOR | MOR | MOR | 20s | M | MA | T | CS |
| A14 | MOR | MOR | MOR | 30s | M | BA | R | LA |
| A15 | MOR | PAL | UAE | 30s | F | PhD | V | CL |
| A16 | UAE | UAE | US | 40s | F | PhD | T | LA |
| A17 | UAE | UAE | UAE | 20s | M | MS | R | LA |
| A18 | UAE | PAL | UAE | 30s | F | PhD | V | CL |
Table 5. Annotator demographics and roles for the translation task. There are three roles: Translate (T), Review (R), and Validate (V). The annotator background experience includes: Linguistics (L), Linguistic Annotator (LA), Computational Linguist (CL) and Computer Science (CS). All annotators are native speakers of Arabic, and they worked on their own native dialect or a dialect spoken in a country where they resided in. Annotators were paid $15/hr.
| Variety | Corrected / Total | Rate |
| MSA | 124/250 | 49.6% |
| Egyptian | 41/250 | 16.4% |
| Jordanian | 77/250 | 30.8% |
| Moroccan | 90/250 | 36.0% |
| Emirati | 70/250 | 28.0% |
| Saudi | 10/250 | 4.0% |
Table 6. Number and percentage of problems requiring major edits or retranslation during internal quality assurance after handling the translations by our external vendor. Counts refer to problems, rather than individual edits, and describe corrections during dataset construction. These figures describe corrections during dataset curation, rather than residual error rates in the final benchmark. We conducted an additional internal quality assurance pipeline.
Translation Guidelines
These are the guidelines as they were presented to our annotators.
Math Translation Guidelines
This task involves translating math problems in English into Arabic dialects and reviewing them for accuracy, fluency and naturalness. Each translation task is performed by two translators: one responsible for the translation, the other for reviewing it. See below for the translator and reviewer tasks for clear instructions (see example sheet in the appendix below).
You are provided with a translation request in an Excel sheet with four columns as detailed below:
| Column | Content | Description |
| A | English source text | This is the original source text in English |
| B | Dialect Translation | This is to add the translation in your dialect |
| C | Reject/Accept (choose one from list) | Choose whether you accept or reject the translation from the provided list |
| D | Justification (If Column C is “Reject”) | If you rejected the translation, please provide an explanation of why it was rejected |
Table 1 (PDF p. 13).
Responsibilities and task description (for more details check the general instructions):
The translator’s task
Preparation
Open the excel file provided to you and ensure it is titled in your dialect.
Ensure it has all four columns with the English source (Col A), Dialect Translation (Col B), Reject/Accept (Col C), and Justification (Col D).
Translation
Read the full sentence to ensure you understand it before translating.
Translate the math problem from English (Column A) to your native dialect (Column B).
Use simple, concise, and direct language, maintaining the original meaning and clarity of the question.
After finishing the translation, make sure to check for the following:
Is the translation clear?
Does it sound natural in my dialect?
The reviewer’s task
Review the translation
Review the translation in Column B.
Decide whether to accept or reject the translation based whether it meets the following requirement:
The translation should accurately reflect the meaning of the English text.
The names of places/proper nouns/currency should be kept as is.
The translation should sound natural in your dialect, with minimal overlap with MSA.
Borrowed words should be used naturally. For instance, is the word ايميل used and not بريد الكتروني as applicable per dialect.
The translation should follow the grammatical rules of your dialect.
Feedback
If rejecting, provide a justification in Column D.
As a quality assurance step, we will review accepted translations randomly to check the quality of the review process. A satisfactory translation would be following the checklist and general instructions in the guidelines.
General instructions:
Confidence in translation: Only work on a sheet if you are confident in your translation capabilities for each specific question. Do not translate in cases where you doubt your understanding of the question. In such cases, simply move to the next line to avoid unnecessary effort. Please add a note of explanation in the comment column.
Support tools: It is acceptable to use dictionaries or term bases to find the most suitable term for a word in a sentence. However, automatic translation is strictly forbidden as these translated texts will be part of a scientific study that cannot be influenced by translation technology.
Make sure that the final translation reads like a question-answer conversation. For example:
EN: Salem goes on a hiking trip for 3 days. The length of the trail is 24 kilometers. If he walks the same number of kilometers a day, how many kilometers will he walk every day?
MSA: يقوم سالم برحلة مشي على الاقدام تستغرق ٣ ايام. ويفترض انه سيمشي اجمالا مسافة قدرها ٢٤ كيلومترا. اذا كان يمشي نفس عدد الكيلومترات يوميا فكم عدد الكيلومترات التي سيمشيها في اليوم؟
PA: سالم رايح رحلة لثلاث ايام. لنفرض انو رح يمشي ٢٤ كيلومتر خلال كل الرحلة. اذا مشى نفس عدد الكيلومترات يوميا قديش بطلع ماشي بكل يوم؟
Do not try to invent terms to make your translation “appear dialectical”. This holds the same for terms that do not have an equivalent term in Arabic (e.g. house flipping), please provide a brief description.
For borrowed words in your variety, use the borrowed word as is to mimic the real dialect use. For instance, if the word "email" is commonly used in its transliterated form in your dialect (not translated as "بريد إلكتروني"), use the form "إيميل".
While spelling variation is expected, it is advised to maintain consistent spelling for recurring dialectal terms within one dialect, For example, in the Egyptian dialect, the future tense is usually marked with ه at the beginning of the verb, like هكلمك ("I will call you"). Some speakers, however, prefer to use ح instead of ه, as in حكلمك. Whichever variant is used should be consistent for the dialect. See more details on acceptable variants in the orthographic guidelines part below.
Maintain consistency with the number format in the source dataset. Use digits when digits are provided, and words when numbers are written out (e.g., dozens, fractions, or dual forms), as this reflects the dataset’s structure. For instance, if you have the number one written out in digits as ‘1’, then keep it as is (even if this does not follow the Arabic language rules).
Any numeral system (Hindi-Arabic (١،٢،٣...) or Arabic (1,2,3...)) is acceptable in this dataset, use whatever is natural for your writing. This holds true for punctuation marks as well. See the table below for acceptable number/punctuation marks variants.
Entities such as proper nouns (e.g. names of places, people, organisations, and products) and units of measurement such as currencies, metres, miles, etc. should remain as is, please do not localize them for this task.
Orthographic Guidelines
Since DA has no official orthography standards, Arabs writing in DA tend to use a set of variant spellings that either capture the utterance phonology primarily or are inspired by Modern Standard Arabic spelling decisions (etymological or historical spelling) (Habash et al., 2018). These are considered dialectical variants, where they do not impact readability and comprehension, but a variant is used consistently in a dialect. In cases where a variation affects readability, comprehension, or changes the meaning, the variant should be considered a spelling error. For example, the word "سأل" when written with a hamza (سأل) means asked, whereas when written without a hamza (سال) it means spelled or leaked. Since the hamza alters the meaning, using the wrong form would be treated as a spelling error.
The following is a motivating example from Habash et al., (2018) showing 20+ spellings of the Egyptian Arabic word /mabiʕulhaː/ ‘he does not say it’ and their frequencies from a Google Search (September 29, 2017). Since all of these variants clearly indicate the intended meaning, they are all acceptable variants for the purpose of our task at hand. Note that the variations include different decisions on how to represent the glottal stop whose MSA cognate is /q/, shortened long vowels, attaching or detaching the negation proclitic ma/m, etc.
| Arabic Orthography | Arabic Transliteration | Frequency |
| ميبغلوهاش | mbyqwl hAš | ≈ 26,000 |
| ما بيقولهاش | ma byqwl hAš | ≈ 13,000 |
| ما بقولهاش، ما بيقولهاش، مبيقولهاش، ما يقولهاش، مابيقولهاش | mA bqwl hAš, mbqwl hAš, ma byl hAš, ma byqwl hAš | ≤ 10,000 |
| ما يقولهاش، ما بيقولهاش، مبيقولهاش | mA byqwl hAš, mA byqlhAš, mbqwl hAš | ≤ 1,000 |
| ما بيقولهاش، مبيقولهاش، ما يقولهاش | mA byqlhAš, mA byqwl hAš, mbqwl hAš | ≤ 100 |
| ما يقولهاش، مبيقولهاش، ما بيقولهاش، مبيقولهاش، ما يقولهاش، ما بيقولهاش، مبيقولهاش | mA byqwl hAš, mbqwl hAš, mA byqlhAš, mA byqwl hAš, mbqwl hAš, mA byqlhAš | ≤ 10 |
Table 1 (PDF p. 15).
We present below a list of common orthographic phenomena that we consider as dialectal variants. Some of these are the result of letter shape similarity and other phonological similarities. Please note, that not all “similar letters” are acceptable variants: if they are visually similar but phonologically not similar (don’t sound similar), they are most likely errors.
| Variant Set Name | Variant Characters | Dialectal Variants Examples |
| Ta Marbuta /Ha | ة / ه | قارة أفريقيا الغنيه / قارة أفريقيا الغنية |
| Alif Maqsura/Ya | ى/ي | إزيك يا على! / إزيك يا علي! سلملي علي الجيران! / سلم لي على الجيران! |
| Alif Hamzas | أ/إ/آ/ا | اهأل ياجدعآن / أهال يا جدعان |
| Hamza Forms | ؤ/ئ/ء/إ/أ | علماؤهم / علماءهم / علمائهم |
| Etymological Variants | ق / أ/إ/ؤ/ئ/ء | أنا قلبي دليلي / أنا ألبي دليلي |
| Etymological Variants | ت / ط | هادا الفسطان حلو / هادا الفستان حلو |
| Etymological Variants | ت/ث | حبيتك كثير / حبيتك كتير |
| Etymological Variants | ز/ض | الزابط واقف هناك / الضابط واقف هناك |
| Etymological Variants | د/ذ/ز | دنب الكلب / ذنب الكلب ذنبك على جنبك / زمبك على جمبك |
| Splits | و، ب، ك، ل، ح | ح نشوف و ح نعرف / حنشوف وحنعرف |
| Merges | ما ، يا، ال | ماشفت / ما شفت يامحمد / يا محمد التحكي / ال تحكي |
| Shortening & Lengthening | و/ ، ا/ ،ي/ | شوفت اللي عماله ؟ شفت اللي عاماله؟ |
Table 2 (PDF p. 15).
| (long vowel spelling variant of short vowel spelling via elided diacritics) |
It is not possible to create a full, exact list of acceptable variants for all possible contexts, as some contexts can lead the reader to a different unintended meaning. For example, while Ta Marbuta and Ta Mamduda may be interchangeable safely in contexts like الحارة جمعية / الحاره جمعيت they may not be in limited contexts like حركة الجدعان / حركت الجدعان.
Acceptable number/punctuation marks variants
| 1,2,3,4... | .... ٤ ،٣ ،٢ ،١ |
| % | ٪ |
| , | ، |
| ; | ؛ |
| : | ؛ |
| ? | ؟ |
Table 1 (PDF p. 16).
Appendix A
Screenshot of Excel sheet
Figure 1 (PDF p. 16). Screenshot of Excel sheet
Localizations
| EN | MSA | EGY | JOR | KSA | MOR | UAE | |
| Avg. local./MWP | 5.79 | 5.30 | 5.32 | 5.64 | 5.55 | 5.59 | 5.40 |
Table 7. Number of localizations made per line on EN data compared to the other dialects.
Additional Details on the Experimental Setup
| Model | Identifier | Ar | En | Access | Licence |
| 1 Atlas-Chat-2B | MBZUAI-Paris/Atlas-Chat-2B | • | Local | Gemma ToU | |
| 2 Nile-Chat-4B | MBZUAI-Paris/Nile-Chat-4B | • | Local | Gemma ToU | |
| 3 Atlas-Chat-9B | MBZUAI-Paris/Atlas-Chat-9B | • | Local | Gemma ToU | |
| 4 c4ai-r7b | CohereLabs/c4ai-command-r7b-arabic-02-2025 | • | • | Local | CC BY-NC 4.0 |
| 5 Jais2-8B-Chat | inception42/Jais-2-8B-Chat | • | • | Local | Apache 2.0 |
| 6 Qwen2.5-7B | Qwen/Qwen2.5-7B-Instruct | • | • | Local | Apache 2.0 |
| 7 Gemma4-2B | google/gemma-4-E2B-it | • | • | Local | Apache 2.0 |
| 8 Gemma4-4B | google/gemma-4-E4B-it | • | • | Local | Apache 2.0 |
| 9 Gemma4-26B | google/gemma-4-26B-A4B-it | • | • | Local | Apache 2.0 |
| 10 Qwen-3.6 | qwen/qwen3.6-plus | • | • | OpenRouter | API terms |
| 11 GPT-5.4 | openai/gpt-5.4 | • | • | OpenRouter | API terms |
Table 9. Evaluated models, in the order of Table 3. Identifiers refer to the Hugging Face Hub (local models) or OpenRouter (API models). Ar and En mark the languages each model supports (Arabic, English). Gemma ToU: Google’s Gemma Terms of Use, inherited from the Gemma base models of Atlas-Chat and Nile-Chat. Gemma4-2B and Gemma4-4B are the E2B and E4B variants (2B and 4B effective parameters); Gemma4-26B is a mixture-of-experts model with 4B active parameters.
Decoding Reasoning (thinking) is disabled for GPT-5.4, Qwen-3.6 and the Gemma 4 models. All local models and Qwen-3.6 use greedy decoding (temperature 0). OpenRouter does not pass a temperature setting to GPT-5.4, so GPT-5.4 uses the provider’s default sampling. Each model is run once per variety and condition; no scores are averaged over repeated runs. Responses that reach the token limit are scored as generated.
Prompting Except for the Gemma 4 models, every model receives the instruction in § 4 as the system message and the problem as the user message, formatted with the model’s own chat template; when a template has no system role, the instruction is prepended to the user message. These models generate at most 1,024 new tokens.
Gemma 4 The Gemma 4 models use the pipeline of the interpretability analysis (§ 5.2) with greedy decoding: at most 512 new tokens, the system prompt “You are a helpful assistant.”, and an instruction to end with “Final answer: [number]”.
Hardware The Arabic-centric models and Qwen2.5-7B run in bf16 without quantization on a single NVIDIA A100 40GB GPU. The Gemma 4 models run on a machine with 4 Intel Xeon Gold 6150 CPU cores (2.70 GHz) and a single NVIDIA Tesla V100-SXM2 32GB GPU. GPT-5.4 and Qwen-3.6 are queried through OpenRouter, at a total cost of approximately $100.
Run-to-run variation In MSA, the place-only and currency-only questions are identical to the translated ones, so any difference between these three conditions reflects run-to-run variation, not localization. Seven of the eleven models give identical answers in all three. For the other four, accuracy varies by at most 0.8 points (2.8 for Qwen-3.6), and the average over all models varies by only 0.2 points.
Interpretability
Results
Activation Patching Procedure
We use activation patching to test whether correctness changes on discordant examples are causally linked to the localized entity tokens. A discordant example is one where the model answers correctly in one condition but incorrectly in the other, e.g., the translated non-localized prompt is correct while the localized prompt is wrong, or vice versa. For each such pair, we run patching in both directions: from the non-localized prompt into the localized prompt, and from the localized prompt into the non-localized prompt. If the localized entity representation is causally involved in the answer flip, then replacing the target prompt’s entity-span residual stream with the source prompt’s corresponding entity-span residual stream should move the patched generation toward the source condition, both in answer correctness and in residual-stream geometry.
Let denote the source prompt and denote the target prompt. The source is the condition whose internal representation we patch from, and the target is the condition whose forward pass is modified. For each transformer layer , we run the target prompt while replacing selected residual-stream vectors at selected token positions with the corresponding source residual-stream vectors:
where is a target token position and is the matched source token position. We then decode from the patched target run and evaluate whether the patched answer becomes correct, whether it matches the source answer, and whether the patched residual trajectory moves closer to the source trajectory.
Span identification. For each localized/non-localized prompt pair, we first identify the changed text spans between the two problem statements. Rather than assuming a fixed name list, we compare the two strings and extract the non-matching contiguous spans in order of appearance. These spans are then paired by order: the first changed span in the localized prompt is paired with the first changed span in the non-localized prompt, the second with the second, and so on. This handles examples with multiple changed names, locations, or currencies without needing to decide manually which entity should correspond to which one. For source patching, we select the relevant localized entity span and its aligned non-localized span.
Tokenization and multi-token spans. After identifying character-level spans, we map each span to token positions using the model tokenizer and the final chat-formatted prompt. A single entity may correspond to one token or multiple tokens. For example, a name may be split into several sub-word tokens, and a location may occupy multiple Arabic or Latin-script tokens. We therefore patch spans as token sequences rather than as single tokens. If the source span tokenizes to positions
and the target span tokenizes to positions
we patch the aligned positions in order. When , this is a direct one-to-one token replacement. When the token lengths differ, we patch the overlapping prefix up to tokens. Thus, the operation remains localized to the aligned entity span while avoiding invalid assumptions about tokenizer granularity. The recorded source_token_count, target_token_count, and patch_token_count allow us to audit these cases.
Layer sweep. We repeat the patch for each residual-stream layer from early to late layers. This gives a layer-wise causal profile: if a name or location representation matters only after it has been integrated into the model’s reasoning state, patching should have stronger effects at those layers. For each layer, we generate an answer from the patched target run and compute both behavioral and geometric metrics.
Behavioral metric. The primary behavioral metric is patched correctness:
where is the gold answer. We also compare the patched answer to the clean source and clean target answers to see whether the patch moves the model toward the source condition.
Geometric metric. We also measure whether the patched residual trajectory moves closer to the source trajectory. Let be the residual-stream trajectory of the clean source run, the clean target trajectory, and the patched target trajectory after patching at layer . We compute RMS distances between trajectories:
The clean target-to-source distance is the unpatched baseline. The patched-to-source distance tells us whether the patch moved the target trajectory toward the source. We report a source-distance ratio:
and a source-closeness gain:
A positive gain means the patched run is closer to the source trajectory than the clean target was; a gain near zero means the patch did not move the trajectory; a negative gain means the patch moved it farther away.
Patching methods and controls. We compare the entity-span source patch against several controls:
source_patch: patch the matched entity span from the source condition into the target condition. This is the main causal intervention. If entity localization drives the correctness flip, this patch should move the target answer and residual trajectory toward the source condition.
no_patch: run the target condition without modifying activations. This gives the unpatched target behavior and residual trajectory.
self_patch: patch the target span using activations from the same target condition. This controls for the mechanics of patching itself; because the patched vectors come from the same condition, it should not systematically change behavior.
shuffled_source: patch from a source example that is not the matched problem. This tests whether any source-condition activation is sufficient, or whether the effect depends on the correct problem-matched entity representation.
control_span: patch an unrelated same-length span rather than the localized entity span. This tests whether the effect is specific to the entity tokens rather than caused by over-writing arbitrary positions in the prompt.
Interpretation. The causal prediction is that source_patch should outperform the controls on discordant examples: it should increase the probability of recovering the source-side correct answer and produce a positive source-closeness gain. Strong evidence requires that this effect is larger than self_patch, control_span, and shuffled_source; otherwise the result could be explained by patching artifacts, arbitrary position overwrites, or generic source-condition activations rather than the localized entity representation itself.
Error Analysis Examples
| Dialect | Subset | Question | Model Reasoning | Reference Answer | Generated Answer | Error Type |
| JOR | Translated | A treasure hunter found a buried treasure chest filled with gems. There were 175 diamonds, 35 fewer rubies than diamonds, and twice the number of emeralds than the rubies. How many of the gems were there in the chest? | إذا كان عدد الألماس 175، وعدد الياقوت أقل بـ 35 من عدد الألماس، فعدد الياقوت = 175 - 35 = 140. وإذا كان عدد الزمرد ضعف عدد الياقوت، فعدد الزمرد = 2 * 140 = 280. إذن، مجموع الجواهر بالصندوق = 175 + 140 + 280 = 695. The answer is: 695 | 595 | 695 | Final Step |
| JOR | Translated & Localized | Shireen is shoe shopping when she comes across a pair of boots that fit her shoe budget. However, she has to choose between the boots and two pairs of high heels that together cost five dollars less than the boots. If one pair of heels costs 33 dinars and the other costs twice as much, how many dinars are the boots? | To solve this problem, we first need to know the price of the shoes. Let's call the price of the shoes "x". We know that the price of the two heels is: - One heel: 33 dinars - The second heel: double the price of the first heel = 2 * 33 = 66 dinars We also know that the two heels are 5 dinars cheaper than the shoes, so we can write the following equation: Price of the shoes - 5 = Price of the two heels x = 33 + 66 x = 99 Therefore, the price of the shoes is 99 dinars. The answer is: 99 | 104 | 99 | Final Step |
| JOR | Translated & Localized | شيرين كانت تفتش عكنادر ولقت كندرة مناسبة لميزانيتها. بس كان لازم تختار يا إمّا الكندرة أو كعبين عالي اللي حقهم أرخص بخمس دنانير من الكندرة. إذا كان حق كعب واحد 33 دينار والكعب الثاني حقه ضعف الأول، قديش حق الكندرة بالدينار؟ | لحل هذه المسألة، نحتاج إلى معرفة سعر الكندرة أولًا. دعنا نسمي سعر الكندرة بـ "س". نعلم أن سعر الكعبين هما: - كعب واحد: 33 دينار - كعب الثاني: ضعف سعر الكعب الأول = 2 * 33 = 66 دينار نعلم أيضًا أن الكعبين أرخص بخمس دنانير من الكندرة، لذا يمكننا كتابة المعادلة التالية: سعر الكندرة - 5 = سعر الكعبين س = 33 + 66 س = 99 إذن، سعر الكندرة هو 99 دينار. The answer is: 99 | 104 | 99 | Final Step |
| JOR | Translated | واحد بدور على كنز لقى صندوق مدفون مليان جواهر. كان فيه 175 ألماسة، وعدد الياقوت أقل بـ 35 من عدد الألماس، وعدد الزمرد قد عدد الياقوت مرتين. قديش كان مجموع الجواهر بالصندوق؟ | إذا كان عدد الألماس 175، وعدد الياقوت أقل بـ 35 من عدد الألماس، فعدد الياقوت = 175 - 35 = 140. وإذا كان عدد الزمرد ضعف عدد الياقوت، فعدد الزمرد = 280 = 140 * 2. إذن، مجموع الجواهر بالصندوق = 280 + 140 + 175 = 695. | 595 | 695 | Final Step |
Table 6 (PDF p. 25).

Figure 7. Examples of errors in Emirati Arabic.
| Dialect | Subset | Question | Model Reasoning | Reference Answer | Generated Answer | Error Type |
| UAE | Translated | Kylar went to the store to buy glasses for his new apartment. One glass costs $5, but every second glass costs only 60% of the price. Kylar wants to buy 16 glasses. How much does he need to pay for them? | To calculate how much Kyler needs to pay to buy 16 glasses, we first need to know the price of the second glass. If the first glass costs $5, then the second glass will cost 60% of 5 * 60% = $3. Now, we know the second glass costs $3. To buy 16 glasses, Kyler will need to pay: 16 glasses * $5 (for the first glass) + 15 glasses * $3 (for the second glass, since 16 - 1 = 15) 16 * 5 + 15 * 3 = 80 + 45 = $125 Therefore, Kyler needs to pay $125 to buy 16 glasses. The answer is: $125 | 64 | 125 | Reasoning Error | ||||
| UAE | Translated & Localized | If Hamdan does half as much laundry as Tulin, and Tulin does 4 times as much laundry as Rabia, calculate the difference in the amount of laundry Hamdan and Rabia do if Tulin does 400 pounds of laundry. | If Tulin washes four times as much laundry as Rabia, then Rabia washes 400 pounds / 4 = 100 pounds of laundry. Therefore, the difference between the amount of laundry Hamdan and Rabia wash is: 400 pounds - 100 pounds = 300 pounds. The answer is: 300 | 100 | 300 | Reasoning Error |
Table 7 (PDF p. 26).
References
- [1]Reem Alenezi and Ayed Atallah Salman. 2026. On LLM prompting techniques for Arabic language arithmetic reasoning. In The 7th Workshop on Open-Source Arabic Corpora and Processing Tools (OS-ACT7) with 5 Shared Tasks, pages 106–114, Palma, Mallorca (Spain). Association for Computational Linguistics.DOI
- [2]Reem Alghamdi, Zhenwen Liang, and Xiangliang Zhang. 2022. ArMATH: a Dataset for Solving Arabic Math Word Problems. In Proceedings of the Language Resources and Evaluation Conference, pages 351–362, Marseille, France. European Language Resources Association.DOI
- [4]Muhammad Hasan Amara. 1996. Arabic Diglossia in the Classroom Assumptions and Reality. In Language and culture in the Near East, pages 131–142. Brill.DOI
- [5]Tamer Amin and Diala Badreddine. 2020. Teaching science in Arabic: diglossia and discourse patterns in the elementary classroom. International Journal of Science Education, 42(14):2290–2330.DOI
- [6]Nora Belrose, Zach Furman, Logan Smith, Danny Halawi, Igor Ostrovsky, Lev McKinney, Stella Biderman, and Jacob Steinhardt. 2023. Eliciting Latent Predictions from Transformers with the Tuned Lens. CoRR, abs/2303.08112.arxiv.org/abs/2303.08112
- [7]Trenton Bricken, Adly Templeton, Joshua Batson, Brian Chen, Adam Jermyn, Tom Conerly, Nick Turner, Cem Anil, Carson Denison, Amanda Askell, Robert Lasenby, Yifan Wu, Shauna Kravec, Nicholas Schiefer, Tim Maxwell, Nicholas Joseph, Zac Hatfield-Dodds, Alex Tamkin, Karina Nguyen, and 6 others. 2023. Towards monosemanticity: Decomposing language models with dictionary learning. Technical report, Anthropic.
- [8]Nuo Chen, Zinan Zheng, Ning Wu, Ming Gong, Dongmei Zhang, and Jia Li. 2024. Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 7001–7016, Miami, Florida, USA. Association for Computational Linguistics.arxiv.org/abs/2310.20246
- [9]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training Verifiers to Solve Math Word Problems. arXiv preprint arXiv:2110.14168.arxiv.org/abs/2110.14168
- [10]Mahbub E Sobhani, Md. Faiyaz Abdullah Sayeedi, Tasnim Mohiuddin, Md Mofijul Islam, and Swakkhar Shatabda. 2026. MathMist: A parallel multilingual benchmark dataset for mathematical problem solving and reasoning. In Findings of the Association for Computational Linguistics: EACL 2026, pages 2524–2550, Rabat, Morocco. Association for Computational Linguistics.
- [11]Nelson Elhage, Tristan Hume, Catherine Olsson, Nicholas Schiefer, Tom Henighan, Shauna Kravec, Zac Hatfield-Dodds, Robert Lasenby, Dawn Drain, Carol Chen, Roger Grosse, Sam McCandlish, Jared Kaplan, Dario Amodei, Martin Wattenberg, and Christopher Olah. 2022. Toy models of superposition. Technical report, Anthropic.arxiv.org/abs/2209.10652
- [12]Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, and 6 others. 2021. A Mathematical Framework for Transformer Circuits. Technical report, Anthropic.
- [13]Farhan Farsi, Farnaz Aghababaloo, Shahriar Shariati Motlagh, Parsa Ghofrani, MohammadAli Sadraei-Javaheri, Shayan Bali, Amir Hossein Shabani, Farbod Bijary, Ghazal Zamaninejad, AmirMohammad Salehoof, and Saeedeh Momtazi. 2025. MELAC: Massive Evaluation of Large Language Models with Alignment of Culture in Persian Language. In Proceedings of the 14th International Joint Conference on Natural Language Processing and the 4th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics, pages 1933–1950, Mumbai, India. The Asian Federation of Natural Language Processing and The Association for Computational Linguistics.
- [14]Charles A Ferguson. 1959. Diglossia. Word, 15(2):325–340.
- [15]Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2021a. Measuring Massive Multitask Language Understanding. In International Conference on Learning Representations.
- [17]Huy Hoang Ha. 2025. Pensez: Moins de données, meilleur raisonnement – repenser les LLM français. In Actes des 32ème Conférence sur le Traitement Automatique des Langues Naturelles (TALN), volume 1 : articles scientifiques originaux, pages 573–598, Marseille, France. ATALA & ARIA.
- [18]Xu Huang, Wenhao Zhu, Hanxu Hu, Conghui He, Lei Li, Shujian Huang, and Fei Yuan. 2025. MAX: A Comprehensive Multilingual Evaluation Suite for Large Language Models. In Findings of the Association for Computational Linguistics: EMNLP 2025, pages 16751–16774, Suzhou, China. Association for Computational Linguistics.
- [20]Rob Manson. 2025. Curved Inference: Concern-Sensitive Geometry in Large Language Model Residual Streams. Preprint, arXiv:2507.21107.arxiv.org/abs/2507.21107
- [21]Quinn McNemar. 1947. Note on the Sampling Error of the Difference Between Correlated Proportions or Percentages. Psychometrika, 12(2):153–157.
- [22]Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. 2022. Locating and editing factual associations in GPT. In Advances in Neural Information Processing Systems, volume 35, pages 17359–17372. Curran Associates, Inc.arxiv.org/abs/2202.05262
- [23]Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, and Jacob Steinhardt. 2023. Progress Measures for Grokking via Mechanistic Interpretability. In International Conference on Learning Representations.arxiv.org/abs/2301.05217
- [24]Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jones, Jackson Kernion, Liane Lovitt, and 7 others. 2022. In-context Learning and Induction Heads. Technical report, Anthropic.arxiv.org/abs/2209.11895
- [25]OpenRouter. 2026. OpenRouter: Unified API for Large Language Models. https://openrouter.ai. Accessed: 2026-05-22.
- [26]Jan-Thorsten Peter, David Vilar, Tobias Domhan, Dan Malkin, and Markus Freitag. 2026. Mind the gap... or not? How translation errors and evaluation details skew multilingual results. In Proceedings of the Fifth Workshop on Generation, Evaluation and Metrics (GEM), pages 191–204, San Diego, California, USA. Association for Computational Linguistics.
- [27]David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Dirani, Julian Michael, and Samuel R. Bowman. 2024. GPQA: A Graduate-Level Google-Proof Q&A Benchmark. In Proceedings of the First Conference on Language Modeling: COLM 2024, Philadelphia, PA, USA.arxiv.org/abs/2311.12022
- [28]Alan Saji, Raj Dabre, Anoop Kunchukuttan, and Ratish Puduppally. 2026. The Reasoning Lingua Franca: A Double-Edged Sword for Multilingual AI. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 2: Short Papers), pages 329–344, Rabat, Morocco. Association for Computational Linguistics.
- [29]Guokan Shang, Hadi Abdine, Ahmad Chamma, Amr Mohamed, Mohamed Anwar, Abdelaziz Bounhar, Omar El Herraoui, Preslav Nakov, Michalis Vazirgiannis, and Eric P. Xiong. 2025a. Nile-Chat: Egyptian Language Models for Arabic and Latin Scripts. In Proceedings of The Third Arabic Natural Language Processing Conference, pages 306–322, Suzhou, China. Association for Computational Linguistics.
- [30]Guokan Shang, Hadi Abdine, Yousef Khourbane, Amr Mohamed, Yassine Abbahaddou, Sofiane Ennadir, Imane Momayiz, Xuguang Ren, Eric Moulines, Preslav Nakov, Michalis Vazirgiannis, and Eric P. Xing. 2025b. Atlas-Chat: Adapting Large Language Models for Low-Resource Moroccan Arabic Dialect. In Proceedings of the First Workshop on Language Models for Low-Resource Languages, pages 9–30, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.arxiv.org/abs/2409.17912
- [31]Freda Shi, Mirac Suzgun, Markus Freitag, Xuezhi Wang, Suraj Srivats, Soroush Vosoughi, Hyung Won Chung, Yi Tay, Sebastian Ruder, Denny Zhou, Dipanjan Das, and Jason Wei. 2023. Language Models Are Multilingual Chain-of-Thought Reasoners. In International Conference on Learning Representations.arxiv.org/abs/2210.03057