Towards Weakly-Supervised Hate Speech Classification Across Datasets (2023)

Abstract: As pointed out by several scholars, current research on hate speech (HS) recognition is characterized by unsystematic data creation strategies and diverging annotation schemata. Subsequently, supervised-learning models tend to generalize poorly to datasets they were not trained on, and the performance of the models trained on datasets labeled using different HS taxonomies cannot be compared. To ease this problem, we propose applying extremely weak supervision that only relies on the class name rather than on class samples from the annotated data. We demonstrate the effectiveness of a state-of-the-art weakly-supervised text classification model in various in-dataset and cross-dataset settings. Furthermore, we conduct an in-depth quantitative and qualitative analysis of the source of poor generalizability of HS classification models.

## introduction due to a growing concern about its impact on society, hate speech (hs) recognition recently received much attention from the nlp research community @xcite . a large number of proposals on how to address hs as a supervised classification task have been put forward; see, among others, @xcite @xcite and several shared tasks have been organized @xcite . however, while transformer models such as bert @xcite achieved impressive performance on various benchmark datasets @xcite , recent work demonstrated that stateof-the-art hs classification models generalize poorly to datasets other than the ones they have been trained on @xcite @xcite , even when the datasets come from the same data source, e.g., twitter. this casts a doubt on what we have achieved in the hs classification task. @xcite identify three main challenges related to hs classification: 1. the definitorial challenge: while the interpretation of what is hs highly depends on the cultural and social norms of its creator @xcite , state-of-the-art hs research favours a universal definition; 2. the annotation challenge: due to the subjective nature of hs, the annotation also often depends on the context, the social bias of the annotator, and their familiarity with the topic @xcite , such that the annotators with different backgrounds tend to provide deviating annotations @xcite , especially when not only the presence of hs is to be annotated, but also its category and the group it targets @xcite ; 3. the learning and evaluation challenge: the common evaluation practice of the hs classification models assumes that the distributions of the training data and the data to which the model is applied are identical, which is not the case in reality; real-world hs data is relatively rare, while the strategies applied for the creation of hs datasets favor explicit hs expressions @xcite , using search with explicit target keywords @xcite . in order to address these challenges, we propose the use of extremely weak supervision, which uses category names as the only supervision signal @xcite : extremely weak supervision does not presuppose any definition of hs, which would guide the annotation, such that when the interpretation of what is to be considered as hs is modified, we can retrain the model on the same dataset, without the need of re-annotation. furthermore, when the data distribution changes, the model can learn from unlabeled data and adapt to a new domain. our contributions can be summarized as follows: ## related work since our goal is to advance the research on hs classification, we focus, in what follows, on the review of related work in this area and refrain from the discussion of the application of weakly supervised supervision models to other problems. standardizing different hs taxonomies across datasets is a first step in performing cross-dataset analysis and experiments. to this end, @xcite created a category mapping among six publicly available hs datasets. furthermore, they measured the data similarity of categories in an intra-and inter-dataset manner and reported the performance of a public hs classification api on different datasets and categories. other previous work in cross-dataset hs classification followed similar experimental settings by training a supervised classifier on the training set of each dataset and reporting the performance on the corresponding test set and test sets from other datasets. for instance, @xcite trained linear svm models on 9 different hs datasets. they showed that models performed considerably worse on out-of-domain datasets. they further performed domain adaptation using the feda framework @xcite and demonstrated that having at least some indomain data is crucial for achieving good performance. similarly, @xcite compared linear svm, lstm, and bert models trained on different datasets. they reported that some pairs of datasets perform well on each other, likely due to a high degree of overlap. they also claimed that a more balanced class ratio is essential for the datasets' generalizability. @xcite conducted a large-scale cross-dataset experiment by training a total of 1,698 classifiers using different algorithms, datasets, and other experimental setups. they demonstrated that the generalizability does not only depend on the dataset, but also on the model. transformer-based models have a better potential to generalize to other datasets, likely thanks to the wealth of data they have observed during pretraining. furthermore, they built a random forest classifier to predict the generalizability based on human-engineered dataset features. the experiment revealed that to achieve cross-dataset generalization, the model must first perform well in an intra-dataset scenario. in addition, inconsistency in class definition hampers generalizability. wiegand et al. (2019) and arango et al. (2019) studied the impact of data bias on the generalizability of hs models, with the outcome that popular benchmark datasets possess several sources of biases, such as bias towards explicit hs expressions, topic bias, and author bias. the classification results dropped significantly when the bias is reduced. to this end, they proposed using cross-dataset classification as a way to evaluate models' performance in a more realistic setting. @xcite argued that the low frequency of online hs impedes obtaining a wide-coverage hs detection dataset. to this end, they proposed a two-path bootstrapping approach involving an explicit slur term learner and an lstm @xcite classifier. the slur term learner is initialized with a list of hand-engineered seed slur terms and applies to an unlabeled dataset to automatically label hateful posts, which are used to train the classifier. the slur term learner and the classifier are trained iteratively in a co-training manner @xcite . a distinct approach was proposed by @xcite . this approach utilized multi-task learning (mtl) to enhance domain robustness. they trained a classifier on three distinct sets of annotations: waseem and hovy (2016), waseem (2016), and @xcite . while mtl helps to prevent overfitting and may provide auxiliary fine-grained predictions, it requires annotating a dataset using different taxonomies, granularities, or aspects. our approach is most similar to @xcite 's, which also applied weakly-supervised learning on a target-domain dataset. however, their approach requires mining a list of 30 high-quality keywords for each category from a large labeled source-domain dataset. moreover, they assume that the source and target datasets are labeled using the same hs taxonomy. ## weakly-supervised hs classification in this section, we briefly introduce the basics of weakly supervised text classification and then discuss the cross-dataset classification we aim for. ## conclusions and future work we applied extremely weakly-supervised methods to hs classification. we analyzed the transferability of hs classification models through comprehensive in-dataset and cross-dataset experiments and confirmed that weakly-supervised classification has several advantages over the traditional supervised classification paradigm. first, we can apply the algorithm across various hs datasets and domains with taxonomies that cannot be standardized using category mapping. second, weakly-supervised models can readily utilize unlabeled documents in the target domain and do not suffer from domain mismatch problems. lastly, weak supervision allows us to "reannotate" a labeled dataset using a different class definition to facilitate cross-dataset comparison, which was previously possible only at the cost of expensive manual annotation. the presented work is only the beginning of applying weak supervision to hs detection. we can utilize richer category representations than bag-ofkeywords. however, such representations should be derived in an unsupervised or weakly-supervised manner to avoid depending on manually labeled datasets. a promising approach in this direction is @xcite , which extracts hs targets and aspects relying on open-domain concept extraction. lastly, we can study how well the model can generalize to previously unknown categories, a more challenging task often known as zero-shot classification @xcite or open-world classification @xcite .