Hate Speech Detection Based on Sentiment Knowledge Sharing (2021)

Abstract: The wanton spread of hate speech on the internet brings great harm to society and families. It is urgent to establish and improve automatic detection and active avoidance mechanisms for hate speech. While there exist methods for hate speech detection, they stereotype words and hence suffer from inherently biased training. In other words, getting more affective features from other affective resources will significantly affect the performance of hate speech detection. In this paper, we propose a hate speech detection framework based on sentiment knowledge sharing. While extracting the affective features of the target sentence itself, we make better use of the sentiment features from external resources, and finally fuse features from different feature extraction units to detect hate speech. Experimental results on two public datasets demonstrate the effectiveness of our model.

## introducon with the prevalence of mobile internet and social media, phenomena such as the malicious spread of hate speech have gradually become widespread. this often has incalculable consequences and has become a serious social problem. how to quickly and accurately detect hate speech automatically, and then better intervene to prevent it has become one of the hot research issues in the field of natural language processing. the automatic detection of hate speech can prevent the viral spread of hate speech, thereby reducing the malicious spread of cyberbullying and harmful information. in the field of public opinion analysis, monitoring and intervention, hate speech detection has extensive value in application. in recent years, the hate speech detection has been paid more attention, and many research results have appeared. however, the task is quite * corresponding author: xiaochao fan, hongfei lin. deep learning methods have been widely used in the field of hate speech detection and have achieved good performance @xcite in recent years. @xcite compared the performance of various neural network models in detecting hate speech and used visualization techniques to give the models better interpretability. the semantics of hate speech contains a strong negative sentiment tendency. the deep learning methods of predecessors often only used pre-trained models or deeper networks to obtain semantic features, ignoring the sentiment features of the target sentences and external sentiment resources, which also makes the performance of neural networks unsatisfactory in hate speech detection. to overcome the weaknesses of previous works, we propose a hate speech detection framework based on sentiment knowledge sharing (sks) foot_0 . our intuition is that most hate speech contains words with strong negative emotions, which are usually the most direct clues to hate speech. meanwhile, as claimed by @xcite , lexical detection methods tend to have low precision because they classify all messages containing particular terms as hate speech. therefore, we hope to make better use of external sentiment resources so that the model can learn sentiment features and share them, which will greatly affect the performance of hate speech detection. in addition, inspired by the recent moe layer @xcite and the multi-gate mixture-of-experts (mmoe) model @xcite , we use multiple feature extraction units and use a gated attention mechanism to fuse features. the main contributions of this work are summarised as follows: ## related work hate speech is very dependent on the nuance of language. even if it is manually distinguished whether certain sentences contain hate semantics, consensus is rare @xcite . recently, automatically detecting hate speech has been widely studied by researchers. in this section, we will review related works on traditional machine learning-based methods, deep learning-based methods, and multi-task learningbased methods of hate speech detection. machine learning-based methods based on feature engineering are widely used in the field of hate speech detection. @xcite provided empirical evidence that n-gram features and sentiment features can be successfully applied to the task of hate speech detection. @xcite al. (2019 ) constructed a dataset of hate speech from facebook, and proposed a rich set of sentiment features, including negative sentiment words and negative sentiment symbols, to detect hate speech. del vigna12 et al. (2017) used the sentimental value of words as the main feature to measure whether a sentence constitutes hate speech. gitari et al. (2015) designed several sentiment features and achieved good performance in experiments. previous studies have shown that sentiment features play an important role in hate speech detection. recently, deep learning-based methods have garnered considerable success in hate speech detection. @xcite fed input into a convolutional neural network (cnn) and a gated recurrent unit (gru) to learn higher-level features. @xcite proposed a transformed word embedding model (twem), which had a simple structure but can achieve better performance than many complex models. @xcite found that due to the limitation of the training set, the deep learning model would have "bias" and he designed and implemented a "bias removal" strategy to detect hate speech. tekiroglu et al. (2020) constructed a large-scale dataset based on hate speech and its responses and used the pre-trained language model, gpt-2, to detect hate speech. obviously, deep learning models can extract the latent semantic features of text, which can provide the most direct clues for detecting hate speech. multi-task learning can learn multiple related tasks and share knowledge at the same time. in recent years, there have been some achievements in the field of hate speech detection. @xcite proposed a deep multi-task learning (mtl) framework to leverage useful information from multiple related classification tasks in order to improve the performance of hate speech detection. @xcite introduced a novel formulation of a hate speech type identification problem in the setting of multi-task learning through their proposed fuzzy ensemble approach. ousidhoum et al. (2019 ) presented a new multilingual multi-aspect hate speech analysis dataset and used multi-head attention feed forward max pooling avg pooling feed forward multi-head attention feed forward max pooling avg pooling feed forward multi-head attention feed forward max pooling avg pooling feed forward word embedding category embedding gate1 feed forward feed forward hate speech task sentiment task gate2 figure 1: the overall framework of our proposed hate speech detection based on sentiment knowledge sharing(sks). it to test the current state-of-the-art multilingual multitask learning approaches. ousidhoum et al. (2019) proposed bert-based multi-task learning for offensive language detection. some studies have shown that multi-task learning can improve the performance and generalization ability of models in hate speech detection by using the correlation between the task of sentiment analysis and hate speech detection. ## methodology in this section we introduce our model, sks. our model is able to improve hate speech detection by considering both target sentence sentiment and external sentiment knowledge. the overall architecture of sks is shown in figure 1 . the framework consists mainly of three layers: 1) input layer. in order to better obtain the sentiment features of the sentence itself, we use a derogatory words dictionary to judge whether each word is a hate word, and then append the category information to the word embedding. 2) sentiment knowledge sharing layer. since sentiment analysis and hate speech detection are highly correlated, we use the multi-task learning framework to model task relationships and learn task-specific features to take advantage of shared sentiment knowledge. we use multiple feature extraction units composed of a multi-head attention layer and a feedforward neural network. 3) gated attention layer. a gated attention mechanism is used to output the probability that the feature extraction unit is selected. finally, a feedforward neural network is used to detect hate speech. ## experiments in this section, we first introduce the datasets and evaluation metrics. then we compare the performance of our model with several strong baselines. finally, a detailed analysis is given. ## conclusion and future work in this paper, we explore the effectiveness of multitask learning in hate speech detection tasks. the main idea is to use multiple feature extraction units to share multi-task parameters so that the model can better share sentiment knowledge, and then gated attention is used to fuse features for hate speech detection. the proposed model can make full use of the sentiment information of the target and external sentiment resources. we show that sentiment knowledge sharing improves system performance over the baselines and advances hate speech detection. finally, the detailed analysis further proves the validity and interpretability of our model. overall, our experiments give us a better understanding of the relationship between hate speech detection and sentiment analysis through multitask learning. we have laid the groundwork for future efforts in better modelling and data selection, including different types of hate speech, the type and scale of sentiment data, and so on.