Cross-Platform and Cross-Domain Abusive Language Detection with Supervised Contrastive Learning (2023)

Abstract: The prevalence of abusive language on different online platforms has been a major concern that raises the need for automated cross-platform abusive language detection. However, prior works focus on concatenating data from multiple platforms, inherently adopting Empirical Risk Minimization (ERM) method. In this work, we address this challenge from the perspective of domain generalization objective. We design SCL-Fish, a supervised contrastive learning integrated meta-learning algorithm to detect abusive language on unseen platforms. Our experimental analysis shows that SCL-Fish achieves better performance over ERM and the existing state-of-the-art models. We also show that SCL-Fish is data-efficient and achieves comparable performance with the large-scale pre-trained models upon finetuning for the abusive language detection task.

## introduction abusive language is defined as any form of microaggression, condescension, harassment, hate speech, trolling, and the like @xcite . use of abusive language online has been a significant problem over the years. although a plethora of works has explored automated detection of abusive language, it is still a challenging task due to its evolving nature @xcite @xcite . in addition, a standing challenging in tackling abusive language is linguistic variation as to how the problem manifests itself across different platforms @xcite @xcite . we provide examples illustrating variation of abusive language on different platforms in figure 1. 2 for example, user comments in broadcast1 source code: https://github.com/tawkat/ scl-fish-abusive-language 2 this paper contains several examples of abusive language and strong words for the purpose of demonstration. ing media such as fox news do not directly contain any strong words but can implicitly carry abusive messages. meanwhile, people on social media such as on twitter employ an abundance of strong words that can be outright personal bullying and spread of hate speech. on an extremist public forum such as gab, users mostly spread abusive language in the form of identity attacks. for these reasons, it is an unrealistic assumption to train an abusive language detector on data from one platform and expect the model to exhibit equally satisfactory performance on another platform. prior works on cross-platform abusive language detection @xcite @xcite usually concatenate examples from multiple sources, thus inherently applying empirical risk minimization (erm) @xcite . these models capture platform-specific spurious features, and lack generalization @xcite . @xcite , on the other hand, incorporate out-ofplatform data into training set and employ domainadaptive techniques. other works such as @xcite and gallacher (2021) develop one model for each platform and ensemble them to improve overall performance. none of the prior works, however, attempt to generalize task-oriented features across the platforms to improve performance on an unseen platform. in this work, we introduce a novel method for learning domain-invariant features to fill this gap. our approach initially adopts an first-order derivative of meta-learning algorithm @xcite , fish @xcite , that attempts to capture domain-invariance. we then propose a supervised contrastive learning (scl) @xcite to impose an additional constraint on capturing task-oriented features that can help the model to learn semantically effective embeddings by pulling samples from the same class close together while pushing samples from opposite classes further apart. we refer to our new method as scl-fish and conduct extensive experiments on a wide array of platforms representing social networks, public forums, broadcasting media, conversational chatbots, and syntheticallygenerated data to show the efficacy of our method over other abusive language detection models (and specially erm that prior works on cross-platform abusive language detection applied). to summarize, we offer the following contributions in this work: ## results on cross-platform datasets we show results of our models for cross-platform performance in ## analysis in this section, we conduct qualitative and quantitative analysis on the experimental results. ## error analysis we conduct an error analysis on the examples that scl-fish misclassified. we randomly sample 50 misclassified examples and divide them into three categories: false-abusive: examples that are normal but scl-fish categorizes them as abusive. offensive: examples that are degrading, harassing to an individual or untargeted abuse, trolling but scl-fish categorizes them as normal. hate: examples that contain targeted attacks towards a particular group or identity. we provide examples for each category in ## conclusion in this work, we addressed the problem of crossplatform abusive language detection from the domain generalization perspective. we proposed scl-fish, a supervised contrastive learning augmented meta-learning method to learn generalized task-driven features across platforms. we showed that scl-fish achieves better performance compared to the other state-of-the-art models and models adopting erm for cross-platform abusive language detection. our analysis also reveals that scl-fish achieves comparable performance on finetuning with much smaller data for crossplatform training than other data-intensive methods. our work demonstrates progress on both platform and domain generalization in the context of abusive language detection, which we hope future research can be extended to other areas of language understanding.