Multitask Learning for A rabic Offensive Language and Hate-Speech Detection (2020)

Abstract: Offensive language and hate-speech are phenomena that spread with the rising popularity of social media. Detecting such content is crucial for understanding and predicting conflicts, understanding polarisation among communities and providing means and tools to filter or block inappropriate content. This paper describes the SMASH team submission to OSACT4’s shared task on hate-speech and offensive language detection, where we explore different approaches to perform these tasks. The experiments cover a variety of approaches that include deep learning, transfer learning and multitask learning. We also explore the utilisation of sentiment information to perform the previous task. Our best model is a multitask learning architecture, based on CNN-BiLSTM, that was trained to detect hate-speech and offensive language and predict sentiment.

## introduction social media platforms provide a versatile medium for people to communicate with each other, share ideas and express opinions. these user-driven platforms have a challenge when it comes to controlling the content being fed into them. people have different intentions, while some might use these platforms for their intended purposes, others might be sharing inappropriate content such as pornographic images or racist speech towards others. detecting such content is very important for these platforms. for example, it is necessary to add filtration features to hide adult-only content in order to protect children @xcite . also, such detection systems are important to provide real time monitoring of the content being fed to these platforms, which could be promoting hate crimes or racism against various groups of people. an early detection of this phenomena could help in preventing the escalation from speech to actions @xcite . platforms such as twitter, facebook and youtube are putting effort into fighting the spread of hate-speech, racism and xenophobia on their platforms. thus, having robust detection systems is extremely important @xcite . according to cambridge dictionary 1 hate-speech is defined as "public speech that expresses hate or encourages violence towards a person or group based on something such as race, religion, sex or sexual orientation". there has been a large amount of studies on how to automatically detect hate-speech, offensive language and obscene content. the approaches vary from using word-lists, syntactic and semantic features to deep learning models. this paper is a description of our submission (smash team) to the shared task of offensive language and hatespeech detection @xcite . this task is a part of the open-source arabic corpora and corpora processing tools (osact4) workshop. in this paper, we explore various approaches to detect hate-speech and offensive lan-1 https://dictionary.cambridge.org/dictionary/english/ guage, which include deep learning, transfer learning and multitask learning. our best model is a multitask learning architecture that was trained to detect both hate-speech and offensive language. ## related work there has been some work on tasks related to hate-speech and offensive language detection, especially in english. most of the work view the problem as a classification task where the goal is to assign a specific label to a given input. early work on such task includes @xcite , where the authors used multiple features such as n-grams and sentiment to train a classifier for harassment detection. in their work, they used a manually labelled dataset of discussion threads. @xcite proposed a multilevel classifier to detect offensive messages, in which they utilised a set of manually collected words and phrases. @xcite proposed a machine learning based approach for abusive language detection. they utilised multiple features such as n-grams, linguistic features, syntactic features and word embeddings. they also created a new dataset using comments from yahoo finance and news. @xcite built a corpus of tweets that contain hate-speech. in their work, they utilised a lexicon of hate-speech keywords in order to collect relevant tweets. the collected data was labelled into three classes: hate-speech, offensive language and neither. they built a classifier to detect hatespeech, their analysis showed that raciest and homophobic are likely to be classified as hate-speech. in @xcite , the authors trained an svm classifier for hate-speech detection, the classifier relies on n-gram based features. in 2019, offenseval @xcite was introduced to be part of semeval. this competition has multiple sub-tasks such as offensive language detection, offence categorisation and offence target identification. regarding arabic, there were few attempts to approach the problems of offensive language and hate-speech detection. these include the work of @xcite , where the authors proposed a method to automatically expand word lists for obscene and offensive content. in their work, they created an initial list of seed words, which was used to collect a set of tweets. from the collected tweets, they extracted the patterns that are used to express offensiveness. they followed that with manual assessment and used other resources to create the final word-list. in another work @xcite , the authors used the wordlist as a seed to create a training set, which they used to experiment with and create an offensive language detector. @xcite proposed a method to detect abusive language, they used svm with n-gram features for the classification where they achieved an f1-score of 0.82. they collected their own dataset from youtube comments. albadi et al. ( 2018 ) created a dataset of religious hate-speech discussions on twitter, they used this data to train an rnn based classifier for automatic detection of hate-speech, they achieved 0.84 area under the roc curve. the authors also used their dataset to create multiple hate-speech lexicons. @xcite experimented with cyberbullying detection, where they utilised a dataset that they collected from facebook and twitter. they used n-gram features and experimented with multiple classifiers such as naive bayes and svm. ## dataset description the dataset is the same one provided in semeval 2020 arabic offensive language task. it consists of 10,000 tweets labelled for offensive language and hate-speech. the annotation assumes that a tweet is offensive if it contains an insult, attack or inappropriate language. while a tweet is assumed to contain hate-speech if it was directed towards a group or an entity. ## proposed models in this section, we provide details of the different steps and models we used in the experiments. ## conclusion and future work in this work, we presented our system to perform hatespeech and offensive language detection. the experiments show that using a multitask learning setting was extremely useful due to the high correlation between the two tasks. we also explored the effect of adding sentiment information, which proved to be useful. this is explained by the fact that hate-speech and offensive content always bear negative sentiment. thus, sentiment information is correlated with hate-speech and offensive language. in the future, we hope to improve the results through the utilisation of other resources such as lexicons and experimenting with more multitask learning settings.