Lifelong Learning of Hate Speech Classification on Social Media (2021)

Abstract: Existing work on automated hate speech classification assumes that the dataset is fixed and the classes are pre-defined. However, the amount of data in social media increases every day, and the hot topics changes rapidly, requiring the classifiers to be able to continuously adapt to new data without forgetting the previously learned knowledge. This ability, referred to as lifelong learning, is crucial for the real-word application of hate speech classifiers in social media. In this work, we propose lifelong learning of hate speech classification on social media. To alleviate catastrophic forgetting, we propose to use Variational Representation Learning (VRL) along with a memory module based on LB-SOINN (Load-Balancing Self-Organizing Incremental Neural Network). Experimentally, we show that combining variational representation learning and the LB-SOINN memory module achieves better performance than the commonly-used lifelong learning techniques.

## introduction with the rapid rise in user-generated web content, the scale and complexity of online hate have reached unprecedented levels in recent years. adl (anti-defamation league) conducted a nationally representative survey of americans in december 2018 and the report shows that over half (53%) of americans experienced some type of online harassment. 1 this number is higher than the 41% reported to a comparable question asked in 2017 by the pew research center @xcite . to address the growing online hate, a great deal of research has focused on automatic hate speech classification. most of the previous work focuses on binary classification @xcite @xcite @xcite or coarse-grained multi-figure 1 : an illustration of our proposed task. hg i : the ith hate group. the model is trained on a sequence of sub-datasets, split by their hate ideologies, e.g., anti-muslim and kuklux klan. the task on each sub-dataset is to identify the hate group given the tweet. a report from l1ght 3 , a company that specializes in measuring online toxicity, suggests that amid the growing threat of the coronavirus, there has been a 900% growth in hate speech towards china and chinese people on twitter since february 2020. as a result of the rapid change of social media content, the hate speech classifiers are required to be able to continuously learn and accumulate knowledge from a stream of data, i.e., lifelong learning. learning on each portion of the data is considered as a task, so a stream of tasks are joined to be trained sequentially. in this work, we propose a novel lifelong fine-grained hate speech classification task, as illustrated in figure 1 . the models trained by isolate learning tend to face catastrophic forgetting @xcite @xcite due to a non-stationary data distribution in lifelong learning. to address this problem, an extensive body of work has been proposed for various lifelong learning tasks. however, our experiments show that the commonly-used lifelong learning methods still exhibit catastrophic forgetting in our proposed tasks. one important difference between the twitter hate group dataset and the other image datasets commonly used in lifelong learning study is that the similarity among the different tasks is unstable and relatively low, as indicated by the low average jaccard indexes of the topic words in to alleviate this problem, we introduce vrl to distill the knowledge from each task into a latent variable distribution. we also augment the model with a memory module and adapt the clustering algorithm, lb-soinn, to select the most important samples from the training dataset of each task. our contributions are three-fold: ## related work most research on lifelong learning alleviates catastrophic forgetting in the following three directions. regularization-based methods: these methods impose constraints on the weight update. the goal traditional. avg ji: the average of the jaccard index between the topic words of one ideology and those of another ideology. the topic words are extracted by latent dirichlet allocation (lda) @xcite . the top 2 most frequent topic words are selected as keywords. there are also studies combining multiples methods above. @xcite combine the architecture-based method and the data-based method. @xcite combine the regularization method and the data-based method for lifelong learning on relation extraction. our proposed method is also a combination of the regularization method and the data-based method but in a different way. ## task description we use the dataset as in @xcite , where the tweet handles are collected based on the hate groups identified by splc. splc categorizes these hate groups according to their hate ideologies. for each hate ideology, the top three twitter handles are selected in terms of the number of followers. the dataset includes all the content (tweets, retweets, and replies) posted with each twitter account from the group's inception date, as early as 2009, until 2017. altogether, the dataset consists of 42 hate groups from 15 different ideologies. we separate the dataset by ideology. the rea-son is that various existing hate speech datasets collect data using keywords or hashtags @xcite @xcite , which have a strong relationship with hate ideologies or topics. we also observe that the hot spots of society can lead to a significant shift of major hate speech topics or the emergence of new hate ideologies on social media as mentioned in section 1, indicating that the expansion of the hate speech dataset may be accompanied by the emergence of new hate ideologies. therefore, we separate the collected data into a sequence of 15 subsets according to their ideologies and sort them by the date of the first tweet post in each subset, from the earliest to the latest. the task on each subset is to identify the hate group given the tweet text. @xcite propose a hierarchical conditional variational autoencoder model for the fine-grained hate speech classification task. the architecture and the training process of their model require the number of classes to be pre-defined. however, we do not pre-define the number of classes in our task since such kind of information is not available in the real-world application of lifelong learning. the model should be able to incorporate emerging hate groups at any time of training. in order to satisfy this condition, we formulate the task of identifying the group as a ranking task, instead of a classification task. for each tweet, we provide the model with a set of candidate groups, consisting of all the previously seen hate groups, including the ground truth group. the model takes each combination of the tweet and the candidate group as input and outputs a score. the corresponding loss function is: same as in other lifelong learning studies, we consider learning on each of the hate ideologies in the sequence as a task, so we have a sequence of 15 tasks. as mentioned in section 1, the similarity among our tasks is unstable and relatively low. therefore, when the model is continuously trained on the tasks, it may encounter a sudden change of vocabulary, topic, and input data distribution. this makes our tasks more challenging compared to the other lifelong learning tasks because the abrupt change can make the catastrophic forgetting problem more severe. this is also the reason that some techniques achieving significant improvement in the image classification tasks do not perform well on our task (see section 5). ## our approach as mentioned in section 2, one way to alleviate catastrophic forgetting is to use a memory module, storing a small number of real samples from previous tasks and a simple way to utilize the memorized samples is to replay the memory when training on a new task, such as mixing them with the training samples from the current task. the idea behind this approach is that the memorized samples should reflect the data distribution so that the replay of the memory can help the model make invariant predictions on the samples of the previous tasks. however, this approach may not work well when the size of the memory is small. the reason is that when there is only a small amount of data memorized, the memory is not able to reflect the data distribution of the previous task and thus the model can easily overfit on the memorized samples instead of generalizing to all the samples in the previous task. we address this problem from two aspects. first, since the memory size is limited, it is beneficial to select the most representative training samples in the previous tasks to memorize. second, simply storing the real training samples in the memory may not be sufficient to represent the knowledge of the previous tasks, so we need a better way to distill knowledge from the observed samples along with a method to utilize it when training on a new task. we combine two techniques: variational representation learning (vrl) and load-balancing self-organizing incremental neural network (lb-soinn) to achieve these goals. we propose a supervised version of lb-soinn to select the most important training samples in the current task. vrl not only distills the knowledge from the current training task but also provides an appropriate hidden representation as input for the lb-soinn, so we introduce vrl first. ## conclusion in this paper, we introduce the lifelong hate speech classification task and propose to use the vrl and lb-soinn memory module to alleviate catastrophic forgetting. our proposed method has the potential to benefit other lifelong learning tasks where the similarity between the contiguous tasks can be low. we intend to make our implementation freely available to facilitate more application and investigation of our method in the future.