1. Introduction
E-commerce has experienced substantial growth across the Arab world, with Saudi Arabia emerging as one of the region’s most dynamic digital markets. The Saudi e-commerce sector is projected to exceed US
$19.52 billion by 2030, driven by high smartphone penetration and widespread adoption of mobile shopping platforms [
1,
2]. As consumers increasingly rely on mobile applications for shopping, food delivery, travel booking, and daily services, interface design plays an important role in shaping user decisions. This rapid expansion has raised growing concerns about the ethical design practices of platforms operating in the region. Among the most pressing concerns in digital consumer protection is the proliferation of dark patterns, which are deceptive user interface (UI) design techniques that manipulate users into actions that may not align with their original intentions or interests [
3]. Such patterns are commonly used to encourage unintended purchases, create artificial urgency, obscure additional costs, complicate cancellation processes, or pressure users into disclosing unnecessary personal information. In e-commerce settings, these practices can directly affect consumer autonomy, transparency, and trust. Examples include countdown timers that imply limited availability, hidden delivery or service fees revealed late in the checkout process, misleading subscription prompts, and interface flows that make cancellation or opt-out actions unnecessarily difficult.
Dark patterns are particularly important in mobile commerce because mobile interfaces are often space-constrained, fast-paced, and highly persuasive. Users frequently interact with mobile shopping applications through short UI text, buttons, pop-ups, notifications, promotional banners, and checkout messages. These textual elements are brief but influential, making them suitable targets for automated text-based detection. In our annotated sample from nine e-commerce mobile applications operating in Saudi Arabia, dark pattern cues were identified in 75.8% of UI text instances. Because the dataset was purposively collected from UI strings containing potential dark pattern cues and comparable non-dark-pattern examples, this percentage should not be interpreted as a prevalence estimate for all UI text in the selected applications. Rather, it indicates that potentially deceptive or manipulative interface language appears across multiple Arabic-language mobile commerce contexts and warrants systematic study. Academic and regulatory interest in dark patterns has grown substantially in recent years. Mathur et al. [
4] conducted a seminal large-scale analysis of dark patterns in online shopping websites, identifying 1818 dark pattern instances across approximately 11,000 shopping websites. Later studies have examined other forms of deceptive design used in web and mobile interfaces, including scarcity messages, social proof claims, hidden costs, forced continuity, obstruction, and manipulative consent mechanisms. In parallel, machine learning (ML) and natural language processing (NLP) approaches have been explored for automatically detecting dark pattern text. Prior studies have shown that transformer-based language models such as BERT and RoBERTa can achieve high performance on English-language dark pattern datasets [
5,
6].
Despite this progress, existing ML-based dark pattern detection research has focused predominantly on English-language interfaces. This creates a significant gap because Arabic is spoken by more than 400 million people [
7]. Arabic-speaking users interact daily with e-commerce platforms that localize persuasive and promotional interface content into Arabic, yet there is limited computational support for identifying whether such content includes deceptive or manipulative design cues. To the best of our knowledge, no prior ML-based framework has specifically addressed dark pattern detection in Arabic-language e-commerce mobile applications.
Arabic dark pattern detection also introduces linguistic and technical challenges that differ from English-language detection. Arabic NLP remains challenging because of the language’s rich morphology, diverse dialects, complex syntax, orthographic variation, ambiguity, and limited annotated resources [
8]. In addition, Arabic digital interfaces may contain Modern Standard Arabic, colloquial or dialectal expressions, transliterated terms, English brand names, numerals, emojis, and mixed-language text, reflecting the diglossic, dialectal, and multilingual nature of Arabic online communication [
9,
10]. UI text is also typically short and context-dependent, which makes classification difficult because models must infer persuasive intent from limited textual evidence and sparse semantic information [
11]. These characteristics may reduce the effectiveness of direct transfer from English-trained models and motivate the use of Arabic-specific language models such as AraBERT, which are pre-trained on Arabic corpora and better suited to Arabic linguistic structure [
12].
This problem is especially relevant to low-resource language technology. Although Arabic is widely spoken, task-specific Arabic NLP resources remain limited for many applied domains, including UI understanding, deceptive design detection, and mobile commerce analytics. In the age of large-scale neural and foundation models, such gaps are important because models trained primarily on high-resource languages may not adequately represent Arabic morphology, code-switching, localized persuasive expressions, or short interface microcopy. Therefore, constructing task-specific Arabic datasets and evaluating Arabic-specific models are necessary steps toward more inclusive and reliable language technologies. Another challenge is the limited availability of annotated Arabic datasets for this task. Unlike English dark pattern detection, where prior datasets have supported model development and benchmarking, Arabic e-commerce dark pattern detection lacks publicly available labeled resources. To address this limitation, this study constructs a manually annotated dataset of Arabic UI text strings collected from e-commerce mobile applications operating in Saudi Arabia. Because the initial dataset is relatively small, we also apply Arabic paraphrase-based data augmentation to increase training diversity while preserving the semantic meaning of the original UI text. This is intended as a train-only strategy to mitigate data scarcity rather than an isolated augmentation ablation, which we reserve for future work.
This paper addresses the identified gap through three primary contributions. First, we construct, to the best of our knowledge, the first annotated low-resource Arabic dataset for dark pattern detection in e-commerce mobile applications operating in Saudi Arabia. The dataset contains 223 manually labeled Arabic UI text strings collected from nine applications, with an inter-annotator agreement of κ = 0.89. Second, we develop and evaluate a leakage-free Arabic NLP pipeline in which the original 223 instances are first split using a stratified 70/10/20 split, and Arabic paraphrase-based augmentation is then applied exclusively to the training partition, expanding it from 155 to 452 instances. The validation and test sets contain only original, non-augmented instances, with the held-out test set consisting of 45 original UI text strings. Third, we fine-tune and compare five pretrained transformer models—AraBERTv2, MARBERT, mBERT, BERT-base-uncased, and RoBERTa-base—under a leakage-free training procedure, using 5-fold cross-validation as the primary evaluation given single-split instability (
Section 5.1). MARBERT achieves the strongest mean macro-F1 (0.4230), numerically ahead of AraBERTv2 (0.2998) though not to a statistically significant degree at five folds (
p ≈ 0.064); MARBERT is significantly ahead of both English-only baselines, and AraBERTv2 is significantly ahead of RoBERTa-base (its margin over BERT-base-uncased does not survive correction for multiple comparisons;
Section 5.3). mBERT is numerically stronger than both English-only baselines but was not directly tested against them. These results suggest that the composition of the pre-training corpus, particularly its coverage of dialectal and code-switched Arabic, may be important for this task. Finally, we publicly release the annotated dataset to support future research on low-resource Arabic NLP, Arabic UI text classification, ethical interface design, and dark pattern detection. Consistent with these contributions, this work is best understood as a benchmark and resource paper: it relies on standard transformer fine-tuning rather than introducing new model architectures, learning objectives, or optimization techniques, and its primary research contribution is the annotated dataset and empirical baseline rather than a methodological advance in machine learning.
The rest of the manuscript is organized as follows.
Section 2 reviews related work on dark patterns, Arabic NLP, and data augmentation in low-resource settings.
Section 3 describes the data collection and annotation methodology.
Section 4 presents the ML pipeline, data augmentation process, and experimental setup.
Section 5 reports the classification results and analysis.
Section 6 discusses the implications, limitations, and future research directions.
Section 7 concludes the paper.
3. Dataset Construction
3.1. App Selection and Text Collection Protocol
Nine e-commerce-related mobile applications operating in Saudi Arabia were purposively selected based on three criteria: availability through Google Play and/or the Apple App Store in Saudi Arabia, support for an Arabic-language interface, and high popularity or top-category ranking in Saudi Arabia as accessed in June 2026. Public app-ranking sources were used to support the popularity criterion. Similarweb listed Noon and Temu among the top Shopping Android apps in Saudi Arabia, while 42 matters listed Temu, Shein, Noon, and Amazon Shopping among the most popular Shopping apps in Saudi Arabia [
33,
34]. Appfigures also listed SHEIN, Temu, Noon, and Amazon Shopping among the top free Google Play Shopping apps in Saudi Arabia [
35]. For food delivery, Similarweb’s Saudi Arabia Food & Drink iPhone ranking listed Keeta and HungerStation among the top five apps [
36]. For travel and booking, Similarweb’s Travel & Local Android ranking listed Booking.com and Almosafer among the top travel apps in Saudi Arabia [
37]. Because app-store rankings fluctuate over time and differ across platforms and categories, ranking was used as an inclusion indicator rather than as a strict ordering variable.
The selected applications span four e-commerce categories: general shopping, fashion, food delivery, and travel and booking. This category diversity was intended to capture different dark pattern contexts, including promotional scarcity, hidden costs, forced continuity, checkout obstruction, and urgency-based messages. Text was collected directly from app interfaces across five predefined user flows per application: account registration, product search, add to cart, checkout, and subscription or cancellation management. During each flow, the annotator manually transcribed Arabic UI text strings that either contained potential dark pattern cues or served as comparable non-deceptive examples from the same interaction context. Data collection took place across multiple sessions spanning several weeks rather than a single sitting; the exact number of sessions or screenshots inspected per application was not systematically logged during collection. Specific promotional or seasonal sales calendars for the selected applications were also not tracked, and we note both points as limitations in
Section 6.5. A total of 225 text instances were initially collected and annotated; after excluding two instances whose final consensus label remained “Uncertain” (see
Section 3.4), the resulting dataset comprised 223 text instances, of which 169 instances, representing 75.8%, were labeled as dark patterns.
Table 2 presents the selected applications, categories, user flows, and the final instance and dark pattern counts.
3.2. Dark Pattern Taxonomy
Following the dark pattern frameworks proposed by Gray et al. [
3] and Mathur et al. [
4] and considering the mobile-specific characteristics of e-commerce interfaces [
14], five dark pattern categories were defined for annotation. These categories were selected because they were the most relevant to short Arabic UI text strings observed in shopping, food delivery, and travel booking applications. Each category was operationalized using text-based cues that could be identified from interface microcopy, promotional messages, checkout text, subscription prompts, and cancellation-related messages. In addition to the five dark pattern categories, text strings that did not contain any of the defined cues were labeled as “None—not a dark pattern.”
Table 3 summarizes the main annotation cues and representative Arabic examples for the five dark pattern categories used in this study.
Urgency/Scarcity. This category refers to UI text that creates time pressure or perceived scarcity through limited-time offers, countdown timers, stock warnings, or deadline-based promotional messages. Examples include claims such as “على وشك النفاد” (“almost out of stock”) or messages indicating that only a small number of items remain. Instances were labeled under this category when the text pressured users to act quickly based on scarcity or urgency cues that were not independently verifiable from the interface.
Misdirection. This category includes UI text that directs the user’s attention, interpretation, or emotional response in a way that may lead to an unintended action. Examples include emotionally loaded wording, confirm-shaming, unclear opt-in language, or consent statements bundled with registration in a way that makes refusal less visible. For example, the phrase
![Electronics 15 03955 i002 Electronics 15 03955 i002]()
(“to register, I must agree to receive marketing messages”) was treated as misdirection when the interface framed marketing consent as part of the primary registration action.
Hidden Costs. This category refers to fees, charges, or payment conditions that are not clearly presented early in the decision process and are revealed or emphasized only at later stages, such as checkout or final payment. Examples include service fees, delivery fees, seat-selection charges, or conditional discount rules. Text such as “رسوم الخدمة” (“service fee”) was labeled as a hidden cost only when the charge appeared late in the transaction flow or was not clearly disclosed before the user progressed toward payment.
Forced Continuity/Roach Motel. This category includes interface text related to automatic renewal, subscription continuation, or cancellation obstruction. Forced continuity occurs when users are enrolled in recurring payments or membership renewal unless they actively cancel, while roach motel patterns occur when opting in is easier than canceling or opting out. For example, “سيتم تجديد عضويتك تلقائيًا” (“your membership will be renewed automatically”) was included when the renewal condition was presented with insufficient salience, unclear cancellation information, or in a context that could lead users to continue a paid service unintentionally.
Social Proof Manipulation. This category refers to UI text that uses social signals to pressure users, such as claims about recent purchases, high demand, popularity, or the number of users viewing or buying an item. Examples include
![Electronics 15 03955 i001 Electronics 15 03955 i001]()
. Instances were labeled under this category when the social proof claim was unverifiable from the interface or appeared to create pressure by suggesting popularity, demand, or collective behavior.
Text strings that did not contain any of the above cues were labeled as “None—not a dark pattern.” When a text string appeared to include more than one cue, annotators assigned the category corresponding to the dominant persuasive or deceptive mechanism in the immediate interface context.
3.3. Annotation Procedure
Two annotators independently labeled each Arabic UI text string. Annotator 1 was the primary researcher, while Annotator 2 was a bilingual Arabic–English colleague familiar with the annotation guidelines. Each annotator assigned one of seven possible labels: the five dark pattern categories, “None—not a dark pattern,” or “Uncertain.” The “Uncertain” label was used only when the annotator could not confidently determine whether the text represented a dark pattern based on the available interface context. Instances assigned or resolved as “Uncertain” were excluded before model training and evaluation.
Annotation was conducted using a structured Microsoft Excel workbook with dropdown menus for each label to ensure consistency and prevent typographical errors. The workbook included columns for the application name, user flow, Arabic UI text, English translation, annotator labels, disagreement status, and final resolved label. Disagreements between annotators were automatically flagged in a dedicated column to support systematic review and resolution.
3.4. Inter-Annotator Agreement and Disagreement Resolution
Inter-annotator agreement was measured using Cohen’s kappa (κ), a standard metric for measuring agreement between two annotators on categorical labels while correcting for chance agreement [
38]. Kappa is calculated as follows:
where Po is the observed agreement proportion, representing the fraction of items on which both annotators assigned the same label, and Pe is the expected agreement by chance, calculated from the marginal label frequencies of both annotators. A κ value of 1.0 indicates perfect agreement, while values between 0.81 and 1.00 are commonly interpreted as “almost perfect” agreement and values between 0.61 and 0.80 as “substantial” agreement [
39]. Values above 0.75 are also commonly regarded as indicating strong or excellent inter-rater reliability [
40].
Agreement was calculated on the full pre-resolution annotation set of 225 instances. The two annotators agreed on 205 instances, corresponding to an observed agreement of Po = 91.1%, and the resulting Cohen’s kappa was κ = 0.89. This indicates almost perfect agreement and demonstrates a high level of consistency between the annotators. A total of 20 disagreements were identified among the 225 pre-resolution instances, corresponding to a disagreement rate of 8.9%. The two annotators reviewed all disagreement cases in a joint adjudication session, considering the Arabic UI text, the application context, and the annotation guidelines. The resolved cases covered all six final categories: Hidden Costs (4 cases), Misdirection (4 cases), Urgency/Scarcity (4 cases), Forced Continuity/Roach Motel (3 cases), None—not a dark pattern (3 cases), and Social Proof Manipulation (2 cases). The disagreements primarily involved distinguishing between persuasive and informational wording and determining the dominant dark-pattern mechanism when more than one interpretation was possible. Late-disclosed fees or conditions were generally resolved as Hidden Costs; popularity- or demand-based claims as Social Proof Manipulation; emotionally persuasive or attention-directing wording as Misdirection; deadline- or action-oriented prompts as Urgency/Scarcity; and subscription, renewal, bundling, or lock-in mechanisms as Forced Continuity/Roach Motel. Cases judged to be purely informational were resolved as None—not a dark pattern.
Table 4 presents representative disagreement cases illustrating these different adjudication decisions.
All 20 disagreement cases were resolved through adjudication and retained in the final dataset.
Table 4 presents representative examples rather than an exhaustive listing of all disagreement cases. Separately, two instances whose final consensus label remained “Uncertain” were excluded from model training and evaluation, yielding the final dataset of 223 labeled instances.
3.5. Dataset Statistics and Snapshot
Following disagreement resolution and exclusion of uncertain cases, the final dataset comprised 223 annotated Arabic UI text strings collected from nine e-commerce-related mobile applications operating in Saudi Arabia.
Table 5 presents the final label distribution. Dark pattern instances accounted for 169 cases, representing 75.8% of the dataset, while the remaining 54 cases, representing 24.2%, were labeled as “None—not a dark pattern.” The inclusion of non-dark-pattern examples was necessary to support supervised model training and enable the classifier to distinguish potentially deceptive UI text from neutral or informational interface content.
Table 6 presents a representative sample of annotated instances from the dataset, illustrating the range of Arabic UI text strings, source applications, user flows, and assigned labels. The full dataset is publicly available on Zenodo [
41].
4. Methodology
4.1. Pipeline Overview
The proposed dark pattern detection pipeline is illustrated in
Figure 1. The pipeline accepts raw Arabic UI text strings as input and produces one of six classification labels: the five dark pattern categories or “None—not a dark pattern.”
To avoid data leakage, the original 223 annotated instances were first divided into training, validation, and test partitions using stratified sampling with a 70/10/20 split. This produced 155 original training instances, 23 validation instances, and 45 test instances. Arabic paraphrase-based augmentation was then applied exclusively to the training partition, expanding it from 155 to 452 instances by adding 297 paraphrased variants after excluding paraphrases whose original instance fell in validation or test. The validation and test sets contained only original, non-augmented UI text strings.
Following augmentation, all model-input text strings underwent Arabic text preprocessing, including normalization of alef variants, removal of diacritics, standardization of Arabic–Indic numerals, and whitespace normalization. The preprocessed strings were then tokenized using the tokenizer corresponding to each transformer model. Each model was tokenized using its own pretrained tokenizer (AraBERTv2, MARBERT, mBERT, BERT-base-uncased, and RoBERTa-base each have a dedicated tokenizer). A maximum sequence length of 128 tokens was used across all models.
In the model training stage, five transformer models were fine-tuned and compared: AraBERTv2, MARBERT, and mBERT as Arabic-aware or multilingual models, and two English-pretrained baseline models, BERT-base-uncased and RoBERTa-base. The English-pretrained baselines were included to quantify the performance gap when Arabic-specific pre-training is absent. All models were evaluated on the same 45-instance held-out test set containing only original Arabic UI text instances. Performance was assessed using macro-averaged precision, macro-averaged recall, macro-F1, and accuracy. In addition, stratified 5-fold cross-validation was conducted on the original 223 instances without augmentation, for all five models, to assess model robustness on the clean dataset and serve as the primary evaluation (
Section 5.1). Cross-model significance testing was also computed to compare all five models (
Section 5.3).
4.2. Data Augmentation
To address the limited size of the training set, a pool of manually generated Arabic paraphrase candidates was subjected to parent-aware filtering after the stratified data split. Only paraphrases whose source instance belonged to the training partition were retained. This resulted in 297 retained paraphrases added to the 155 original training instances, yielding a final training corpus of 452 instances; 135 paraphrase candidates associated with validation or test instances were discarded. Validation and test sets therefore contained only original, non-augmented instances. The paraphrases were generated using three strategies: (1) lexical substitution, replacing words with Arabic synonyms while preserving the dark pattern meaning; (2) syntactic restructuring, reordering sentence constituents while maintaining semantic equivalence; and (3) interface-style paraphrasing, producing natural Arabic variants that reflect phrasing commonly observed in mobile app interfaces. Paraphrases were generated manually by two members of the research team (the same two annotators described in
Section 3.3), who reviewed the rewritten instances to confirm semantic equivalence and label consistency with the source instance before inclusion in the training set. On average, approximately two paraphrased variants were generated per original training instance; this varied somewhat by instance rather than following a fixed count. This expanded the training corpus from 155 to 452 instances, representing an overall expansion factor of approximately ×2.92, consisting of 155 original training instances and 297 retained augmented paraphrases. Validation and test sets contained only original, non-augmented instances.
Table 7 presents the class-level breakdown of original and augmented training instances, and
Figure 2 illustrates the expansion visually. Crucially, augmented instances were added only to the training partition. The held-out test set contained exclusively original, non-augmented instances to ensure unbiased evaluation. The dataset split was 70% training, 10% validation, and 20% testing using stratified sampling to preserve class distribution across partitions.
4.3. Text Preprocessing
Each Arabic UI text string underwent four preprocessing steps: (1) removal of HTML entities and non-informative formatting artifacts; (2) normalization of Arabic characters, including unification of alef variants (أ، إ، آ → ا) and removal of diacritics (tashkeel); (3) standardization of Arabic–Indic numerals (٩–٠) to Western numerals (0–9); and (4) whitespace normalization. Informative symbols commonly used in e-commerce interfaces, such as currency indicators, percentages, plus signs, and numerical values, were retained because they may contribute to dark pattern cues such as discounts, scarcity claims, and hidden costs. Preprocessing was implemented using CAMeL Tools [
42] and PyArabic [
43], two open-source Python libraries for Arabic natural language processing and Arabic text manipulation.
4.4. Models
4.4.1. Baseline Models
Two English-pretrained transformer models were used as baselines: BERT-base-uncased [
44] and RoBERTa-base [
45]. BERT introduced deep bidirectional transformer pre-training and can be fine-tuned for downstream NLP tasks using an additional task-specific output layer [
44]. RoBERTa is a robustly optimized variant of BERT that improves pre-training through changes such as larger-scale training and optimized hyperparameters [
45]. These models were included to quantify the performance gap between English-pretrained models and an Arabic-specific model when applied to Arabic UI text. RoBERTa-base was also included because Yada et al. [
6] reported strong performance for RoBERTa-based classification on an English e-commerce dark pattern dataset. Two additional multilingual/Arabic-specific models were included: bert-base-multilingual-cased (mBERT), a multilingual model whose vocabulary includes Arabic, used to isolate whether AraBERTv2′s advantage over the English-only baselines reflects tokenizer/vocabulary coverage rather than Arabic-specific pre-training; and MARBERT [
25], an Arabic-specific model pre-trained substantially on dialectal and social-media Arabic rather than Modern Standard Arabic alone. Both were fine-tuned and evaluated using an identical pipeline and hyperparameters to the other three models.
4.4.2. AraBERTv2
AraBERTv2 [
12] is an Arabic-specific BERT-based model developed for Arabic language understanding, and was the model that originally motivated this study’s central hypothesis: that Arabic-specific pre-training would outperform English-pretrained baselines on Arabic UI text. AraBERTv2 was pre-trained on large Arabic corpora and was designed to address Arabic NLP challenges arising from the language’s rich morphology and relatively limited resources compared with English [
12]. The AraBERT paper reports that AraBERT achieved state-of-the-art performance on most tested Arabic NLP tasks and outperformed multilingual BERT and other baselines [
12]. As reported in
Section 5.3, this hypothesis is only partly supported: AraBERTv2 significantly outperforms RoBERTa-base and is nominally ahead of BERT-base-uncased (
p ≈ 0.031), though this comparison does not survive correction for multiple comparisons; AraBERTv2 is itself numerically outperformed by MARBERT and mBERT under the primary cross-validation evaluation. All five models were fine-tuned for the same six-class dark pattern classification task using a linear classification head on the [CLS] token, following the standard HuggingFace AutoModelForSequenceClassification configuration. The six output classes consisted of the five dark pattern categories and the “None—not a dark pattern” class. The two instances labeled as “Uncertain” were excluded from all model training and evaluation, for every model.
4.5. Training Configuration
All models were fine-tuned using the HuggingFace Transformers library [
46] in Python 3.10. Training was conducted on Google Colab Pro using an NVIDIA A100 GPU. The same training configuration was used across all models to provide a controlled comparison. Hyperparameters were set as follows: learning rate = 2 × 10
−5, batch size = 16, maximum sequence length = 128 tokens, number of epochs = 5, and weight decay = 0.01. The AdamW optimizer [
47] was used with a linear warmup schedule over 10% of the training steps. Checkpoint selection followed the same rule for every model: the checkpoint with the highest validation-set macro-F1 across the 5 epochs was retained, rather than simply using the final epoch’s weights. No explicit early-stopping criterion was implemented; all models trained for the full 5 epochs regardless of validation trajectory. This identical configuration was used across all five models deliberately, to isolate architecture and pre-training corpus as the only varying factor between them; we note in
Section 6.5 that model-specific tuning was not performed and could plausibly shift the comparisons reported here.
The original 223 annotated instances were first split into training, validation, and test sets using stratified sampling with a 70/10/20 ratio. This produced 155 original training instances, 23 validation instances, and 45 test instances. Paraphrase-based augmentation was then applied only to the training partition, expanding the training set to 452 instances. In addition, stratified five-fold cross-validation was conducted for all five models on the 223 original instances, without augmentation, to assess robustness under the clean-data setting; this cross-validation evaluation is treated as primary throughout the paper.
4.6. Evaluation Metrics
Model performance was evaluated on the 45-instance held-out test set using overall accuracy, macro-averaged precision, macro-averaged recall, and macro-F1. Per-class precision, recall, and F1-scores were also reported to analyze category-level performance across the five dark pattern classes and the “None—not a dark pattern” class. Macro-F1 was selected as the primary evaluation metric because the dataset is imbalanced across the six output classes, and macro-averaging gives equal weight to each class regardless of its frequency.
To quantify differences between models, we report pairwise macro-F1 differences and significance tests across all five models (
Section 5.3): a paired bootstrap significance test on the single held-out test set and Welch’s
t-tests on 5-fold cross-validation fold statistics, with Holm–Bonferroni correction for multiple comparisons across the seven reported pairwise tests. This distinction is important because BERT-base-uncased was the stronger English baseline in our experiments, whereas RoBERTa-base was included due to its strong performance in prior English dark pattern detection studies.
7. Conclusions
This paper presented, to the best of our knowledge, the first ML-based dark pattern detection benchmark for Arabic-language e-commerce mobile interfaces. We constructed a 223-instance annotated dataset from nine e-commerce mobile applications operating in Saudi Arabia, achieving strong inter-annotator agreement (κ = 0.89). The dataset addresses an important gap in low-resource Arabic NLP by providing task-specific labeled data for a specialized UI text classification problem.
We then developed a leakage-free augmentation pipeline in which the original instances were split first, followed by paraphrase-based augmentation applied only to the training partition, with a parent-aware filter ensuring no paraphrase of a validation or test instance entered training. We fine-tuned five pretrained transformer models—AraBERTv2, MARBERT, mBERT, BERT-base-uncased, and RoBERTa-base—on the resulting 452-instance training corpus for the held-out test comparison. Separately, our primary evaluation used 5-fold cross-validation on the 223 original, non-augmented instances. Under this cross-validation, MARBERT achieved the strongest performance (mean macro-F1 = 0.4230), numerically ahead of AraBERTv2 (0.2998) by a margin that did not reach statistical significance at five folds (p ≈ 0.064), and ahead of mBERT (0.3234); MARBERT significantly outperformed both English-only baselines; AraBERTv2 significantly outperformed RoBERTa-base, with its advantage over BERT-base-uncased not surviving correction for multiple comparisons; and mBERT was numerically stronger than both English-only baselines but was not directly tested against them. This suggests that, for short and informal Arabic UI text, pre-training on dialectal and code-switched Arabic may matter more than Arabic pre-training in general. Per-class analysis showed that even the best-performing model reliably detected only a subset of categories—Social Proof Manipulation and Hidden Costs were detected with reasonable precision, while Misdirection and Forced Continuity/Roach Motel remained undetected by every model evaluated. These findings highlight both the promise of dialect-aware Arabic pre-training and the continuing difficulty of Arabic dark pattern detection at current data volumes. The annotated dataset is publicly released on Zenodo to support future research on low-resource Arabic NLP, Arabic UI text classification, dark pattern detection, ethical interface design, and consumer protection technologies.
Overall, this work provides a rigorously validated initial benchmark for studying deceptive interface language in Arabic mobile commerce, and its central finding—that dialectal pre-training coverage may matter as much as language-matching alone—offers a concrete direction for future low-resource Arabic NLP research.