HateCheck: Functional Tests for Hate Speech Detection Models

Paul Röttger, Bertram Vidgen, Dong Nguyen, Zeerak Waseem, Helen Margetts +1 more
12/31/2020
cs.CL

Official code: paul-rottger/hatecheck-data (60 stars, CC-BY-4.0, last commit 2025-10-14). 1 more implementation below.

Abstract

Detecting online hate is a difficult task that even state-of-the-art models struggle with. Typically, hate speech detection models are evaluated by measuring their performance on held-out test data using metrics such as accuracy and F1 score. However, this approach makes it difficult to identify specific model weak points. It also risks overestimating generalisable model performance due to increasingly well-evidenced systematic gaps and biases in hate speech datasets. To enable more targeted diagnostic insights, we introduce HateCheck, a suite of functional tests for hate speech detection models. We specify 29 model functionalities motivated by a review of previous research and a series of interviews with civil society stakeholders. We craft test cases for each functionality and validate their quality through a structured annotation process. To illustrate HateCheck's utility, we test near-state-of-the-art transformer models as well as two popular commercial models, revealing critical model weaknesses.

View on arXivView PDF

Code Implementations(2)

CC-BY-4.0

Röttger et al. (ACL 2021): "HateCheck: Functional Tests for Hate Speech Detection Models" - Data

6011Dec 26, 20201 years agoCC-BY-4.0

Röttger et al. (ACL 2021): "HateCheck: Functional Tests for Hate Speech Detection Models" - Experimental Code

113Jupyter NotebookJan 27, 20215 years ago

Similar Papers

Cite this paper

@article{rttger2020hatecheck,
  title  = {HateCheck: Functional Tests for Hate Speech Detection Models},
  author = {Paul Röttger and Bertram Vidgen and Dong Nguyen and Zeerak Waseem and Helen Margetts and Janet B. Pierrehumbert},
  year   = {2020},
  eprint = {2012.15606},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2012.15606}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2012.15606.svg)](https://codeofpaper.com/paper/2012.15606)

Discussion