Generalisability of Topic Models in Cross-corpora Abusive Language Detection

Tulika Bose, Irina Illina, Dominique FohrNAACL 2021

TL;DR

This paper tackles the challenge of abusive language detection models failing when applied to new datasets (corpora) different from their training data. They propose combining a powerful pre-trained language model (HateBERT) with topic modeling (U-TDLM) to improve this "generalizability," showing that topic information helps the model better understand and detect abusive language across different online communities.

What Problem Does This Paper Address?

The internet is rife with abusive language, and automatically detecting it is crucial for fostering healthier online spaces and protecting free speech. However, existing supervised models often perform poorly when deployed on new datasets. This degradation occurs because online language is dynamic, with evolving slang, subtle forms of abuse, and varying targets of hate speech across different communities or platforms. The core problem is that models trained on one corpus (e.g., tweets from one platform) struggle to generalize to another (e.g., comments from a different forum) due to differences in sampling strategies, topical focus, and temporal shifts. This lack of generalizability limits the practical utility of these detection systems.

Methods

The authors propose a hybrid approach that combines two key components:

  • HateBERT: This is a pre-trained language model (specifically, BERT) that has been fine-tuned on a large dataset of abusive Reddit comments. BERT is known for its ability to capture contextual information within text. The representation used from HateBERT is the [CLS] token's output, which is then passed through a fully connected (FC) layer.
  • U-TDLM (Universal Sentence Encoder - Topically Driven Neural Language Model): This is a modified version of a topic modeling approach. Instead of using traditional word embeddings, U-TDLM leverages Universal Sentence Encoder (USE) embeddings, which are better suited for short texts like tweets. U-TDLM learns to represent comments as a mixture of latent topics. These topic distributions are then transformed by an FC layer.

The core innovation is the combination of these two representations. The output vectors from HateBERT and U-TDLM are concatenated and then fed into a final FC layer for classification. This aims to leverage HateBERT's contextual understanding and U-TDLM's ability to infer latent topics that might be shared across different corpora, thus improving generalizability.

Datasets

The study uses three publicly available abusive tweet corpora for evaluation:

  • HatEval: Used with its standard partition.
  • Waseem: Randomly split into 80% train, 10% development, and 10% test sets.
  • Davidson: Randomly split into 80% train, 10% development, and 10% test sets.

The paper focuses on a binary classification task (abusive vs. non-abusive) and reports cross-corpora evaluation, meaning models trained on one dataset are tested on another.

Key Insights and Ideas

  • Topic Models Aid Generalization: The research strongly suggests that incorporating topic model representations significantly improves the generalizability of abusive language detection models, especially when moving between different corpora.
  • Complementary Information: Topic models provide a different kind of signal than contextual language models. While HateBERT excels at understanding the nuances of language within a specific context, topic models can capture broader themes and concepts that might be present across various online communities, even if the specific wording differs.
  • Abusive Topics Transfer: The study highlights that certain "abuse-related topics" learned from a source corpus can indeed be inferred and utilized for detecting abuse in a target corpus, even if the target corpus has a different topical focus or linguistic style.
  • Hybrid Approach is Key: The combined HateBERT + U-TDLM model consistently performs as well as or better than HateBERT alone in cross-corpora settings, demonstrating the value of this hybrid architecture.

Key Results

  • Improved Cross-Corpora Performance: The combined HateBERT + U-TDLM model achieved better or comparable cross-corpora performance compared to HateBERT alone across various training-testing dataset pairs. For instance, when training on Waseem and testing on Davidson, the combined model showed a higher number of True Positives compared to HateBERT alone.
  • Ablation Study Confirms Value: Replacing U-TDLM features with random vectors in the combined model led to a significant decrease in performance, underscoring the importance of the topic representations.
  • Case Studies Illustrate Impact: The paper includes case studies where the combined model correctly classifies abusive comments that HateBERT alone misclassifies. These examples show how U-TDLM associates these comments with relevant abusive topics learned from the source corpus. For example, an abusive comment about cooking and women in Davidson was correctly mapped to "sexism" and "cooking show" topics from Waseem.

Limitations and Future Work

  • Modest Improvements: While the combined model shows improvements, the paper notes that these are "modest improvements" over HateBERT. This suggests there's still room for further enhancement.
  • Topic Space Limitations: The authors acknowledge that topic space representations can sometimes lose the exact context of a comment.
  • Future Directions: The findings should encourage further research into developing more generalizable abusive language detection models. Future work could explore more sophisticated ways to integrate topic and contextual information, or investigate other unsupervised methods that can capture cross-domain linguistic patterns. The paper also hints at the potential of using topic models to understand the "unseen comments" and their association with abusive topics.

Summary updated

BibTeX
@inproceedings{bose2021generalisability,
  author = {Tulika Bose and Irina Illina and Dominique Fohr},
  title = {{Generalisability of Topic Models in Cross-corpora Abusive Language Detection}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
}

Loading related content...

Figure