XH ate-999: Analyzing and Detecting Abusive Language Across Domains and Languages (2020)

Abstract: We present XHate-999, a multi-domain and multilingual evaluation data set for abusive language detection. By aligning test instances across six typologically diverse languages, XHate-999 for the first time allows for disentanglement of the domain transfer and language transfer effects in abusive language detection. We conduct a series of domain- and language-transfer experiments with state-of-the-art monolingual and multilingual transformer models, setting strong baseline results and profiling XHate-999 as a comprehensive evaluation resource for abusive language detection. Finally, we show that domain- and language-adaption, via intermediate masked language modeling on abusive corpora in the target language, can lead to substantially improved abusive language detection in the target language in the zero-shot transfer setups.

## introduction in the era of ever-growing amounts of user-generated online content it is becoming increasingly difficult to scale up moderation efforts @xcite . however, the need for moderation is rapidly increasing due to escalated toxic behavior online, enabled by "hiding" behind anonymous profiles, lack of physical contact between participants (i.e., the communication is then typically perceived as less personal), and lack of direct negative societal consequences @xcite . consequently, research on automated methods for detecting abusive language in user-generated content is becoming increasingly important. while such methods cannot completely replace human moderators, they are very helpful as assistance tools, offering moderation suggestions, thus partially automating and expediting human moderation work. the focus of abusive language detection is still predominantly on a single language -english, and single-domain setups (e.g., twitter). however, some recent initiatives have aspired to broaden the scope of abusive detection methodology to other languages, showcasing the usefulness of cross-lingual transfer for the task @xcite @xcite . another line of research @xcite @xcite , inter alia) focuses on benefits of cross-domain transfer in monolingual settings. an interesting aspect, currently lacking in prior work, is the interaction of cross-lingual and cross-domain settings. furthermore, except for some notable exceptions discussed in §2, previous work in cross-lingual setups is still tied to resource-rich and typologically similar languages (e.g., english, german, spanish, italian) @xcite . we aim to fill both these gaps by introducing xhate-999, a multilingual data set annotated for abusive language in three domains, and carefully manually translated from english to 5 typologically diverse languages, with 999 semantically aligned test instances across all languages. unlike other abusive language detection data (surveyed in §2), xhate-999 allows us to separate the effects that occur due to domain shift from the effects related to language shift. current data sets typically confound the two: i.e., a switch to a test set from a different language also implies a change of the topic/domain. having an identical domain in the source language and the target language enables research questions such as: is domain shift or language shift more instrumental to performance decrease in transfer settings? are these patterns consistent across different domains and languages? moreover, covering semantically aligned test instances, xhate-999 enables direct comparisons on different target languages, giving rise to the following research questions: how consistent is model behavior across languages? ceteris paribus, is abusive language detection in some languages inherently more difficult than in the others? is this behavior consistent across different domains? besides offering xhate-999 as the new evaluation resource to the community, in this work we also aim to provide answers to the questions posed above. we evaluate state-of-the-art transfer learning methodology based on pretrained monolingual and multilingual transformer models -roberta @xcite , monolingual english bert and multilingual bert (mbert) @xcite , and xlm-r @xcite ) -in a range of in-domain and cross-domain monolingual and cross-lingual experimental setups. these evaluations set strong and challenging baseline results on xhate-999, and show that cross-lingual performance drops depend, among other aspects, 1) on the actual domain and corresponding abusive language properties (e.g., abusive unigrams versus abusive phrases), and 2) on typological properties of the target language and linguistic distance to english as the source language (e.g., smaller drops are observed on german as the target language than for turkish or albanian). we also empirically verify that training data augmentation by merging training examples from different domains can be very detrimental to both monolingual and cross-lingual performance in cases where the abusive language domains are too distant. finally, we introduce a simple transfer model adaptation that yields improved performance in crosslingual transfer for abusive language detection. inspired by recent work on additional domain-adaptive pretraining @xcite as well as additional target language pretraining @xcite , we propose to continue training mbert and xlm-r via masked language modeling (mlm) (i.e., the so-called intermediate mlm-ing) on automatically extracted "hateful" raw text in the target languages. 1 we show that this additional language and domain adaptation of the base massively multilingual model can yield further performance gains: we obtain higher scores than mlm-ing on randomly sampled raw text of the same size, confirming that both language adaptation and adaptation to abusive language are required to boost transfer performance. ## related work and motivation variants of abusive language. abusive language appears in many flavors, including sexism, racism @xcite , toxicity @xcite , hatefulness @xcite , aggression @xcite , attack @xcite , cyberbullying @xcite , misogyny @xcite , obscenity, threats, and insults. @xcite proposed a systematic typology of toxic language. another typology focusing more on the nature of targets of abusive texts was proposed by @xcite . a similar scheme, expanded to include the personal sentiments of annotators, was introduced by @xcite . a very fine-grained hierarchical annotation scheme including 81 different types of annotations was used to label the data set of @xcite . furthermore, @xcite propose an iterative crowdsourcing-based approach to derive a set of high-quality abusive language labels. recently, it has been pointed out that existing abusive language data sets are biased towards certain types of abuse @xcite and domains/topics @xcite . in this work, we combine three different abusive language variants -hatefulness @xcite , aggression @xcite , and attack @xcite -spanning three distinct data sources (comments under fox news stories, twitter/facebook posts, and wikipedia edit messages, respectively) into an integrated and cross-language aligned multilingual evaluation resource. ## monolingual evaluation: analyses across domains we rely on english training data for wul, trac, and gao (see §3) in all monolingual and cross-lingual experiments. we first focus on cross-domain experiments in monolingual english settings. in short, we analyze the difference in performance when training 1) on all available training data from all three data sets (wul+trac+gao; this setup is labeled all); 2) only on the training set which corresponds to the particular test subset (e.g., when testing on wul we train only on wul training data; this setup is labeled same); and 3) on a non-corresponding training set (e.g., when testing on wul, we train on trac or gao training data), probing the impact of domain shift. ## cross-lingual transfer and evaluation in our zero-shot language transfer experiments, the focus is on the all and same setups, which provided the peak scores in the english monolingual experiments in §4. 5 in the cross-lingual all setup, we again train on the merged wul+trac+gao english training data, while in the same setup, we train on one of the three english training portions, and test on the corresponding test subset in the target language (i.e., we evaluate wul-wul, trac-trac, and gao-gao training-test combinations). transfer setup. we adopt the massively multilingual pretrained transformers as a state-of-the-art mechanism for zero-shot language transfer. concretely, we conduct our experiments using multilingual bert (mbert) @xcite and xlm-on-roberta (xlm-r) @xcite ). 6,7 training, validation, and optimization procedures as well as the hyperparameters are exactly the same as those reported for monolingual english experiments (see experimental setup in §4). results and discussion. a summary of the cross-lingual transfer results on all test xhate-999 subsets in all target languages is provided in figure 1 . first, comparing the results of massively multilingual models versus english-specific pretrained lms on the english test sets (still no transfer involved), we now report slight performance drops: peak scores with en roberta versus xlm-r decrease from 90.7 to 89.2 on wul, from 77.3 to 76.0 on trac, and from 70.3 to 59.3 on gao. similar trends are observed in the bert versus mbert comparison. this is expected and can be explained through the well-known "curse of multilinguality" @xcite @xcite , where multilingual models with limited capacity trade off their performance in a particular language for much higher portability and transfer ability. foot_7 xlm-r generally offers stronger transfer performance than mbert for abusive language detection, which is in line with findings from other tasks @xcite . we observe large performance drops in the wul same and all setups with mbert. the drops, although smaller, are also pronounced when using xlm-r. however, transfer performance is much higher and more stable in the same setup for the other two domains -trac and gao -while there are still conspicuous performance drops in the all setup. we hypothesise that, due to a large english wul training set, the models overfit to the english data much more than when trained on significantly smaller trac and gao training sets. we also speculate that the drops are due to the nature of the wul data, which does not come from social media, so it typically contains longer and more complex utterances (wul utterances are on average 25% and 30% longer than trac and gao utterances, respectively). this means that the abusive language detection model is more likely to overfit to abusive idiomatic expressions in english, which are more difficult to semantically align to similar expressions in target languages via the shared multilingual semantic representation space. when testing on trac and gao, the results suggest that it is more effective to transfer the model trained on their respective in-domain training portions than the model trained on the merged all data. effectively, this implies that the detection model cannot handle both domain and language transfer simultaneously for these two domains. language transfer without any domain shift outperforms transfer with more (but also more out-of-domain) training data: the useful signal for the two test sets gets overwritten by the much larger wul training data, and the model then tends to overfit to wul. however, the opposite is true with wul test data: we see improvements in the all setup over the same setup for all target languages. we hypothesize that, again due to a large wul en training corpus, adding training data from other two domains in fact acts as a regularization mechanism: it can impede the idiomatic overfitting to english which is difficult to transfer to other languages. besides the actual domain (and its shift), the properties of the target language also impact transfer performance. the pattern is especially visible in wul evaluations for both training setups: performance drops are much lower for german, the target language most similar to en (i.e., both are germanic languages), while we note the highest drop on tr as the only non-indo-european language and agglutinative language in our target language sample. however, this pattern does not hold on trac and gao evaluations: e.g., absolute results on tr gao are higher than in any other target language, and we observe a similarly strong result on tr trac. while the variation might be partially due to small training and test gao data, stable results in transfer experiments on trac across all target languages suggest that the complexity (or rather simplicity) of the abusive language domain and data also plays a role in transfer capability. overall, the results indicate that the success of cross-lingual transfer depends on a multitude of factors such as the actual task formulation (i.e., abusive language domain) and the nature of abusive language data, (dis)similarity between the source and the target language, the actual transfer methodology, and in-domain versus cross-domain training. our work has aimed to disentangle all these factors in order to measure their contribution to the final transfer performance, and future work should pay more attention to their complex interactions in transfer experiments for abusive language detection. ## conclusion and future work we have presented xhate-999, a data set enabling evaluation of both cross-domain and cross-lingual abusive language detection, and in-depth explorations of the interplay between language shift and domain shift. xhate-999 spans three diverse abusive language domains and six diverse languages. the semantic alignment between test instances in all languages for the first time enables comparative analyses of model behavior across domains and languages. we have also profiled the potential of xhate-999 as a comprehensive resource for evaluating abusive language detection through a series of in-domain and cross-domain experiments in monolingual and cross-lingual setups with state-of-the-art transfer learning models. we have then demonstrated that domain-adaptive and language-adaptive additional pretraining of general-purpose multilingual models (multilingual bert and xlm-r) can yield further performance gains in transfer experiments, especially for resource-lean languages. we hope that xhate-999 will inspire and instigate deeper understanding of the underlying phenomena and further research on cross-lingual and cross-domain abusive language detection, with a stronger focus towards diverse and resource-lean languages and domains. we make the xhate-999 data set publicly available at https://github.com/codogogo/xhate .