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.
