NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

HateXplain: A Benchmark Dataset for Explainable Hate Speech Detection

Binny Mathew, Punyajoy Saha, Seid Muhie Yimam, Chris Biemann, Pawan Goyal, Animesh Mukherjee

Abstract

Automated hate speech detection often suffers from a lack of transparency and unintended bias against minority groups. We present HateXplain, a novel benchmark dataset that provides not only labels for hate speech but also human-annotated "rationales"—the specific text spans justifying the classification. By training models to align their internal attention with these human rationales, we demonstrate significant improvements in model interpretability and a reduction in demographic bias.

1. Introduction

Automated hate speech detection is a critical yet challenging task. Current state-of-the-art models often operate as "black boxes," identifying hateful content without providing an explanation for their decisions. This lack of interpretability frequently leads to "unintended bias," where models learn spurious correlations—such as flagging any post containing identity terms like "Muslim" or "gay" as toxic, regardless of the actual sentiment.

The authors identify a critical gap in existing research: datasets typically lack the "ground truth" for why a post is hateful. Without this information, it is impossible to evaluate if a model is "right for the right reasons" or simply picking up on noise. HateXplain addresses this by introducing a first-of-its-kind dataset with word-level rationales.

2. Methodology

The researchers introduced a novel annotation pipeline and a suite of models designed to leverage explainability.

2.1 Multi-faceted Annotation

Every post in HateXplain is annotated for three distinct facets:

  1. Label: Categorized as Hate, Offensive, or Normal.
  2. Target: The specific community being attacked (e.g., African, LGBTQ, Jewish).
  3. Rationales: The specific spans of text that led to the label.

To create a usable training signal from multiple annotators, the rationales are aggregated into a "Final ground truth attention" vector. For normal posts, attention is distributed uniformly. For hateful or offensive posts, the human-provided rationales are averaged and normalized via softmax.

The process of aggregating human-annotated rationales into final ground truth attention.

2.2 Attention Supervision

The authors modified standard architectures, such as BiRNN and BERT, to create "HateXplain" variants. These models are explicitly trained to align their internal attention mechanisms with the human-provided rationales using a dedicated attention loss ($L_{att}$).

Model architecture incorporating attention supervision loss to align predicted attention with ground truth (GT) rationales.

3. Dataset Description

The HateXplain dataset consists of 20,148 posts sourced from Twitter and Gab, covering 10 distinct target communities. Each post was annotated by three Amazon Mechanical Turk workers, achieving a Krippendorff’s $\alpha$ of 0.46—a high level of agreement compared to existing hate speech benchmarks. Unlike previous datasets, HateXplain is unique in providing both target labels and word-level rationales.

4. Results and Discussion

4.1 Performance and Explainability

The BERT-HateXplain model achieved the best overall results with a Macro F1 of 0.687 and an AUROC of 0.851. Models trained with attention supervision showed a massive jump in "Plausibility" metrics (how much the model's explanation matches a human's). For example, the Token F1 for the BiRNN model increased from 0.386 to 0.506 when rationale supervision was applied.

4.2 Bias Mitigation

A significant finding is that supervising a model with human rationales helps it ignore neutral identity terms. This leads to a measurable reduction in bias against protected groups. Using rationales improved the "Generalized Mean of Bias AUC" (GMB-Subgroup) for BERT from 0.762 to 0.807, indicating the model became significantly fairer across different demographic groups.

4.3 The Plausibility-Faithfulness Gap

The paper highlights a critical distinction between Plausibility (looking right to a human) and Faithfulness (the model actually using those words for the prediction). Achieving both simultaneously remains a difficult balancing act for current NLP architectures, as a model can be plausible without being faithful.

5. Conclusion

HateXplain demonstrates that providing models with human-like reasons for classification can significantly reduce unintended bias and improve transparency. Future work should address the lack of external context (such as user history) and extend this rationale-based approach to multilingual datasets to combat the global problem of hate speech.

Summary updated

BibTeX
@inproceedings{mathew2021hatexplain,
  author = {Binny Mathew and Punyajoy Saha and Seid Muhie Yimam and Chris Biemann and Pawan Goyal and Animesh Mukherjee},
  title = {{HateXplain: A Benchmark Dataset for Explainable Hate Speech Detection}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i17.17745},
}
Figure