An Investigation of Large Language Models for Real-World Hate Speech Detection
Authors:
- 15 December 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1568-1573
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.Keywords
All Related Versions
Funding Information
- National Science Foundation (2129164,2114982,2228617,2120369,2237238,2245983)
This publication has 15 references indexed in Scilit:
- “HOT” ChatGPT: The Promise of ChatGPT in Detecting and Discriminating Hateful, Offensive, and Toxic Comments on Social MediaACM Transactions on the Web, 2024
- On the Evolution of (Hateful) Memes by Means of Multimodal Contrastive Learning2023
- Chain of Explanation: New Prompting Method to Generate Quality Natural Language Explanation for Implicit Hate Speech2023
- Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language ProcessingACM Computing Surveys, 2023
- SWSR: A Chinese dataset and lexicon for online sexism detectionOnline Social Networks and Media, 2022
- Racism is a virus2021
- HateXplain: A Benchmark Dataset for Explainable Hate Speech DetectionProceedings of the AAAI Conference on Artificial Intelligence, 2021
- SoK: Hate, Harassment, and the Changing Landscape of Online Abuse2021
- Hate speech detection: Challenges and solutionsPLOS ONE, 2019
- Abusive Language Detection in Online User Content2016