Table of Contents
Fetching ...

Generalizing Hate Speech Detection Using Multi-Task Learning: A Case Study of Political Public Figures

Lanqin Yuan, Marian-Andrei Rizoiu

TL;DR

This work tackles the poor cross-dataset generalization of hate speech detectors by proposing a multi-task learning pipeline that trains on eight diverse hate speech datasets using a shared BERT encoder with dataset-specific heads. The authors introduce a novel Pub-Figs Twitter dataset of American political figures and its MTurk-labeled subset Pub-Figs-L to explore hate and abusive speech in a real-world domain, achieving machine-labeled coverage of over 300k tweets. Evaluations using dataset-level leave-one-out and targeted transfer demonstrate that MT L outperforms many baselines on unseen datasets and yields substantial gains on known datasets, while embedding-space analyses show increased separation of hateful and abusive content post-MTL. The work advances generalization in hate speech detection and provides a valuable, large-scale resource for studying problematic online speech in political discourse, along with guidance on labeling quality and bias considerations.

Abstract

Automatic identification of hateful and abusive content is vital in combating the spread of harmful online content and its damaging effects. Most existing works evaluate models by examining the generalization error on train-test splits on hate speech datasets. These datasets often differ in their definitions and labeling criteria, leading to poor generalization performance when predicting across new domains and datasets. This work proposes a new Multi-task Learning (MTL) pipeline that trains simultaneously across multiple hate speech datasets to construct a more encompassing classification model. Using a dataset-level leave-one-out evaluation (designating a dataset for testing and jointly training on all others), we trial the MTL detection on new, previously unseen datasets. Our results consistently outperform a large sample of existing work. We show strong results when examining the generalization error in train-test splits and substantial improvements when predicting on previously unseen datasets. Furthermore, we assemble a novel dataset, dubbed PubFigs, focusing on the problematic speech of American Public Political Figures. We crowdsource-label using Amazon MTurk more than $20,000$ tweets and machine-label problematic speech in all the $305,235$ tweets in PubFigs. We find that the abusive and hate tweeting mainly originates from right-leaning figures and relates to six topics, including Islam, women, ethnicity, and immigrants. We show that MTL builds embeddings that can simultaneously separate abusive from hate speech, and identify its topics.

Generalizing Hate Speech Detection Using Multi-Task Learning: A Case Study of Political Public Figures

TL;DR

This work tackles the poor cross-dataset generalization of hate speech detectors by proposing a multi-task learning pipeline that trains on eight diverse hate speech datasets using a shared BERT encoder with dataset-specific heads. The authors introduce a novel Pub-Figs Twitter dataset of American political figures and its MTurk-labeled subset Pub-Figs-L to explore hate and abusive speech in a real-world domain, achieving machine-labeled coverage of over 300k tweets. Evaluations using dataset-level leave-one-out and targeted transfer demonstrate that MT L outperforms many baselines on unseen datasets and yields substantial gains on known datasets, while embedding-space analyses show increased separation of hateful and abusive content post-MTL. The work advances generalization in hate speech detection and provides a valuable, large-scale resource for studying problematic online speech in political discourse, along with guidance on labeling quality and bias considerations.

Abstract

Automatic identification of hateful and abusive content is vital in combating the spread of harmful online content and its damaging effects. Most existing works evaluate models by examining the generalization error on train-test splits on hate speech datasets. These datasets often differ in their definitions and labeling criteria, leading to poor generalization performance when predicting across new domains and datasets. This work proposes a new Multi-task Learning (MTL) pipeline that trains simultaneously across multiple hate speech datasets to construct a more encompassing classification model. Using a dataset-level leave-one-out evaluation (designating a dataset for testing and jointly training on all others), we trial the MTL detection on new, previously unseen datasets. Our results consistently outperform a large sample of existing work. We show strong results when examining the generalization error in train-test splits and substantial improvements when predicting on previously unseen datasets. Furthermore, we assemble a novel dataset, dubbed PubFigs, focusing on the problematic speech of American Public Political Figures. We crowdsource-label using Amazon MTurk more than tweets and machine-label problematic speech in all the tweets in PubFigs. We find that the abusive and hate tweeting mainly originates from right-leaning figures and relates to six topics, including Islam, women, ethnicity, and immigrants. We show that MTL builds embeddings that can simultaneously separate abusive from hate speech, and identify its topics.
Paper Structure (23 sections, 5 equations, 13 figures, 11 tables)

This paper contains 23 sections, 5 equations, 13 figures, 11 tables.

Figures (13)

  • Figure 1: Different approaches to addressing labeling bias in hate speech datasets. The traditional Machine learning approach increases the size of the training dataset by adding more labeled rows with the same labeling definition, leading to additional bias to that labeling criteria. Our novel multi-task learning approach allows for increasing the number of datasets and definitions in the training pipeline for a more general representation.
  • Figure 2: Schema of the Multi-Task Learning pipeline. An arbitrary number of datasets are used to train a single model jointly. Each dataset-specific classification head propagates its loss through a single shared BERT unit to produce a generalized representation of hate speech.
  • Figure 3: The construction process of Pub-Figs and Pub-Figs-L datasets. We detail each action (purple hexagon) in \ref{['sec:public_figures_twitter_dataset']}: Twitter Data Collection in \ref{['subsec:pubfig-collection']}, Pub-Figs-L subset Selection in \ref{['subsec:subset-selection']}, Amazon Mechanical Turk Labeling in \ref{['subsec:mturk_labelling']}, and Machine Labeling in \ref{['subsec:full-pubfig']}.
  • Figure 4: Amazon Turkers' mean agreement with the majority for the final labels in the Pub-Figs-L dataset. Eight workers label each tweet via majority vote. The x-axis shows how many workers selected the majority label. The y-axis shows the percentage of total instances assigned to a label with a given majority vote split. (a) binary: harmless (neutral) vs. problematic (abuse and hate); (b) 3 class labeling (neutral, abuse, hate).
  • Figure 5: The problem setup for unseen dataset classification. We adopt a leave-one-out evaluation scheme for evaluating the pipeline's ability to generalize on a completely new dataset.
  • ...and 8 more figures