Skip to main content
QUICK REVIEW

[Paper Review] Assessing Large Language Models for Online Extremism Research: Identification, Explanation, and New Knowledge

Beidi Dong, J. Lee|arXiv (Cornell University)|Aug 29, 2024
Terrorism, Counterterrorism, and Political ViolenceSocial Sciences3 citations
TL;DR

This study evaluates BERT and GPT models for detecting and classifying online domestic extremism, using manually labeled social media posts with far-right and far-left keywords. GPT-4 and GPT-3.5 outperform BERT in zero-shot classification, with performance sensitive to prompt design—GPT-3.5 excels at far-left, GPT-4 at far-right extremism, highlighting LLMs' potential for automated extremism detection with optimized prompting.

ABSTRACT

The United States has experienced a significant increase in violent extremism, prompting the need for automated tools to detect and limit the spread of extremist ideology online. This study evaluates the performance of Bidirectional Encoder Representations from Transformers (BERT) and Generative Pre-Trained Transformers (GPT) in detecting and classifying online domestic extremist posts. We collected social media posts containing "far-right" and "far-left" ideological keywords and manually labeled them as extremist or non-extremist. Extremist posts were further classified into one or more of five contributing elements of extremism based on a working definitional framework. The BERT model's performance was evaluated based on training data size and knowledge transfer between categories. We also compared the performance of GPT 3.5 and GPT 4 models using different prompts: naïve, layperson-definition, role-playing, and professional-definition. Results showed that the best performing GPT models outperformed the best performing BERT models, with more detailed prompts generally yielding better results. However, overly complex prompts may impair performance. Different versions of GPT have unique sensitives to what they consider extremist. GPT 3.5 performed better at classifying far-left extremist posts, while GPT 4 performed better at classifying far-right extremist posts. Large language models, represented by GPT models, hold significant potential for online extremism classification tasks, surpassing traditional BERT models in a zero-shot setting. Future research should explore human-computer interactions in optimizing GPT models for extremist detection and classification tasks to develop more efficient (e.g., quicker, less effort) and effective (e.g., fewer errors or mistakes) methods for identifying extremist content.

Motivation & Objective

  • To assess the effectiveness of large language models (LLMs) such as BERT and GPT in identifying online domestic extremist content.
  • To evaluate how different prompt engineering strategies—naïve, layperson-definition, role-playing, and professional-definition—affect classification performance.
  • To examine the impact of training data size and knowledge transfer on BERT’s performance in extremism detection.
  • To investigate model-specific sensitivities, particularly differences in performance between GPT-3.5 and GPT-4 across far-left and far-right extremism categories.
  • To explore the potential of LLMs in generating new insights into extremist discourse through explanation and classification.

Proposed method

  • Collected social media posts containing 'far-right' and 'far-left' ideological keywords for analysis.
  • Manually labeled posts as extremist or non-extremist, with extremist content further classified into five definitional elements of extremism.
  • Trained and evaluated a BERT model on varying sizes of training data and assessed knowledge transfer between extremism categories.
  • Evaluated GPT-3.5 and GPT-4 using four distinct prompt types: naïve, layperson-definition, role-playing, and professional-definition.
  • Applied a working definitional framework to categorize extremist content into five contributing elements for structured analysis.
  • Compared model performance across metrics such as precision, recall, and F1-score to determine optimal prompting and model selection.

Experimental results

Research questions

  • RQ1How do BERT and GPT models compare in zero-shot classification of online domestic extremist content?
  • RQ2How does prompt design—specifically naïve, layperson-definition, role-playing, and professional-definition prompts—affect the accuracy of GPT models in detecting extremism?
  • RQ3Does the performance of GPT-3.5 and GPT-4 differ significantly when classifying far-left versus far-right extremist content?
  • RQ4To what extent does training data size and knowledge transfer influence BERT’s ability to detect extremist content?
  • RQ5Can LLMs generate meaningful explanations and new insights into extremist discourse beyond simple classification?

Key findings

  • GPT-4 and GPT-3.5 outperformed the best-performing BERT model in zero-shot extremism classification tasks.
  • GPT-3.5 demonstrated superior performance in classifying far-left extremist content, while GPT-4 showed better accuracy for far-right extremist content.
  • More detailed prompts—particularly professional-definition and role-playing—generally improved classification performance, though overly complex prompts reduced effectiveness.
  • Knowledge transfer between extremism categories was observed in BERT, but performance remained below that of fine-tuned GPT models.
  • The study confirms that LLMs, especially GPT variants, hold significant potential for automated detection and explanation of online extremism.
  • Prompt engineering is a critical factor in optimizing LLM performance, with tailored prompts yielding higher precision and recall in extremist content detection.

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.