Skip to content
Open access

A Comparative Analysis of Large Language Models for the Detection and Classification of Hate Speech in a Low-Resource Language

2026 · IEEE Access · Vol 14, pp. 132642-132667 · 0 citations · 65 references

TL;DR

The presented results highlight the complexity and diversity of hate speech in Serbian online communication, demonstrating a high detection accuracy of 86.7% achieved with the LLaMA 3 model, followed by Qwen3 (82%) for the two-stage sentence-level pipeline and Qwen3 (82%) for the two-stage sentence-level pipeline.

Abstract

Hate speech represents one of the most significant challenges of modern digital society, particularly due to the pervasive use of social networks and online media. Developing reliable automated detection systems requires high-quality, meticulously curated, and annotated datasets - a task that is especially challenging for low-resource languages, such as Serbian. This paper describes the process of collecting, processing, and labeling textual data aimed at creating a dataset for hate speech detection in the Serbian language, as well as a comparative analysis of Large Language Models (LLMs) in the detection and classification of hate speech. The data were gathered from diverse sources, including social networks and online media platforms, utilizing both automated and manual techniques, as well as web crawling and scraping methods. The resulting dataset comprises 1351 short texts, containing 8029 sentences, annotated into three distinct classes: non-hate speech, offensive speech, and hate speech. Furthermore, hate speech instances were additionally categorized according to relevant types of discrimination in accordance with European Union legal acts. In addition to describing the annotation process, this paper provides a detailed analysis of the dataset, including class distribution, text length, and the most frequent keywords. Subsequently, the research selected five LLMs, which were inferred using prompt engineering with a different design for each approach. The models were evaluated using a literature-informed zero-shot prompting strategy based on detailed category definitions, decision criteria, and structured output constraints, implemented through single-stage, two-stage, and paragraph-level prompting settings. The selected models represent recent and widely used open-source general-purpose LLMs available through the Ollama platform, which was chosen to enable local, reproducible, and privacy-preserving evaluation on consumer hardware. Additional comparative experiments were also conducted using few-shot prompting, a general-purpose LLM, and the supervised BERTić model, and the publicly available bcms-bertic-frenk-hate classifier as external baselines. These LLMs were then employed for the detection and classification of hate speech, utilizing an ensemble strategy. The presented results highlight the complexity and diversity of hate speech in Serbian online communication, demonstrating a high detection accuracy of 86.7% achieved with the LLaMA 3 model, followed by Qwen3 (82%) for the two-stage sentence-level pipeline. For paragraph-level analysis, Qwen achieved the highest detection accuracy of 80%, slightly better than LLaMA 3 (77.3%). Ensemble of all five LLMs achieved comparable results to the best selected models, achieving 81.4% in two-stage sentence-level and 79.1% in paragraph-level analysis.

Read PDF

Similar papers

Open access Sep 2026

Detection of Hate and Dehumanizing Speech in Pashto Text Using Machine Learning Algorithms

Detecting harmful language in online platforms is essential for creating safer and more inclusive social media environments. However, research on harmful language detection has largely focused on high-resource languages, while low-resource languages such as Pashto remain comparatively underexplored. This study compares...

Shahid Nasiri, Nesar Ahmad Wasi · 0 citations
#artificial intelligence Preprint Aug 2026

Efficient Adaptation of LLMs for Hate Speech Detection in Low-Resource Languages: A Comparative Study on Roman Urdu

It is challenging to detect hate speech in Low Resource Languages (LRLs) because of the absence of annotated data, the informality of its language structure, and the lack of standardized grammar. A good example of such a challenge is Roman Urdu which is broadly used by South Asians on social media and has a high variat...

Toneema Zubair, Muhammad Asif, F. Kamiran et al. · 0 citations
Open access Aug 2026

A Context-Aware and Target-Adaptive Multilingual Framework for Hate Speech Detection in Code-Switched Social Media Text

A Context-Aware and Target-Adaptive Multilingual Hate Speech Detection model that combines multilingual transformer-based embeddings with a context-aware attention mechanism to capture semantic dependencies in text and reduces false positives is introduced.

K. Shruthi, K. Shivanna · 0 citations

Cost-Effective Hate Speech Detection in Portuguese Using Lightweight LLMs

This work evaluates the efficiency and competitiveness of seven smaller, more accessible LLMs through zero-shot classification with structured instructions, leveraging the expert-annotated test dataset and annotation scheme of the kNOwHATE project to demonstrate a viable, competitive, and low-cost approach that does no...

Mauro Cardoso, Eugénio Ribeiro, F. Batista et al. · 0 citations
Review Open access 2026

Culturally Aware Malay–English Code-Mixed Hate Speech Detection: A Systematic Review and Research Taxonomy

This study presents an evidence-informed systematic review and research-readiness taxonomy for culturally aware Malay-English hate speech detection and critically evaluates existing studies based on dataset availability, code-mix authenticity, annotation practice, cultural sensitivity, model architecture, evaluation st...

F. Azmi, Normaisharah Mamat, Rawad Abdulghafor et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.