HateCheck: Functional Tests for Hate Speech Detection Models

Publication date

2021-08

Authors

Röttger, Paul
Vidgen, Bertie
Nguyen, DongISNI 0000000419527451
Waseem, Zeerak
Margetts, Helen
Pierrehumbert, Janet

Editors

Advisors

Supervisors

Document Type

Part of book
Open Access logo

License

cc_by

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.

Keywords

Citation

Röttger, P, Vidgen, B, Nguyen, D, Waseem, Z, Margetts, H & Pierrehumbert, J 2021, HateCheck: Functional Tests for Hate Speech Detection Models. in Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). Association for Computational Linguistics, pp. 41-58. https://doi.org/10.18653/v1/2021.acl-long.4