Improving Generalization of Hate Speech Detection Systems to Novel Target Groups via Domain Adaptation

Florian Ludwig, Klara Dolos, Torsten Zesch, Eleanor HobleyNAACL 2022

TL;DR

Hate speech detection models struggle to generalize to new target groups, often due to domain-specific biases. This paper investigates unsupervised domain adaptation techniques (MixUp, adversarial learning, curriculum labeling) to improve generalization, showing significant improvements in detecting hate speech against previously unseen target groups.

What Problem Does This Paper Address?

Despite impressive accuracy on benchmark datasets, hate speech detection systems often fail when deployed in real-world scenarios. This failure stems from a lack of generalization, particularly when encountering new or evolving target groups of hate speech. Traditional datasets tend to focus on established targets like race, religion, or gender, but the online landscape is dynamic, with new groups (e.g., virologists during the COVID-19 pandemic) becoming targets. This creates a critical need for models that can adapt to these novel targets without requiring extensive, time-consuming manual relabeling of new datasets. Furthermore, inconsistencies in hate speech definitions across datasets can hinder robust evaluation of generalization capabilities.

Methods

The authors explore three unsupervised domain adaptation strategies to improve hate speech detection models' ability to generalize to new target groups:

  • MixUp Regularization: This technique interpolates between feature representations and labels of existing data points to create "virtual" samples. This is applied to both labeled source data and pseudo-labeled target data to regularize the model.
  • Adversarial Domain Adaptation: This approach involves training a domain discriminator alongside the main hate speech classifier. The encoder of the classifier is trained to produce feature representations that the discriminator cannot distinguish as belonging to either the source or target domain, effectively aligning their feature distributions.
  • Curriculum Labeling: This method iteratively trains the model by selecting unlabeled target domain data points with high prediction confidence (pseudo-labels). The selection process is "curriculum-like," gradually increasing the confidence threshold and re-training the model with newly labeled data. A key modification here is selecting pseudo-labels independently for each class to avoid bias towards majority classes.

Datasets

The primary dataset used in this research is the HateXplain dataset. This dataset is notable because it annotates target groups for all data points, including "normal" and "offensive" classes, not just "hate speech." This allows for a cleaner separation of domains and a more rigorous evaluation of generalization. For their experiments, the authors focused on three specific target groups: "Race," "Religion," and "Sexual Orientation," as other groups had insufficient data. They also utilized data augmentation via back-translation to increase the dataset size.

Key Insights and Ideas

  • Target Group Bias is Real: Naively trained models exhibit a significant bias towards the target groups they were trained on, leading to poor performance on unseen groups.
  • Domain Adaptation is Crucial: Unsupervised domain adaptation techniques are effective in mitigating this target group bias and improving generalization.
  • Curriculum Labeling Shines: Among the tested methods, curriculum labeling, with its careful selection of pseudo-labeled data, showed the most promising results for adapting models to new hate speech targets.
  • Data Quantity Matters: The performance of domain adaptation approaches is strongly influenced by the number of labeled source and unlabeled target domain samples available. Larger datasets, particularly for the "Race" target group, led to better outcomes.
  • Negative Transfer is Possible: While domain adaptation generally helps, there's a risk of negative transfer (worse performance than zero-shot) in some cases, particularly with pseudo-labeling approaches if not carefully managed.

Key Results

The paper reports relative improvements of 5.8% to 10.7% in F1-score for out-of-domain target groups compared to baseline zero-shot approaches when using domain adaptation. Specifically:

  • Adversarial Domain Adaptation and Curriculum Labeling generally outperformed MixUp regularization and zero-shot approaches.
  • Curriculum Labeling achieved the best average results across source, target, and uninvolved domains.
  • Models trained on the "Race" source domain yielded the best overall F1 scores (.50-.58), while "Sexual Orientation" performed worst (.36-.50), correlating with the amount of available training data.

Limitations and Future Work

The authors acknowledge several limitations:

  • Limited Target Groups: The study focused on only three target groups ("Race," "Religion," "Sexual Orientation"). Future work should investigate generalization to a wider diversity of target groups.
  • Dataset Size: The study was conducted on a single dataset, and the performance of domain adaptation approaches was influenced by the number of available samples. More advanced models and larger, more diverse datasets are needed.
  • No Clear "Best" Approach: The paper doesn't identify a single universally best domain adaptation method for all scenarios, suggesting that the choice of approach is context-dependent and difficult to assess without target domain labels.
  • Real-World Impact: The authors emphasize that current model performance is still insufficient for reliably supporting law enforcement in preventing life-threatening situations, highlighting the need for continued improvement.

Future work should explore generalization to new targets in settings with greater data diversity and employ more advanced model architectures, such as transformers. Further investigation into why certain domain adaptation methods fail in specific situations is also recommended.

Summary updated

BibTeX
@inproceedings{ludwig2022improving,
  author = {Florian Ludwig and Klara Dolos and Torsten Zesch and Eleanor Hobley},
  title = {{Improving Generalization of Hate Speech Detection Systems to Novel Target Groups via Domain Adaptation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
}
Figure