Detection of Abusive Language: the Problem of Biased Datasets

Michael Wiegand, Josef Ruppenhofer, Thomas KleinbauerNAACL 2019

Detection of Abusive Language: the Problem of Biased Datasets

High performance in abusive language detection is often a mirage. This research reveals that many popular datasets are riddled with "topic" and "author" biases due to their collection methods, leading models to rely on irrelevant cues rather than actual linguistic understanding. When these biases are removed or models are tested on new domains, their performance often plummets.

The "Needle in a Haystack" Problem

Detecting abusive language—encompassing hate speech, cyberbullying, and harassment—is inherently difficult because such content is rare in the wild, typically appearing in only 0.1% to 3% of random social media posts. To construct large enough datasets for machine learning, researchers frequently employ "focused sampling," which involves searching for specific keywords or monitoring known offenders.

While efficient, this shortcut creates a significant gap between laboratory results and real-world utility. By building datasets around specific topics or small user groups, classifiers learn to associate benign topics (e.g., sports) or specific writing styles with abuse, failing to generalize to the broader internet.

Methodology

The researchers conducted a systematic "stress test" of existing models and datasets using several approaches:

  • Standardized Baseline: All datasets were evaluated using FastText, a robust supervised classifier, under 10-fold cross-validation.
  • Ablation Studies: The team identified "topic words" (correlated with abuse but not inherently abusive) and "query words" (used for data collection) and removed them to measure model reliance on these cues.
  • Cross-Domain Evaluation: Models trained on one dataset were tested on others to assess transferability across platforms and topics.
  • Author Analysis: The distribution of unique authors was examined to detect if models were simply memorizing the "fingerprints" of prolific trolls.

Key Insights: Uncovering Hidden Biases

The "Football" Proxy and Topic Bias

In the widely used Waseem dataset, words like commentator, football, and announcer are among the strongest predictors of abuse. This occurs because the data was collected during a specific controversy regarding women in sports. Consequently, a model might flag a sexist tweet not due to linguistic understanding of sexism, but simply because it mentions "football."

Top predictive words in the Founta and Waseem datasets, highlighting the prevalence of non-abusive topic words in biased samples.

The Author Monopoly

Author bias is equally pervasive. In the Waseem dataset, over 70% of "sexist" tweets originate from just two users, and 99% of "racist" tweets come from a single account. Models in these scenarios aren't learning the nuances of hate speech; they are learning the specific idiolect of a few individuals.

Results and Generalization Failure

The impact of these biases is starkly visible when models are pushed beyond their training niche.

  • Performance Drop: Removing just 25 topic words (0.2% of the vocabulary) from the Waseem dataset caused the F1-score to drop from 80.49 to 74.72.
  • Cross-Domain Collapse: Models trained on biased datasets performed poorly in cross-domain tests. A model trained on the Waseem dataset (80.5 F1 in-domain) saw its performance drop to between 53.0 and 61.6 when tested on other datasets.
Cross-domain F1 scores showing the performance drop when models are tested on datasets different from their training source.

Conversely, datasets created via "boosted random sampling" (such as Kaggle and Founta) proved more robust. Models trained on these datasets maintained higher scores across different data sources, suggesting they captured more generalizable linguistic features.

Conclusion and Future Directions

The study demonstrates that high performance on a single dataset is an insufficient metric for abusive language detection. To improve the field, the authors suggest moving away from keyword-based sampling toward "boosted random sampling" to ensure topic diversity. Furthermore, adopting cross-domain classification as a standard evaluation metric will ensure models aren't just over-fitting to specific niches. Finally, datasets should cap the number of posts per user to mitigate author bias.

Summary updated

BibTeX
@inproceedings{wiegand2019detection,
  author = {Michael Wiegand and Josef Ruppenhofer and Thomas Kleinbauer},
  title = {{Detection of Abusive Language: the Problem of Biased Datasets}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1060},
}
Figure