Reproducibility Report: Contextualizing Hate Speech Classifiers with Post-hoc Explanation

Kiran Purohit, Owais Iqbal, Ankan MullickarXiv 2021

Abstract

This report evaluates the reproducibility of "Sampling and Occlusion" (SOC), a method designed to mitigate bias in hate speech classifiers by regularizing models to ignore identity-based "shortcuts." While performance gains on the Stormfront dataset and a new Twitter benchmark were successfully replicated, discrepancies in the Gab Hate Corpus (GHC) results highlight the impact of hardware-dependent training and experimental variance on model outcomes.

Introduction: The Challenge of Contextualization

Modern hate speech classifiers, particularly those utilizing BERT-based architectures, often exhibit "over-sensitivity" to group identifiers. Words such as "gay," "black," or "Muslim" frequently trigger false-positive hate speech classifications regardless of the surrounding context. The primary objective of the original research was to develop a regularization technique that forces models to look beyond these identity labels and focus on the linguistic nuances of abusive intent.

BERT explanation of a phrase highlighting the model's focus on specific tokens.

Methodology: Explanation Regularization

The core of the proposed solution is Explanation Regularization, which leverages post-hoc explanations to guide model training.

  1. Sampling and Occlusion (SOC): This algorithm estimates word importance by masking a target word and sampling alternative contexts from a pre-trained language model. This process isolates the contribution of a specific word from its immediate neighbors.
  2. Context-Independent Importance (CII): This metric quantifies model bias by measuring the importance assigned to identity words across diverse contexts.
  3. Regularized Training: The training loss function includes a penalty term for high importance scores assigned to a predefined list of group identifiers. This encourages the model to learn generalizable features of dehumanizing language rather than relying on identity-word shortcuts.
Illustration of the Sampling and Occlusion (SOC) process for determining word importance.

Experimental Setup

The reproducibility study utilized four primary datasets:

  • Gab Hate Corpus (GHC): ~27,000 posts from Gab, annotated for hate speech.
  • Stormfront: ~10,000 posts from a white nationalist forum, representing high-density hate rhetoric.
  • New York Times (NYT): A neutral adversarial set used to measure false positives when identity groups are mentioned in journalistic contexts.
  • Twitter Hate-Speech: A new dataset introduced by the reproducibility team to test the generalizability of the original claims on unseen data.

Key Results and Reproducibility Analysis

The team successfully validated several of the original paper's core findings while identifying notable discrepancies.

Stormfront and Generalizability

The performance improvements on the Stormfront and NYT datasets were successfully reproduced. The team’s BERT+SOC model achieved a precision of 61.87% on Stormfront, surpassing the original report's 56.05%. Furthermore, testing on the new Twitter dataset showed a 20% increase in precision compared to Stormfront results, suggesting the regularization technique effectively generalizes across different social media platforms.

GHC Discrepancies and Hardware Variance

Results for the GHC dataset were less consistent. The team's BERT+SOC precision (62.48%) and recall (66.21%) fell short of the original claims (70.17% and 69.03%). A significant factor in these variations appears to be hardware differences. The team utilized NVIDIA Tesla GPUs, which resulted in longer training times (~24 minutes per epoch vs. ~19 minutes) and slight performance deviations compared to the original authors' RTX 2080 Ti setup.

Conclusion and Limitations

While the SOC regularization method shows promise in reducing model over-sensitivity, this reproducibility effort underscores the challenges of standardizing deep learning experiments. Stochasticity in training and variations in hardware frameworks can lead to significant performance gaps. Future research should focus on standardizing these configurations and testing regularized models against even more diverse, real-world datasets to ensure robust bias mitigation.

Summary updated

BibTeX
@misc{purohit2021reproducibility,
  author = {Kiran Purohit and Owais Iqbal and Ankan Mullick},
  title = {{Reproducibility Report: Contextualizing Hate Speech Classifiers with Post-hoc Explanation}},
  year = {2021},
  eprint = {2105.11412},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.11412},
}
Figure