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

Md Tawkat Islam Khondaker, Muhammad Abdul-mageed, Laks Lakshmanan, V.s.

TL;DR

This paper introduces SCL-Fish, a novel method for detecting abusive language across different online platforms and domains. By combining supervised contrastive learning with a domain generalization technique (Fish), SCL-Fish achieves superior performance compared to existing methods, demonstrating its effectiveness in handling the linguistic variations inherent in online discourse.

What Problem Does This Paper Address?

The prevalence of abusive language online is a significant concern, and automated detection systems are crucial. However, existing methods often struggle with cross-platform and cross-domain detection because they typically concatenate data from various sources, leading to models that overfit to platform-specific features and fail to generalize to unseen platforms. This is exacerbated by the evolving nature of abusive language and its diverse manifestations across different online communities. The paper aims to address this challenge by developing a model that can generalize effectively across these diverse linguistic landscapes.

Methods

The core of the proposed solution is SCL-Fish, a method that integrates Supervised Contrastive Learning (SCL) with a domain generalization algorithm called Fish.

  • Fish: This component is based on the Inter-domain Gradient Matching (IDGM) algorithm, which itself is derived from Model-Agnostic Meta-Learning (MAML). Fish aims to learn domain-invariant features by aligning the gradients of different domains, effectively reducing the need for large amounts of data from new, unseen domains. It uses a first-order derivative approach for computational efficiency.
  • Supervised Contrastive Learning (SCL): To complement Fish's domain generalization capabilities, SCL is introduced. SCL encourages the model to learn semantically effective embeddings by pulling samples of the same class (abusive/normal) closer together in the hyperspace while pushing samples from different classes further apart. This helps the model focus on task-oriented features that are invariant across platforms and discriminative for abusive language detection.

By combining these two techniques, SCL-Fish aims to learn features that are both domain-invariant and discriminative for the abusive language detection task.

Datasets

The authors compiled a diverse set of datasets from various online platforms for their experiments. These include:

  • In-platform datasets for training/validation: fb-yt, twitter, wiki
  • Cross-platform evaluation datasets: stormfront, fox, twi-fb, reddit, convAI, hateCheck, gab, yt-reddit

The paper also mentions using the OLID dataset for finetuning experiments. The datasets vary in size, content, and annotation schemes, reflecting the real-world diversity of online abusive language.

Key Insights and Ideas

  • Domain Generalization is Crucial: The paper strongly emphasizes that simply concatenating data from multiple platforms (ERM approach) leads to models that overfit to platform-specific "spurious features" and perform poorly on unseen platforms. True cross-platform detection requires learning domain-invariant representations.
  • SCL Enhances Domain Generalization: While domain generalization techniques like Fish are effective, they can sometimes focus too much on invariant features, potentially missing subtle task-specific nuances. SCL helps by explicitly learning discriminative features, improving the model's ability to distinguish between abusive and non-abusive content.
  • Diversity Over Quantity: The authors highlight that having training data from diverse platforms, even if smaller in quantity, is more beneficial for cross-platform generalization than having a massive amount of data from a single platform. HateBERT, despite its large Reddit pre-training, struggled on cross-platform tasks, underscoring this point.
  • Implicit Abuse Remains Challenging: The error analysis reveals that detecting implicit abusive language, which may not contain direct profanity or strong keywords but relies on context and subtle cues, is still a significant challenge.

Key Results

  • Superior Performance: SCL-Fish consistently outperformed ERM, SCL-ERM, and Fish across most cross-platform datasets in terms of macro-F1 and positive-F1 scores.
  • Comparable to State-of-the-Art: SCL-Fish achieved comparable performance to large-scale pre-trained models (like HateBERT) when finetuned, even with significantly less data.
  • Data Efficiency: The method demonstrates good performance even with limited data, showcasing its data-efficient nature for cross-platform abusive language detection.
  • Robustness to Distribution Shift: SCL-Fish showed less performance deterioration on out-of-domain datasets compared to ERM-based methods, indicating its robustness to distribution shifts.
  • Qualitative Improvements: Attention visualizations showed that SCL-Fish, trained on platform-generalized settings, was better at attending to relevant contextual cues for identifying abusive language on out-of-platform datasets compared to platform-specific models.

Limitations and Future Work

  • Training Time: SCL-Fish is approximately 1.2x slower than Fish due to the added SCL component.
  • Subjectivity of Abuse: The subjective nature of abusive language and its annotation process across different datasets can negatively impact performance.
  • Implicit Abuse Detection: Detecting implicit abusive language remains a challenge and is identified as a direction for future exploration.
  • Extending to Other Areas: The authors hope their work on platform and domain generalization can be extended to other areas of language understanding.

Summary updated

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.
BibTeX
@inproceedings{khondaker2023cross,
  author = {Md Tawkat Islam Khondaker and Muhammad Abdul-mageed and Laks Lakshmanan, V.S.},
  title = {{Cross-Platform and Cross-Domain Abusive Language Detection with Supervised Contrastive Learning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
}
Figure