Elamur Research
☰
home / papers / 2017 / Automated Hate Speech Detection and the Problem of Offensive Language

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.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Other

Cited by

744 papers of our library cite it (of the 140673 whose bibliographies we read); 21 of them have a page here, 723 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1703.04009 · arXiv 1703.04009

@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

15 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Bird, S.; Loper, E.; and Klein, E. 2009. Natural Language Processing with Python. O’Reilly Media Inc. find
  2. 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
  3. 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
  4. 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
  5. Hutto, C. J., and Gilbert, E. 2014. VADER: A parsimonious rule-based model for sentiment analysis of social media text. In ICWSM. find
  6. Jacobs, J. B., and Potter, K. 2000. Hate crimes: Criminal Law and Identity Politics. Oxford University Press. find
  7. Kwok, I., and Wang, Y. 2013. Locate the hate: Detecting tweets against blacks. In AAAI. find
  8. Nobata, C.; Tetreault, J.; Thomas, A.; Mehdad, Y.; and Chang, Y. 2016. Abusive language detection in online user content. In WWW, 145–153. find
  9. Pedregosa, F., et al. 2011. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research 12:2825–2830. find
  10. 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
  11. Walker, S. 1994. Hate Speech: The History of an American Controversy. U of Nebraska Press. find
  12. Wang, W.; Chen, L.; Thirunarayan, K.; and Sheth, A. P. 2014. Cursing in english on twitter. In CSCW, 415–425. find
  13. Warner, W., and Hirschberg, J. 2012. Detecting hate speech on the world wide web. In LSM, 19–26. find
  14. 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
  15. 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