Finetuning deep pre-trained language models has shown state-of-the-art performances on a wide range of Natural Language Processing (NLP) applications. Nevertheless, their generalization performance drops under domain shift. In the case of Arabic language, diglossia makes building and annotating corpora for each dialect and/or domain a more challenging task. Unsupervised Domain Adaptation tackles this issue by transferring the learned knowledge from labeled source domain data to unlabeled target domain data. In this paper, we propose a new unsupervised domain adaptation method for Arabic cross-domain and cross-dialect sentiment analysis from Contextualized Word Embedding. Several experiments are performed adopting the coarse-grained and the fine-grained taxonomies of Arabic dialects. The obtained results show that our method yields very promising results and outperforms several domain adaptation methods for most of the evaluated datasets. On average, our method increases the performance by an improvement rate of 20.8% over the zero-shot transfer learning from BERT. The Arabic language is characterized by two main language varieties: Modern Standard Arabic (MSA) and Arabic dialect. MSA has a standard written form and acquires an official status across the Arab countries, while Dialectal Arabic refers to the informal spoken dialects in the Arab World (Habash, 2010). These dialects are used in daily life but have no standard written form (Saadane and Habash, 2015; Habash et al., 2018; Eryani et al., 2020). Geographically and according to (Zaidan and Callison-Burch, 2014), Arabic dialects can be classified into five coarse-grained regional dialects: Egyptian, Levantine, Gulf, Iraqi, and Maghrebi. Recent studies have categorized dialectal Arabic into more fine-grained levels, including countries and cities (Bouamor et al., 2019; Muhammad et al., 2020). These dialects differ from one another and from MSA, to a varying degree, at different linguistic levels (Salameh et al., 2018; Erdmann et al., 2018). With the unprecedented reach of social media platforms, Sentiment Analysis (SA) has become a fundamental task for many applications. Most research work in this area has been devoted to English and other European languages, while some research studies have addressed the question of transfer learning from MSA to dialectal Arabic. However, Khaddaj et al. (2019) and Qwaider et al. (2019) have shown that zero-shot transfer learning, from models trained on MSA data, does not perform well for SA on dialectal Arabic data. So, existing works have focused on building resources and annotating corpora for a few dialects where most of them were collected from social media (Med-haffar et al., 2017; Al-Twairesh et al., 2017; Baly et al., 2018; Moudjari et al., 2020; Oueslati et al., 2020). Nevertheless, dealing with Arabic dialects as standalone languages is challenging since building manually such resources is costly and time-consuming. It is well known that the generalization performance of Machine Learning (ML) models drops in the case of domain shift (out of distribution data). Hence, there is an imperative need to leverage existing labeled data from other related domains, in order to address this challenge. The aim is to accurately transfer the learned knowledge from a source domain labeled data to a new target domain data. On the one hand, adaptive pretraining of contextualized word embedding models has shown an effective transfer learning performance under domain shift (Han and Eisenstein, 2019; Rietzler et al., 2020). It consists of finetuning the pre-trained language models on large unlabeled corpus from the target domain using the MLM objective. On the other hand, self-training and domain-adversarial learning have been applied successfully to many NLP applications (Li et al., 2020; Ramponi and Plank, 2020; Ye et al., 2020; Ganin et al., 2016). An effective method that combines domain-adversarial training and self-training is the Adversarial-Learned Loss for Domain Adaptation (ALDA) (Chen et al., 2020). The domain-adversarial training aligns both domains' output distributions, while self-training captures the discriminative features of the target domain data. In this paper, we introduce a new unsupervised domain adaptation method for Arabic cross-domain and cross-dialect sentiment analysis based on AraBERT language model (Antoun et al., 2020) and the Adversarial-Learned Loss for Domain Adaptation (ALDA) (Chen et al., 2020). Due to limited amount of unlabeled data for most target domains-dialects, we do not rely on the adaptive pre-training of AraBERT model. Our method leverages the potentials of: i) contextualized word embeddings to learn high-level text representation, ii) adversarial domain training to match the output distributions of domains and dialects, and iii) self-training to capture the discriminative features of the target domain data. The proposition of a new unsupervised domain adaptation method for Arabic SA. The study of three possible challenging scenarios of domain adaptation for Arabic SA. The achievement of very promising results on several Arabic cross-domain and cross-dialect sentiment classification datasets. To the best of our knowledge, this is the first study that investigates domain adaptation for cross-domain, cross-dialect and cross-domain & cross-dialect sentiment analysis, adopting the coarse-grained and the fine-grained taxonomies of Arabic dialects. The proposed method outperforms several state-of-the-art methods on most test datasets. The rest of this paper is organized as follows. Section 2 presents related work. In Section 3, we introduce our method. Section 4 illustrates the conducted experiments, and discusses the obtained results. Finally, in Section 6, we conclude the paper and outline a few directions for future work. sentiment analysis (Badaro et al., 2019; Al-Ayyoub et al., 2019). This has been achieved by publishing datasets (Elnagar et al., 2018; Ashraf and Omar, 2016; Aly and Atiya, 2013; ElSahar and El-Beltagy, 2015; Nabil et al., 2015), sentiment lexicons (Badaro et al., 2014; El-Beltagy, 2016; Gilbert Badaro and Habash, 2018), and proposing models as well as architectures that reach decent accuracy scores (Al Sallab et al., 2015; Antoun et al., 2020; Abdul-Mageed et al., 2020). As an example, the pre-trained language model AraBERT (An-toun et al., 2020) has achieved state-of-the-art performance on Arabic sentiment classification tasks. Nevertheless, most of these achievements are still limited to the MSA, and to some Arabic dialects and domains (Badaro et al., 2019; Al-Ayyoub et al., 2019). Unsupervised domain adaptation. In the past few years, there has been considerable interest in unsupervised domain adaptation for cross-domain NLP tasks, including cross-domain sentiment analysis (Ramponi and Plank, 2020). Previous work has focused on minimizing the discrepancy between domains by aligning the output distributions of the source and the target domains. Maximum Mean Discrepancy (MMD) (Gretton et al., 2012), KL-divergence (Zhuang et al., 2015), Correlation Alignment (CORAL) (Sun and Saenko, 2016), and domain-adversarial learning (Ganin et al., 2016) are among the most widely used methods to learn domain-invariant features. In the same vein, other researchers have adopted self-training approach in order to learn discriminative features of the target domain (Ramponi and Plank, 2020; Ye et al., 2020). The latter approach enables the model to be also trained on some samples of the target domain. The main idea is to select a subset of pseudo-labels, predicted on the target domain inputs, for which the model's confidence is higher than a fixed threshold, and to incorporate them into the model loss. However, pseudo-labels are generally noisy and may hurt the performance of the model. Chen et al. (2020) have tackled this issue by introducing the adversarial-learned loss for domain adaptation where the discriminator corrects the noise in the pseudo-labels by generating noise vectors that are specific for each domain. Domain adaptation for cross-domain sentiment analysis. In order to learn cross-domain text representation, several domain adaptation methods have relied on pivot features extraction. Inspired from structural correspondence learning, Yu and Jiang (2016) have proposed a method to learn continuous sentence embedding employing CNN model across various domains. Li et al. (2018) have introduced a domain adaption method which can be extended to documents. The latter method uses a hierarchical attention transfer network for extracting the pivots and non-pivots features between source and target domains. Ziser and Reichart (2018) have proposed language modeling objective to learn a model scratch rather than adapting a pre-trained embedding model. Recently, several methods have been introduced for domain adaptation based on adaptive pretraining of contextualized word embeddings (Han and Eisenstein, 2019; Li et al., 2020; Vu et al., 2020). The latter approach relies on the availability of a large amount of unlabeled data in the target domain to finetune/adapt the existing pre-trained language model using the MLM objective. Rietzler et al. (2020) have proposed an unsupervised domain adaptation method for aspect-target sentiment classification based on BERT adaptive pretraining. Vu et al. (2020) have presented an adaptive pre-training method that adversarially masks out tokens that are hard to be reconstructed by the MLM. In another work, (Du et al., 2020) have proposed to combine BERT domain-aware training and adversarial-domain learning (Ganin et al., 2016) for cross-domain sentiment analysis. The domain-aware training combines the adaptive pretraining using the MLM objective and a Domain Distinguish Task (DDT). For cross-domain and cross-lingual domain adaptation, Li et al. (2020) have introduced an unsupervised feature decomposition method based on the mutual information to extract domain-invariant and domain-specific features using the XLM language model (Lample and Conneau, 2019). For the Arabic language, Khaddaj et al. (2019) have introduced a domain adaptation method for cross-domain and cross-dialect sentiment analysis, combining domain adversarial training (Ganin et al., 2016) with denoising autoencoder for representation learning. The input sentences of both domains are represented using the bag-of-words representation by selecting the top 5,000 most frequent unigrams and bigrams. The obtained results on the Levantine multi-topic ArSentD-LEV dataset (Baly et al., 2018) show that combining the reconstruc-tion loss with the adversarial training has slightly improved the performance in some cases. Nevertheless, the overall obtained results show that the zero-shot transfer from the SVM model achieves competitive results for some datasets. In another work, Qwaider et al. (2019) have shown that models that are trained on MSA for the task of sentiment classification generalize poorly to dialectal Arabic data. For improving the results, they have performed domain adaptation using feature engineering and sentiment lexicons. In this section, we present our model architecture. The noise-correcting discriminator, the classifier and the generator losses, employed in our model, are those of ALDA model (Chen et al., 2020). In unsupervised domain adaptation settings, for sentiment analysis, we are given a labeled source domain DS = { ( x is , y is ) } n s i =1 having K classes and an unlabeled target domain DT = { x it } n t i =1 . The aim is then to transfer the learned knowledge from DS to DT . In other words, the objective is to train a robust classifier using the labeled source domain data that generalizes well on the target domain test data. Figure 1 presents the general framework of our method. We aim to leverage the strength of both the domain adversarial training and the self-training in a unified framework. The adversarial training aligns both domains' output distributions, whereas the self-training considers the discriminative features of the target domain. Besides, AraBERT is used as a generator to extract high-level representation from both source and target domains sentences. The generator G , the AraBERT encoder, is trained to extract features from the input sentences for both domains: h [ CLS ] = G ( x ) corresponds to the hidden state of the [ CLS ] token. The weights of the generator are shared between both domain inputs. The classifier C operates on the hidden states h [ CLS ] to classify the input instances x and outputs a probability vector p ( y = k | x ) = Softmax ( W c h [ CLS ] + b c ) for both domains ( p s and p t ), where b c and W c are the bias vector and the weight matrix on the classification layer, respectively. discrimina-Figure 1: The general framework of our method tor D by maximizing its loss. Thus, the generator aligns both domains' output distributions, whereas the discriminator must distinguish both domain features by generating different noise vectors for each domain. These noise vectors are employed to correct the pseudo-labels predicted by the classifier C . The Gradient Reversal Layer (GRL) reverses the gradient of the discriminator's loss during the back-propagation step. The input of the discriminator D corresponds to the hidden state h [ CLS ] of the generator G . D is trained to produce a noise vector  ( x ) =  ( D ( h [ CLS ] )) by applying  , the Sigmoid activation, on its output layer. Note that, the output layer size is equal to K , the number of classes. Each component of the noise vector estimates the probability that the predicted label is the correct label  ( x ) k = p ( y = k |  y = k, x ) . Hence, instead of being trained to classify the source domain sentences and the ones of the target domain, G is trained to generate different noise vectors for each domain. The noise vector is used to estimate the confusion matrix  = (  kl ) , which is applied to correct the target domain's pseudo-labels, predicted by the classifier C . The intuition behind the ALDA model is that, if we appropriately estimate the confusion matrix, the noise in the pseudo-labels predicted by the classifier, can be efficiently corrected (Chen et al., 2020). Assuming that the noise in pseudo-labels is classwise uniform with vector  ( x t ) k , the confusion matrix is then given by:  x t kl =    ( x t ) k if k = l 1   ( xt ) l K  1 else The corrected label vector in the target domain is given by c ( x t ) = (cid:80) l  x t kl p ( y t = l | x t ) ( l is the predicted pseudo label). For the source domain, the corrected label vector c ( x s ) is computed using the same procedure. For the source domain, the discriminator minimizes the binary cross-entropy loss L bce between the corrected label vectors and the ground truth labels y s : L adv ( x s , y s ) = L bce ( c ( x s ) , y s ) (1) For the target domain, the discriminator minimizes the binary cross-entropy loss L bce between the corrected label vector and the opposite distribution of the predicted pseudo-label u ( y t ) : L adv ( x t ) = L bce ( c ( x t ) , u ( y t ) ) (2) where u ( y t ) is computed as follows: u ( y t ) k = (cid:40) 0 if  y t = k 1 K  1 else To discriminate between both domains, the discriminator minimizes the following total adversarial loss: L adv ( x s , y s , x t ) = L adv ( x s , y s ) + L adv ( x t ) (3) In order to make the training more stable, ALDA incorporates the classification loss of the source domain as a regularization term into the discriminator. Thus, the discriminator must also correctly classify the source domain data. The regularization term is given by: L reg ( x s , y s ) = L ce ( p ( x s ) d , y s ) (4) where p ( x s ) d = Softmax ( D ( h ( x s ) [ CLS ] )) and L ce is the cross-entropy loss. Finally, the discriminator minimizes the following loss function: LD = L adv ( x s , y s , x t ) + L reg ( x s , y s ) (5) 3.3 Classifier and generator losses Following the principles of pseudo-labeling methods for domain adaptation, the ground truth label y t for the target domain can be substituted by:  y t = argmax k p kt if p kt >  where  is a threshold. By using the learned confusion matrix  ( x t ) to correct the pseudo-label generated by the classifier C , ALDA approximates the loss in the target domain by: LT ( x t , L unh ) = (cid:88) k c ( x t ) k L unh ( p t , k ) (6) where L unh ( p, k ) = 1  p k is the unhinged loss. Then, the classifier C minimizes the following loss: LC = L ce ( p s , y s ) +  LT ( x t , L unh ) (7) where L ce ( p s , y s ) is the cross-entropy loss of the source domain. Finally, the generator G minimizes the following loss function: LG = L ce ( p s , y s )+  LT ( x t , L unh )   L adv ( x s , y s , x t ) (8) where   [0 , 1] is a hyperparameter. In this section, we present the experiments carried out to investigate the performance of our proposed method for Arabic cross-domain and cross-dialect sentiment analysis. We describe the used datasets and present the compared methods as well as the obtained results. We provide the experiments settings and implementation details of our method in Section A. The source code for reproducing the experimentations can be found in our github repository 1 . Scenario 1: Domain adaptation for dialects of the same region. The set of experiments of this scenario aims to study our method's performance for cross-dialect and cross-domain sentiment analysis for Arabic dialects of the same region. To do so, we employ the existing multi-domain multi-dialect ArSentD-LEV dataset of the Levant region (Baly et al., 2018). ArSentD-LEV contains 1,000 tweets from each country of the Levant region (4,000 in total): Syria, Palestine, Jordan, and Lebanon. It is labeled into five classes and covers tweets from five topics: Personal (36%), Politics (23%), Religion (11%), Sport (6%), and Other (24%). Scenario 2: Domain adaptation across regional dialects. In the set of experiments of this scenario, we investigate the performance of our method using the coarse-grained regional taxonomy of Arabic dialects. For this purpose, 1 https://github.com/4mekki4/arabic-nlp-da 1. Firstly, we select three datasets, mixing Arabic dialects and MSA: BRAD (Elnagar and Einea), HARD (Elnagar et al., 2018), and TEAD (Abdellaoui and Zrigui, 2018) that are compiled from book reviews, hotel reviews, and Twitter, respectively. These datasets have sufficient samples to build a multi-dialect multi-domain dataset. 2. Secondly, we train an AraBERT-based dialect identification model, selecting data from some of the publicly available datasets, including MADAR (Bouamor et al., 2019), DART (Alsarsour et al., 2018), AOC (Zaidan and Callison-Burch, 2011), PADIC (Karima et al., 2018), and the multi dialect Arabic texts corpora proposed in (Khalid and Mark, 2013). The resulting Arabic dialect identification corpus consists of 353 , 171 training sentences and a balanced test set of 50 , 000 sentences and covers MSA as well as dialectal sentences from Maghrebi, Levantine, Egyptian, and Gulf. It is worth mentioning that our trained dialect identification model achieves 89% accuracy. 3. Finally, we apply our dialect identification model on the three evaluated datasets to build our multi-dialect multi-domain corpus. Moreover, we select the Levantine and Gulf dialects and MSA, which yielded sufficient data across domains. For review datasets, the rating levels 1 and 2 are assigned to negative polarity, while ratings 4 and 5 are considered positives. Furthermore, we sample 1000 positive and 1000 negative instances for each dialect to build our final multi-dialect and multi-domain dataset. Scenario 3: Domain adaptation from MSA to Arabic dialects using social media data. The set of experiments of this scenario tackles the transfer of learning from MSA to Arabic dialects, belonging to different regions, using corpora built from social media (see Table 7 of Section 1.5 for the datasets details). Thus, 1. For MSA, we use the ArSAS dataset (El-madany et al., 2018). 2. For the Maghrebi region, we employ MSAC (Morocco) (Oussous et al., 2020) and TSAC (Tunisia) (Medhaffar et al., 2017) datasets. Note that, we have removed sentences that are written in Arabezi for TSAC. 3. For the Egyptian region, we use the ASTD dataset (Nabil et al., 2015). 4. For the Levant region, we utilize AJGT (Jor-dan) (Alomari et al., 2017) and TweetSYR (Syria) (Salameh et al., 2015) datasets. 5. For the Gulf region, we employ the Saoudi dialect AraSenti-Tweet dataset (Al-Twairesh et al., 2017). Since some of these datasets are labeled using positive and negative classes only (TSAC and MSAC), we evaluate our method using positive and negative sentences for all the used datasets. We use the train-test splits of the evaluated datasets whenever this information is available. Otherwise, we split the datasets into 80% train and 20% test. For the ArSentD-LEV and following the work of (Khaddaj et al., 2019), we evaluate our method on the full target domain/dialect dataset. For all our experiments, we utilize the accuracy evaluation measure and highlight the best accuracy performance using bold font. In order to assess the performance of our method, we compare it with the state-of-the-art domain adaptation method, introduced by (Khaddaj et al., 2019), for Arabic sentiment analysis on the ArSentD-LEV dataset. Moreover, we evaluate BERT for zero-shot transfer from the source domain, denoted ZS-BERT . For a fair comparison, we investigate the performance of three state-of-the-art domain adaptation methods including MMD (Gretton et al., 2012), CORAL (Sun and Saenko, 2016), and DANN (Ganin et al., 2016). We implement the latter methods on top of AraBERT. We have also evaluated two state-of-the-art cross-domain sentiment analysis methods, namely PBLM (Ziser and Reichart, 2018) and HTAN (Li et al., 2018). It is worth to mention that for PBLM and HATN, we have used an extra 4000 unlabeled sentences from each domain/dialect. For HTAN, we have used Mazjak word embedding model (Abu Farha and Magdy, 2019) 4.3 Results Scenario 1: Domain adaptation for dialects of the same region. Tables 1 and 2 present the results obtained for Arabic cross-domain and cross-dialect sentiment Analysis using ArSentD-LEV. zero-shot transfer-based method, outperforms both DANNBOW and ADRL, the state-of-the-art domain adaptation methods that are based on the bag-of-words representation. Moreover,training the state-of-the-art domain adaptation methods, including CORAL, MMD and DANN, on top of BERT module has improved BERT transfer performance across dialects. Besides, these three methods achieve comparable performance for most source and target dialects and outperform both DANNBOW and ADRL. Furthermore, our method, which is based on BERT and ALDA's losses, surpasses the existing state-of-the-art methods and ZS-BERT with average improvements of 19% and 5.5% respectively. Additionally, it shows better performance than the other domain adaptation methods that are implemented on top of BERT (CORAL, MMD, and DANN). In accordance with the results obtained for cross-dialect, Table 2 shows that the ZS-BERT method outperforms both DANNBOW and ADRL in most test cases of cross-domain sentiment analysis (14 out of 20 cases). Besides, the results show that the three domain adaptation methods CORAL, MMD, and DANN outperform both DANNBOW and ADRL, and improve the transfer performance of BERT model. On average, the latter three methods (CORAL, MMD, and DANN) are on a par with each other in terms of accuracy. Similarly, our proposed method outperforms both state-of-the-art methods (DANNBOW and ADRL) as well as ZS-BERT by an average increment of 19% and 10.7%, respectively. Moreover, it achieves a better performance than CORAL, MMD, and DANN for most source and target SOTA Our Results Source Target DANNBOWADRL ZS-BERT CORAL MMD DANN Ours Politics Personal 28.7 33.3 28.7 41.6 41.3 43 44.3 Religious 20.3 25.3 10 33.6 33.3 34.2 46.3 Sport 35.1 35.1 36.7 46.6 32.8 46.8 46.8 Other 22.5 24.2 38.2 49.7 50 39.7 46.1 Personal Politics 41.7 36.8 46.3 49.7 49.4 47.5 49.7 Religious 22.8 23.4 41 44.3 44.7 43.5 44.2 sport 26.8 25.8 43.5 49.7 49.5 48.2 46.6 Other 33.8 35.4 53 57.4 57.7 49.6 58 Religious Politics 15.5 15.5 12 42 42 37.6 40.8 Personal 24.1 26.1 25 35.1 37 36.8 38 Sport 25.8 26.8 21.6 38.1 32.8 28.5 34.8 Other 30.6 27.4 26.4 46.4 43.2 43.2 48.4 Sport Politics 36.4 30.7 46.9 48.7 48.3 43.1 44.6 Personal 25.3 24.5 40.7 43.8 42.3 43.6 44.5 Religious 20 19 30.8 29.2 31 40.2 44 Other 35.5 35.5 48.3 49 49.6 49 54.2 Other Politics 23.2 23.2 46.8 46.5 46.4 34.4 46.8 Personal 30.3 24.9 40.2 46.2 44.3 40.3 45.5 Religious 41.8 43 39.5 45.8 47.6 48.6 48.9 Sport 23.7 27.8 46.7 48.4 51.1 47.7 50.9 Table 2: The results of accuracy measurement of Arabic cross-domain sentiment analysis using the ArSentD-LEV dataset. Scenario 2: Domain adaptation across regional dialects. Table 3 summarizes the results obtained for cross-domain and cross-dialect as well as cross-domain and cross-dialect Arabic sentiment analysis using two regional dialects (Gulf and Levantine) and MSA data, covering three domains (books reviews, hotels reviews and Twitter). The overall obtained results show that the zero-shot transfer from AraBERT (ZS-BERT) outperforms previous state-of-the-art methods (PBLM and HTAN). Moreover, the evaluated domain adaptation methods on top of BERT improve AraBERT's performance for all evaluated scenarios. Besides, the results demonstrate that the performance of ZS-BERT method drops significantly in the cases of cross-domain as well as in cross-domain and cross-dialect scenarios. Nevertheless, the domain adaptation methods show more important improvements (an increment of 7.4% on average) in the scenarios mentioned above. The obtained results clearly show that our method surpasses the other methods for most target datasets and scenarios, except for some cases but the gap remains small. Scenario 3: Domain adaptation from MSA to Arabic dialects using social media data. Table 4 presents the domain adaptation results obtained Target Gulf Levantine Modern Standard Arabic Scenario data BRAD HARD TEAD Avg BRAD HARD TEAD Avg BRAD HARD TEAD Avg Cross-dialect PBLM 53.5 83.38 66.37 67.75 57.25 78.12 62.62 66.0 50.87 80.0 64.75 65.21 HATN 58.05 75.5 62.2 65.25 58.75 74.6 61.72 65.02 58.22 77.35 57.98 64.52 ZS-BERT 72.7 92.1 72.5 79.1 80.1 95.3 73.8 83.1 75.3 95.3 73.0 81.2 CORAL 77.0 94.1 73.3 81.5 81.1 95.4 73.6 83.4 80.3 96.6 75.5 84.1 MMD 77.1 94.4 73.1 81.5 81.9 96.3 74.1 84.1 80.1 97.1 76.8 84.7 DANN 77.6 94.3 72.9 81.6 81.4 95.8 75.6 84.3 79.1 96.4 74.5 83.3 Ours 78.4 94.3 73.0 81.9 82.3 96.5 76.6 85.1 79.6 96.4 74.9 83.6 Cross-domain PBLM 51.25 51.63 48.88 50.58 59.62 50.25 48.25 52.71 64.0 51.75 50.0 55.25 HATN 57.35 54.45 52.6 54.8 52.77 49.32 48.88 50.32 60.7 52.97 54.68 56.12 ZS-BERT 55.7 70.9 58.8 61.8 60.6 69.9 58.0 62.8 64.5 76.8 61.8 67.7 CORAL 62.9 82.3 60.6 68.6 66.1 74.1 59.9 66.7 66.3 78.3 66.9 70.5 MMD 62.3 73.0 61.5 65.6 64.4 75.8 59.4 66.5 67.4 82.6 66.1 72.0 DANN 62.9 80.1 59.8 67.6 62.4 77.1 62.5 67.3 66.6 78.6 66.4 70.5 Ours 65.3 85.1 62.5 71.0 64.5 79.1 62.3 68.6 69.8 93.3 66.8 76.6 PBLM 51.56 50.62 49.81 50.67 50.0 52.44 48.81 50.42 53.19 49.44 49.56 50.73 HATN 55.24 50.91 52.29 52.81 56.78 50.24 50.2 52.4 55.35 52.36 53.06 53.59 ZS-BERT 57.8 72.9 59.9 63.5 63.0 74.5 59.1 65.5 60.2 71.6 60.8 64.2 Cross-dialect CORAL 63.8 82.8 60.8 69.1 64.8 78.3 60.8 67.9 66.8 79.4 63.9 70.0 & MMD 63.6 82.0 60.5 68.7 64.4 79.4 60.9 68.3 66.4 77.9 64.1 69.5 Cross-domain DANN 63.2 75.8 62.3 67.1 63.7 77.2 62.1 67.7 65.2 80.2 65.2 70.2 Ours 64.9 85.6 61.7 70.8 64.6 86.5 61.2 70.8 66.8 79.4 65.8 70.6 Table 3: The results of accuracy measurement of cross-dialect and cross-domain as well as cross-domain & cross-dialect Arabic sentiment analysis using two regional dialects and MSA data, covering three domains (books, hotels, and Twitter). from MSA to Arabic dialects. In agreement with the previously obtained results, all domain adaptation methods outperform the ZS-BERT method for all evaluated datasets by an average increment of 4.9% . CORAL, MMD, and DANN achieve comparable performances for most dialectal datasets. Moreover, the overall comparison results show that our method outperforms all other domain adaptation methods. The overall obtained results of the evaluated scenarios show that our method improves the transfer performance from contextualized word embedding. Moreover, it achieves far better transfer performance than the state-of-the-art methods that are based on the bag-of-words representation or pretrained word embedding. Indeed, all BERT-based domain adaptation methods yield a far better transfer learning performance than both DANN_BOW and ADRL methods. Besides, our method achieves better performance than CORAL, MMD, and DANN, which are implemented on top of BERT module. These results can be explained by the fact that BERT captures a high-level representation of the input text (Devlin et al., 2019; Antoun et al., 2020) as well as the effectiveness of ALDA. In fact, the latter aligns both domain output distributions using adversarial training and captures the discriminative features of the target domain inputs throughout self-training (Chen et al., 2020). Moreover, using BERT as a feature generator allows the model to extract high-level shared features of the input data that are transferable across domains and dialects. For instance, the results show that training DANN on top of BERT model outperforms DANNBOW , trained using the bag-of-words text representation, or even state-of-the-art methods that are based on pivot features extraction (HATN and PBLM), by a large margin for both cross-domain and cross-dialect sentiment analysis (Table 2 and Table 1). To understand why our proposed method outperforms the previous methods, we perform an error analysis. In this error analysis we focus on two aspects: the misclassified instances by our system and the instances correctly predicted by our method which the other approaches fail. For the first aspect, the majority of misclassified samples correspond to very short sentences in the target dialect. Most of them are either idiomatic, offensive or sarcastic expressions that are specific to the target dialect and contains words that are distant from MSA : r(cid:136)(cid:0) /wAErp/, wf l(cid:152)(cid:0) CA(cid:139) (cid:143)A} /gAr Allh yEfw wSAfy/, (cid:160)A(cid:24)V fi(cid:155) /mlA THAn/ and (cid:145)CA(cid:27) (cid:145)rJ /crf xArf/ 2 . It is worth mentionning that the other evaluated methods also misclassify these samples. For the second aspect, we have checked the cases where our method correctly predicts the instances labels while the other methods fail. Overall, we notice that the zero-shot predictions were biased to the distribution of the source data, as example the ArSAS dataset contains 63% of negative instances. MMD, CORAL and DANN overcome this issue by aligning the distribution of source and target features, which improves the results on the target domain. Meanwhile, they tend to misclassify reviews that convey multiple sentiment polarities, as the case for hotel reviews or books reviews, where users tend to express their negative and positive sentiments in the same review. Table 8 (Section B) shows a sample of these instances. Our method outperforms these DA methods since it relies on a noise-correcting discriminator that generates different noise vectors for the source and the target domain and learns a confusion matrix in an adversarial manner. By correcting the noise in pseudo labels of the target domain using the confusion matrix, we can achieve a class-wise feature alignment of the source and the target domains. Nevertheless, the other evaluated DA methods align the output features of the source and the target domain in class agnostic fashion. In this work, we have introduced an unsupervised domain adaptation method for Arabic cross-2 domain and cross-dialect sentiment analysis based on the pretrained AraBERT language model and the Adversarial-Learned Loss for Domain Adaptation (ALDA). We have performed several experiments to investigate the performance of our method as well as several state-of-the-art methods, adopting both the coarse-grained and the fine-grained taxonomies of Arabic dialects. Moreover, we have studied the performance of domain adaptation from the MSA to Arabic dialects using social media data. The overall obtained results showed that domain adaptation methods outperform zero-shot transfer from BERT model by a large margin. Furthermore, our method achieved a very promising performance and surpassed the evaluated methods on most test datasets. In future work, we plan to investigate domain adaptive pre-training by collecting unlabeled data for target domains and fine-tuning AraBERT using the MLM objective. The aim is to study the performance of our method using domain aware language model. Since the zero-shot transfer performance using BERT model drops significantly in cross-domain sentiment analysis experiments, we believe that training domain adaptation methods on top of domain aware BERT model will lead to improved performance. We also plan to study domain adaptation from rich-resource languages such as English to Arabic language and its dialects.
abstain abstain abstain abstain objective abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain objective objective objective objective abstain method abstain abstain abstain abstain other other other other other other other other other other other other other other other other other other other other other other other other other other other other other other other other method method method abstain abstain method method abstain abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method other abstain other abstain abstain other other abstain abstain abstain result result abstain abstain abstain abstain abstain abstain abstain other abstain abstain other abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result method method method method method method method abstain abstain abstain abstain result abstain abstain abstain abstain method method abstain abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain result abstain abstain result abstain abstain abstain abstain abstain method abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain objective method abstain result objective objective result method