Automated Hate Speech Detection and the Problem of Offensive Language
Written for the Research library (claude-opus-5-5) from the paper text, in our own words: the license "arXiv — non-exclusive license to distribute" does not allow redistributing the text itself. Original — arxiv.org/pdf/1703.04009
Summary
The paper addresses a weakness in automatic hate speech detection: systems often fail to tell genuine hate speech apart from merely offensive language, such as casual slurs, profanity, or quoted rap lyrics. Keyword-based approaches therefore produce many false positives. The authors used the Hatebase.org lexicon to collect tweets, gathered user timelines, and had a sample annotated by CrowdFlower workers. Each tweet was assigned one of three classes: hate speech, offensive only, or neither. They then trained a one-versus-rest logistic regression with L2 regularization. Its features included TF-IDF word n-grams, POS n-grams, readability scores, sentiment, and tweet metadata. Overall scores were high, but the hate class remained difficult, and errors leaned toward predicting milder categories. The error analysis found that racist and homophobic content is more readily treated as hate, while sexist content tends to be judged only offensive. Hate speech without explicit slurs was hard to catch. The work matters because merging the two categories inflates hate speech prevalence and wrongly labels many users as hate speakers.
Key points
- Data: Lexicon searches identified 33,458 Twitter users, whose timelines yielded 85.4M tweets. From these, 25k lexicon-matching tweets were sampled and labeled by at least three CrowdFlower coders each, with 92% agreement. Majority voting produced 24,802 labeled tweets.
- Class distribution: Only about 5% of tweets were majority-labeled as hate speech, and just 1.3% unanimously. Roughly 76% were labeled offensive and 16.6% neither, which shows the low precision of the Hatebase lexicon.
- Method: Tweets were preprocessed with the Porter stemmer, and POS tags came from NLTK. Logistic regression with L1 regularization was used for feature reduction. A grid search compared naive Bayes, decision trees, random forests, linear SVM, and logistic regression, all implemented in scikit-learn.
- Results: Overall precision was 0.91, recall 0.90, and F1 0.90. For the hate class, however, precision was only 0.44 and recall 0.61, so about 40% of hate tweets were misclassified. Conversely, around 5% of offensive tweets and 2% of neutral tweets were wrongly labeled as hate.
- Resource and lexical insights: The authors released a smaller, higher-precision version of the Hatebase lexicon on GitHub (t-davidson/hate-speech-and-offensive-language). Their analysis showed that some terms (e.g., "ngger", "fggot") strongly signal hate, while their variants (e.g., "ngga", "fg") occur in both hate speech and ordinary offensive usage.
Cited by
- From Linguistics to Practice: a Case Study of Offensive Language Taxonomy in Hebrew
- CONAN - COunter NArratives through Nichesourcing: a Multilingual Dataset of Responses to Fight Online Hate Speech
- Racial Bias in Hate Speech and Abusive Language Detection Datasets
- Build it Break it Fix it for Dialogue Safety: Robustness from Adversarial Human Attack
- Latent Hatred: A Benchmark for Understanding Implicit Hate Speech
- ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detection
- The Hateful Memes Challenge: Detecting Hate Speech in Multimodal Memes
- CultureLLM: Incorporating Cultural Differences into Large Language Models
- Offensive language detection in Hebrew: can other languages help?
- A Holistic Approach to Undesired Content Detection in the Real World
- Multilingual and Multi-Aspect Hate Speech Analysis
- Two Contrasting Data Annotation Paradigms for Subjective NLP Tasks
- The Risk of Racial Bias in Hate Speech Detection
- Social Bias Frames: Reasoning about Social and Power Implications of Language
- Annotators with Attitudes: How Annotator Beliefs And Identities Bias Toxic Language Detection
- mGPT: Few-Shot Learners Go Multilingual
- Learning from the Worst: Dynamically Generated Datasets to Improve Online Hate Detection
- Predicting the Type and Target of Offensive Posts in Social Media
- SemEval-2019 Task 6: Identifying and Categorizing Offensive Language in Social Media (OffensEval)
- Conversations Gone Awry: Detecting Early Signs of Conversational Failure
- VALUE: Understanding Dialect Disparity in NLU
Cite
@misc{davidson2017automated,
title = {{Automated Hate Speech Detection and the Problem of Offensive Language}},
author = {Davidson, Thomas and Warmsley, Dana and Macy, Michael and Weber, Ingmar},
year = {2017},
doi = {10.48550/arxiv.1703.04009},
eprint = {1703.04009},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1703.04009}
}References
- Bird, S.; Loper, E.; and Klein, E. 2009. Natural Language Processing with Python. O’Reilly Media Inc. find
- Burnap, P., and Williams, M. L. 2015. Cyber hate speech on twitter: An application of machine classification and statistical modeling for policy and decision making. Policy & Internet 7(2):223– 242. find
- Djuric, N.; Zhou, J.; Morris, R.; Grbovic, M.; Radosavljevic, V.; and Bhamidipati, N. 2015. Hate speech detection with comment embeddings. In WWW, 29–30. find
- Gitari, N. D.; Zuping, Z.; Damien, H.; and Long, J. 2015. A lexicon-based approach for hate speech detection. International Journal of Multimedia and Ubiquitous Engineering 10:215–230. find
- Hutto, C. J., and Gilbert, E. 2014. VADER: A parsimonious rule-based model for sentiment analysis of social media text. In ICWSM. find
- Jacobs, J. B., and Potter, K. 2000. Hate crimes: Criminal Law and Identity Politics. Oxford University Press. find
- Kwok, I., and Wang, Y. 2013. Locate the hate: Detecting tweets against blacks. In AAAI. find
- Nobata, C.; Tetreault, J.; Thomas, A.; Mehdad, Y.; and Chang, Y. 2016. Abusive language detection in online user content. In WWW, 145–153. find
- Pedregosa, F., et al. 2011. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research 12:2825–2830. find
- Silva, L. A.; Mondal, M.; Correa, D.; Benevenuto, F.; and Weber, I. 2016. Analyzing the targets of hate in online social media. In ICWSM, 687–690. find
- Walker, S. 1994. Hate Speech: The History of an American Controversy. U of Nebraska Press. find
- Wang, W.; Chen, L.; Thirunarayan, K.; and Sheth, A. P. 2014. Cursing in english on twitter. In CSCW, 415–425. find
- Warner, W., and Hirschberg, J. 2012. Detecting hate speech on the world wide web. In LSM, 19–26. find
- Waseem, Z., and Hovy, D. 2016. Hateful symbols or hateful people? predictive features for hate speech detection on twitter. In SRW@HLT-NAACL, 88–93. find
- Waseem, Z. 2016. Are you a racist or am i seeing things? annotator influence on hate speech detection on twitter. In Proceedings of the First Workshop on NLP and CSS, 138–142. find