HackerPapers

arXiv:2401.03346cs.CY

An Investigation of Large Language Models for Real-World Hate Speech Detection

Keyan Guo, Alexander Hu, Jaden Mu, Ziheng Shi, Ziming Zhao, Nishant Vishwamitra, Hongxin Hu

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Hate speech has emerged as a major problem plaguing our social spaces today. While there have been significant efforts to address this problem, existing methods are still significantly limited in effectively detecting hate speech online. A major limitation of existing methods is that hate speech detection is a highly contextual problem, and these methods cannot fully capture the context of hate speech to make accurate predictions. Recently, large language models (LLMs) have demonstrated state-of-the-art performance in several natural language tasks. LLMs have undergone extensive training using vast amounts of natural language data, enabling them to grasp intricate contextual details. Hence, they could be used as knowledge bases for context-aware hate speech detection. However, a fundamental problem with using LLMs to detect hate speech is that there are no studies on effectively prompting LLMs for context-aware hate speech detection. In this study, we conduct a large-scale study of hate speech detection, employing five established hate speech datasets. We discover that LLMs not only match but often surpass the performance of current benchmark machine learning models in identifying hate speech. By proposing four diverse prompting strategies that optimize the use of LLMs in detecting hate speech. Our study reveals that a meticulously crafted reasoning prompt can effectively capture the context of hate speech by fully utilizing the knowledge base in LLMs, significantly outperforming existing techniques. Furthermore, although LLMs can provide a rich knowledge base for the contextual detection of hate speech, suitable prompting strategies play a crucial role in effectively leveraging this knowledge base for efficient detection.

arXiv comments
Accepted for publication on 22nd International Conference of Machine Learning and Applications, ICMLA 2023
Journal reference
DOI
Subjects
cs.CYComputers and Society cs.AIArtificial Intelligence cs.CLComputation and Language cs.LGMachine Learning cs.SISocial and Information Networks

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Sep 2025 to Sep 2025.

Comments linking this paper, per year.

Discussed in comments1 thread

  1. A New Internet Business Model? 1 comment
    • It could be interesting to build a small startup that identifies hate speech on Twitter, Threads, Blue Sky, and other platforms. I envision a UI that displays the message and, in a sidebar, lists what aspects of the message classify it as hate speech. Then, like a spam filter…

      rickydrollView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.