Manuscript Offprint

arXiv:2611.09506

On the Effectiveness and Limitations of Open-Weight LLMs for Low-Resource Offensive Language Detection in Danish

Elnur Adl Zarabi, Amit Kumar, Adi Singh, Sierra Nelson, Megan Stubbs-Richardson, Taoran Ji

Elnur Adl Zarabi

Texas A&M University-Corpus Christi

eadlzarabi@islander.tamucc.edu

Amit Kumar

Texas A&M University-Corpus Christi

akumar3@islander.tamucc.edu

Adi Singh

Mississippi State University

as5142@msstate.edu

Sierra Nelson

Mississippi State University

Sierra.nelson@ssrc.msstate.edu

Megan Stubbs-Richardson

University of Miami

Mxr3845@miami.edu

Taoran Ji

Texas A&M University-Corpus Christi

taoran.ji@tamucc.edu

Abstract—We study the effectiveness and robustness of open-weight large language models (LLMs) for Danish offensive language detection, an underexplored low-resource task. We evaluate four model families (Llama, Mistral, Gemma, and Qwen) across eleven prompting strategies spanning five design categories, cross-prompt generalization, Danish orthographic variation, and robustness under balanced and naturally imbalanced class distributions. We compare against three BERT-family baselines with distinct pre-training strategies, evaluated via both masked language model prompting and supervised fine-tuning. Even without task-specific fine-tuning, LLMs can surpass all three fine-tuned BERT baselines, and lightweight finetuning yields substantial further gains. No single model or prompt category dominates, underscoring that prompt design interacts with model pre-training in ways that cannot be predicted a priori. Semantically grounded prompts transfer more robustly, while format-constrained patterns consistently fail to generalize. ASCII transliteration of Danish-specific characters (æ, Ø, å) generally degrades performance, indicating these characters encode meaningful signal. At the same time, the gap between a balanced test set (best F1 of 0.84) and the corpus's natural class skew (0.62 trained on skewed data, 0.70 trained on balanced data) – relative drops of 26.2% and 16.7% – shows that class imbalance remains a critical open challenge. Our code and configurations are available at https://github.com/PASHAADC/Danish-LLM-HateSpeech.

I. INTRODUCTION

The proliferation of online hate speech poses urgent societal challenges demanding effective automated detection. Danish represents a critical yet understudied case as a low-resource language with approximately six million speakers and lacks the annotated corpora and specialized models available for English [1]. Danish statistics document increased hate crimes with approximately half occurring on digital platforms [2], concerning given causal links between social media activity and real-world hate crimes [3]. Open-weight LLMs offer a promising path forward due to their customizability, transparency, and sensitivity. However, their effectiveness for Danish offensive language detection remains unexamined. To the best of our knowledge, this paper presents the first systematic investigation of LLM efficacy for Danish offensive language detection.

Figure 1 provides an overview of the experimental pipeline, including dataset construction, prompting-based evaluation of BERT-family baselines and open-weight LLMs, and robustness analysis under balanced and naturally imbalanced settings.

Research on LLM-based hate speech detection has focused almost exclusively on English, revealing that effectiveness depends on many factors. Zhang et al. [4] show that LLMs exhibit excessive sensitivity to group-related linguistic cues, frequently misclassifying benign statements as hateful, while also displaying poor calibration with confidence scores concentrated in narrow ranges regardless of task difficulty. Melis et al. [5] organize hate speech definitions into a taxonomy of 14 conceptual elements and demonstrate that varying the specificity of the definition provided in the prompt substantially affects zero-shot classification performance, though the effect is inconsistent across model architectures. Roy et al. [6] vary the content of zero-shot prompts for GPT-3.5 and FLAN-T5 on three English benchmarks and find that supplying the targeted community lifts F1 by 20 to 30 percent over a plain query while definitions help one model and hurt another, so the value of a prompt ingredient depends on the model that reads it. Plaza-del-Arco et al. [7] prompt encoder and instruction-tuned models zero-shot on eight English benchmarks and on Spanish and Italian, where the choice of label words alone shifts macro-F1 by several points and FLAN-T5 matches a fine-tuned RoBERTa on three datasets, though zero-shot stays below the fine-tuned baseline in both low-resource languages. Prompt design plays a critical role more broadly [8], with explanation-enhanced strategies proving particularly effective. Nghiem and Daumé III [9] show that pretraining on chain-of-thought explanations drawn from over 52,000 samples significantly improves generalization across offensive speech benchmarks in both zero-shot and few-shot settings. Class imbalance also remains central, as hate speech constitutes only a small fraction of real-world content. Tonneau et al. [10] find that hateful posts represent roughly 2–3% of a representative day on Twitter, underscoring the severity of the class skew that detection

Figure

Fig. 1. Experimental pipeline for evaluating the effectiveness and robustness of Danish offensive language detection models. From the DKHate corpus, we derive balanced and naturally imbalanced settings, construct ASCII-transliterated variants for orthographic robustness analysis, and apply two stratified split configurations (80/10/10 and 60/10/30). These evaluation settings are used to compare BERT-family baselines and LoRA-adapted open-weight LLMs across multiple prompting regimes, with final outputs mapped to task labels through deterministic parsing.

systems must handle.

Research on Danish hate speech detection remains limited. Sigurbergsson and Derczynski [11] introduced the DKHate corpus and benchmarked it using logistic regression, SVM, and BiLSTM classifiers. Müller-Eberstein et al. [12] show that native Danish data more than doubles LLM acceptance rates versus translated alternatives, highlighting cross-lingual transfer limitations and motivating the use of language-specific resources. On the BERT side, several models have become available—multilingual BERT [13], the monolingual DaBERT [14], and the regional ScandiBERT [15]—but their effectiveness for Danish offensive language detection remains unexamined, making them natural baselines for contextualizing LLM performance. To address these gaps, we systematically evaluate four open-weight LLM families and three BERT baselines across eleven prompting patterns, three evaluation settings, and two split configurations. Our main findings are:

  • BERT models evaluated via both masked language modeling (MLM) prompting and supervised fine-tuning reveal that monolingual Danish pre-training (DaBERT) substantially outperforms multilingual and regional alternatives on imbalanced data when paired with task-specific supervision. ScandiBERT's nominally highest balanced-data score is obtained by predicting the offensive class for every input (recall of 1.0), i.e., a degenerate classifier rather than learned discrimination. MLM prompting proves fundamentally limited for this task.

  • Under balanced evaluation, open-weight LLMs achieve strong performance with minimal fine-tuning. Imbalanced distributions reveal substantial degradation, with no single model or prompt dominating. Theory-informed prompts often remain comparatively robust under class imbalance,

while format-constrained patterns consistently fail to generalize.

  • ASCII transliteration of Danish characters (æ, ø, å → ae, oe, aa) generally degrades performance, indicating that these characters encode meaningful signal that should be preserved.

  • Zero-shot and few-shot fine-tuning achieve comparable peak performance, but few-shot gains are less consistent, suggesting in-context examples do not reliably improve fine-tuned representations.

References (23)