Skip to main content
QUICK REVIEW

[Paper Review] Harnessing Artificial Intelligence to Combat Online Hate: Exploring the Challenges and Opportunities of Large Language Models in Hate Speech Detection

Tharindu Kumarage, Amrita Bhattacharjee|arXiv (Cornell University)|Mar 12, 2024
Hate Speech and Cyberbullying DetectionComputer Science6 citations
TL;DR

The paper empirically evaluates GPT-3.5, Llama-2, and Falcon as zero-shot hate speech detectors on the HateCheck dataset, analyzes prompting strategies, and discusses robustness and biases in LLM-based hate speech classification.

ABSTRACT

Large language models (LLMs) excel in many diverse applications beyond language generation, e.g., translation, summarization, and sentiment analysis. One intriguing application is in text classification. This becomes pertinent in the realm of identifying hateful or toxic speech -- a domain fraught with challenges and ethical dilemmas. In our study, we have two objectives: firstly, to offer a literature review revolving around LLMs as classifiers, emphasizing their role in detecting and classifying hateful or toxic content. Subsequently, we explore the efficacy of several LLMs in classifying hate speech: identifying which LLMs excel in this task as well as their underlying attributes and training. Providing insight into the factors that contribute to an LLM proficiency (or lack thereof) in discerning hateful content. By combining a comprehensive literature review with an empirical analysis, our paper strives to shed light on the capabilities and constraints of LLMs in the crucial domain of hate speech detection.

Motivation & Objective

  • Review how LLMs function as hate speech detectors and annotators.
  • Empirically compare open-source and proprietary LLMs on hate speech detection performance.
  • Investigate prompting strategies and their impact on classification efficacy.
  • Identify limitations, biases, and best practices for deploying LLMs in hate speech moderation.

Proposed method

  • Survey of literature on LLMs as text classifiers and hate speech detectors (pre-LLM era vs LLM era).
  • Empirical evaluation of GPT-3.5, Llama-2, and Falcon using zero-shot hate speech detection on HateCheck.
  • Prompt design experiments including direct concise prompts, context prompts, and chain-of-thought prompts with GPT-3.5.
  • Classification labeling strategy mapping LLM outputs to hate/non-hate labels.
  • Error analysis using HateCheck annotations for directionality and target bias.
(c) Hate target distribution
(c) Hate target distribution

Experimental results

Research questions

  • RQ1RQ1: How robust are LLMs in detecting hate speech across general and targeted categories?
  • RQ2RQ2: How do prompting techniques influence hate speech detection efficacy of LLMs?

Key findings

  • GPT-3.5 achieves the highest overall hate speech detection performance among the tested models (83? to 93? F1 and related metrics reported), with Llama-2 closely approaching GPT-3.5 performance.
  • Llama-2 (7B) shows strong hate speech detection but exhibits more reliance on spurious correlations when identifying non-hate content.
  • Falcon underperforms relative to GPT-3.5 and Llama-2 in hate speech classification.
  • Prompting impact: direct concise prompts deliver the best overall performance, while context and chain-of-thought prompts do not consistently improve results.
  • Error analysis reveals differences in handling directed vs general hate speech and performance across hate targets (e.g., women, Muslims, etc.).
  • The study highlights potential guardrail interactions and the importance of labeling functions and balanced fine-tuning to mitigate spurious cues.
Figure 2: Error analysis on non-hate class
Figure 2: Error analysis on non-hate class

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.