Joint Modelling of Emotion and Abusive Language Detection (2020)

Abstract: The rise of online communication platforms has been accompanied by some undesirable effects, such as the proliferation of aggressive and abusive behaviour online. Aiming to tackle this problem, the natural language processing (NLP) community has experimented with a range of techniques for abuse detection. While achieving substantial success, these methods have so far only focused on modelling the linguistic properties of the comments and the online communities of users, disregarding the emotional state of the users and how this might affect their language. The latter is, however, inextricably linked to abusive behaviour. In this paper, we present the first joint model of emotion and abusive language detection, experimenting in a multi-task learning framework that allows one task to inform the other. Our results demonstrate that incorporating affective features leads to significant improvements in abuse detection performance across datasets.

## introduction aggressive and abusive behaviour online can lead to severe psychological consequences for its victims @xcite . this stresses the need for automated techniques for abusive language detection, a problem that has recently gained a great deal of interest in the natural language processing community. the term abuse refers collectively to all forms of expression that vilify or offend an individual or a group, including racism, sexism, personal attacks, harassment, cyber-bullying, and many others. much of the recent research has focused on detecting explicit abuse, that comes in the form of expletives, derogatory words or threats, with substantial success @xcite . however, abuse can also be expressed in more implicit and subtle ways, for instance, through the use of am-biguous terms and figurative language, which has proved more challenging to identify. the nlp community has experimented with a range of techniques for abuse detection, such as recurrent and convolutional neural networks @xcite @xcite , character-based models @xcite and graph-based learning methods @xcite @xcite , obtaining promising results. however, all of the existing approaches have focused on modelling the linguistic properties of the comments or the meta-data about the users. on the other hand, abusive language and behaviour are also inextricably linked to the emotional and psychological state of the speaker @xcite , which is reflected in the affective characteristics of their language @xcite . in this paper, we propose to model these two phenomena jointly and present the first abusive language detection method that incorporates affective features via a multitask learning (mtl) paradigm. mtl @xcite allows two or more tasks to be learned jointly, thus sharing information and features between the tasks. in this paper, our main focus is on abuse detection; hence we refer to it as the primary task, while the task that is used to provide additional knowledge -emotion detection -is referred to as the auxiliary task. we propose an mtl framework where a single model can be trained to perform emotion detection and identify abuse at the same time. we expect that affective features, which result from a joint learning setup through shared parameters, will encompass the emotional content of a comment that is likely to be predictive of potential abuse. we propose and evaluate different mtl architectures. we first experiment with hard parameter sharing, where the same encoder is shared between the tasks. we then introduce two variants of the mtl model to relax the hard sharing constraint and further facilitate positive transfer. our results demonstrate that the mtl models significantly outperform single-task learning (stl) in two different abuse detection datasets. this confirms our hypothesis of the importance of affective features for abuse detection. furthermore, we compare the performance of mtl to a transfer learning baseline and demonstrate that mtl provides significant improvements over transfer learning. ## related work techniques for abuse detection have gone through several stages of development, starting with extensive manual feature engineering and then turning to deep learning. early approaches experimented with lexicon-based features @xcite , bagof-words (bow) or n-gram features @xcite , and user-specific features, such as age @xcite and gender @xcite . with the advent of deep learning, the trend shifted, with abundant work focusing on neural architectures for abuse detection. in particular, the use of convolutional neural networks (cnns) for detecting abuse has shown promising results @xcite . this can be attributed to the fact that cnns are well suited to extract local and position-invariant features @xcite . character-level features have also been shown to be beneficial in tackling the issue of out-of-vocabulary (oov) words @xcite , since abusive comments tend to contain obfuscated words. recently, approaches to abuse detection have moved towards more complex models that utilize auxiliary knowledge in addition to the abuse-annotated data. for instance, @xcite al. (2018a, 2019a mtl, introduced by @xcite , has proven successful in many nlp problems, as illustrated in the mtl survey of @xcite . it is interesting to note that many of these problems are domain-independent tasks, such as part-of-speech tagging, chunking, named entity recognition, etc. @xcite . these tasks are not restricted to a particular dataset or domain, i.e., any text data can be annotated for the phenomena involved. on the contrary, tasks such as abuse detection are domain-specific and restricted to a handful of datasets (typically focusing on online communication), therefore presenting a different challenge to mtl. much research on emotion detection cast the problem in a categorical framework, identifying specific classes of emotions and using e.g., ekman's model of six emotions @xcite , namely anger, disgust, fear, happiness, sadness, surprise. other approaches adopt the valence-arousal-dominance (vad) model of emotion @xcite , which represents polarity, degree of excitement, and degree of control, each taking a value from a range. the community has experimented with a variety of computational techniques for emotion detection, including vector space modelling @xcite , machine learning classifiers @xcite and deep learning methods @xcite . in their work, @xcite take an mtl approach to emotion detection. however, all the tasks they consider are emotion-related (annotated for either classification or emotion distribution prediction), and the results show improvements over single-task baselines. akhtar et al. (2018) use a multitask ensemble architecture to learn emotion, sentiment, and intensity prediction jointly and show that these tasks benefit each other, leading to improvements in performance. to the best of our knowledge, there has not yet been an approach investigating emotion in the context of abuse detection. ## datasets the tasks in an mtl framework should be related in order to obtain positive transfer. mtl models are sensitive to differences in the domain and distribution of data @xcite . this affects the stability of training, which may deteriorate performance in comparison to an stl model @xcite . we experiment with abuse and emotion detection datasets foot_0 that are from the same data domain -twitter. all of the datasets were subjected to the same pre-processing steps, namely lower-casing, mapping all mentions and urls to a common token (i.e., mtn and url ) and mapping hashtags to words. ## approach in this section, we describe our baseline models and then proceed by describing our proposed models for jointly learning to detect emotion and abuse. ## discussion auxiliary task our results show that emotion detection significantly improves abuse detection on both offenseval and waseem and hovy datasets. an example instance of this can be found in the latter is one of the most frequently used symbols in the semeval2018 emotion dataset, and it can encompass many emotions such as surprise, fear, etc., therefore, not being indicative of a particular type of emotion. such knowledge can be learned within the shared features of the mtl model. sample stl mtl gold label predicted emotion shut up katie and nikki... that is all :) #hashtag neither sexism sexism disgust mtn that's the disadvantage of following a religion of uneducated morons, so that you have to rely on kufir for everything. neither racism racism anger, disgust mtn earthly tyrants want to be feared because for them fear is control and obedience. the writer of the quran was unsophisticated. neither racism racism fear, optimism mtn and does this surprise any of us politician support-ers!!! not at all... we have heard him accused of everything that can be imagined!!! we still stand be-hind politician !!! offensive notoffensive notoffensive none mtn i m pretty sure you are not too bad yourself...thanks for a lil bit of sweetness on this brutal world offensive notoffensive notoffensive joy, optimism mtl vs. transfer learning this experiment demonstrates that mtl achieves higher performance than transfer learning in a similar experimental setting. the higher performance may be indicative of a more stable way of transferring knowledge, which leads to better generalization. in the mtl framework, since the shared parameters are updated alternately, each task learns some knowledge that may be mutually beneficial to both related tasks, which leads to a shared representation that encompasses the knowledge of both tasks and hence is more generalized. in contrast, in the case of transfer learning, the primary task fine-tunes the knowledge from the auxiliary task (i.e., in the form of pre-trained parameters) for its task objective and may be forgetting auxiliary task knowledge. ## conclusion in this paper, we proposed a new approach to abuse detection, which takes advantage of the affective features to gain auxiliary knowledge through an mtl framework. our experiments demonstrate that mtl with emotion detection is beneficial for the abuse detection task in the twitter domain. the mutually beneficial relationship that exists between these two tasks opens new research avenues for improvement of abuse detection systems in other domains as well, where emotion would equally play a role. overall, our results also suggest the superiority of mtl over stl for abuse detection. with this new approach, one can build more complex models introducing new auxiliary tasks for abuse detection. for instance, we expect that abuse detection may also benefit from joint learning with complex semantic tasks, such as figurative language processing and inference.