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

Keyan Guo, Alexander Hu, Jaden Mu, Ziheng Shi, Ziming Zhao +2 more
1/7/2024
cs.CYcs.AIcs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{guo2024investigation,
  title  = {An Investigation of Large Language Models for Real-World Hate Speech Detection},
  author = {Keyan Guo and Alexander Hu and Jaden Mu and Ziheng Shi and Ziming Zhao and Nishant Vishwamitra and Hongxin Hu},
  year   = {2024},
  eprint = {2401.03346},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.03346v1}
}

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/2401.03346.svg)](https://codeofpaper.com/paper/2401.03346)

Discussion