Source-linked AI summary

From Specialization to Generalization: Instruction-tuned LLMs for Robust Harmful Content Mitigation

Lukas Edman, Daryna Dementieva, Alexander Fraser

arXiv:2608.25605v1cs.CL

TL;DR

The paper addresses limited evidence for robust, generalizable LLM-based hate speech mitigation beyond prompting and task-specific encoders. It unifies 36 English datasets into an instruction-tuning corpus and trains a Qwen3-based generalist model, which performs competitively or better while generalizing across tasks, domains, and some languages.

  • Problem

    Generalizable hate speech models remain limited, and prior prompting studies have not consistently surpassed encoder systems; large-scale multi-task LLM tuning was unexplored.

  • Method

    The authors unify 36 heterogeneous English datasets into an instruction-formatted corpus and instruction-tune a Qwen3-based LLM for hate speech mitigation.

  • Results

    The generalist model performs at least on par with or significantly outperforms task-specific BERT-style and prompt-based approaches, with improved held-out and some multilingual-task performance.

  • Takeaways & Limitations

    Instruction-tuned LLM generalists can support robust harmful speech detection and proactive moderation across diverse domains and some multilingual tasks.

  • Takeaways & Limitations

    Training uses only English datasets, and multilingual training is not tested; cultural differences could produce conflicting annotation styles.

Abstract

from arXiv · show

Large language models (LLMs) demonstrate impressive performance across a wide range of general NLP tasks; however, their effectiveness in sensitive domains, such as hate speech detection, remains less clear. Prior studies comparing prompted LLMs with state-of-the-art encoder-based models (e.g., BERT variants (Roy et al., 2023; Dönmez et al., 2024)) have shown only marginal gains, suggesting that LLMs may not excel in hate speech detection or mitigation. In this work, we revisit this question through the lens of instruction tuning. By thoroughly unifying 36 English hate speech datasets spanning multiple labeling schemes, we fine-tune a generalist LLM, based on Qwen3 (Qwen Team, 2025), specifically for hate speech mitigation. Our results demonstrate not only state-of-the-art performance on in-domain benchmarks but also substantial improvements in cross-domain and cross-lingual generalization--areas where encoder-based specialist classifiers often struggle.

1 Introduction

The paper addresses limited evidence that LLMs can generalize for hate speech mitigation by instruction-tuning a unified generalist model and evaluating it across varied settings.

  • Research gap: Existing hate speech research has produced diverse datasets, but generalizable models spanning tasks and unseen domains remain limited.Prior work commonly treats datasets or subtasks in isolation.
  • Research gap: Prompting LLMs has not consistently outperformed encoder-based systems, while instruction tuning remains underexplored for hate speech mitigation.Task-specific encoder-based models therefore remain dominant.
  • Approach: The study consolidates 36 heterogeneous English datasets into a single instruction-formatted corpus containing over 600k examples and 61 subtasks.The unified corpus supports evaluation across in-domain, out-of-domain, and cross-lingual settings.
  • Research questions: The work asks whether instruction-tuned LLMs outperform task-specific and prompted baselines and generalize across unseen domains, labels, and languages.These questions cover English benchmark performance, prompting comparisons, cross-domain transfer, and cross-lingual transfer.
  • Findings: The instruction-tuned model achieves competitive or better performance than encoder-based systems and exhibits cross-task generalization.A smaller training corpus may also improve cross-lingual performance, especially for generative tasks.
  • Resources: The authors release the fine-tuning code and best-performing models for public use.

2 Background

The background situates the work among diverse hate speech resources, encoder-based benchmarks, and emerging LLM approaches, emphasizing the lack of broad multi-task LLM tuning.

  • Definitions: The study explicitly defines hate speech as abusive language targeting specific groups and toxic speech as vulgar or profane language not necessarily abusive or hateful.Other prompt labels follow the original dataset definitions.
  • Datasets: Hate speech resources span binary, multiclass, multilabel, and hierarchical schemes across domains and languages.English datasets are especially numerous, while resources also exist for Arabic, French, Spanish, Italian, Portuguese, and German.
  • Datasets: Functionality-test datasets such as HateCheck isolate specific manifestations of hate speech that aggregate metrics can obscure.
  • Mitigation tasks: Proactive mitigation research includes detoxification, which transforms toxic text into neutral text, and counter-speech generation for more severe hate speech.
  • Prior models: Transformer encoders such as BERT and RoBERTa have predominantly driven state-of-the-art performance across hate speech benchmarks.Specialized variants and multilingual encoders are also used for domain-specific and non-English tasks.
  • Prior models: LLM prompting studies report mixed findings, including low agreement with human labels, stronger reliability for non-hateful content, and competitive results for some models.Definitions, target-specific context, and chain-of-thought prompting have also been explored.
  • Research gap: Previous LLM fine-tuning studies were narrow, and none explored large-scale tuning across tasks with different label schemes, hierarchies, and label types.

3 Methodology

The methodology unifies heterogeneous English datasets into conversational instructions, standardizes task outputs, and instruction-tunes LLMs of multiple sizes for broad evaluation.

  • 3.1 Data Collation: The authors compile over 600k examples from diverse English datasets spanning multiple domains and label types.Tasks are divided into binary classification, multiclass classification, multilabel classification, and generation.
  • 3.1 Data Collation: Hierarchical datasets represent multiple tasks, typically beginning with binary classification before applying subsequent labels to hateful examples.
  • 3.1 Data Collation: The test superset contains nine reproducibly split datasets and includes tasks from all four categories.
  • 3.1 Data Collation: Deduplication removes conflicting or repeated training examples, affecting 75 examples, or 0.01% of the set.Cross-dataset conflicts retain the hateful or offensive label after temporary binarization.
  • 3.2 Instruction Construction: Each dataset is converted into a conversational format with a generic message, input text, and task-specific instruction.The assistant supplies the task answer.
  • 3.2 Instruction Construction: Multiclass and multilabel categories receive letter prefixes so outputs are letters rather than exact class names, with labels alphabetically ordered.The authors report that this substantially improves performance and reduces conflicting training signals.
  • 3.2 Instruction Construction: Generative datasets use task-specific prompts, including toxic-span extraction and open-ended counter-narrative dialogue.
  • Training: The experiments include Qwen3, Llama3, and Phi4 models around 4B parameters, with additional 32B and 0.6B models to assess model size.HIPPO is based on Qwen3-4B-Instruct-2507, and QLoRA enables efficient fine-tuning.

4 Results

HIPPO’s unified instruction tuning is competitive with specialized systems, improves cross-task transfer, and shows mixed cross-lingual effects depending on training size and task.

  • 4.1 Comparison to State-of-the-art: Unified training improves performance in 14 of 17 cases versus training separately on each test-set split and outperforms GPT5-mini.
  • 4.1 Comparison to State-of-the-art: HIPPO wins on 7 of 17 tasks against the best-known literature models while achieving higher average performance without task-specific methods beyond prompting.
  • 4.1 Comparison to State-of-the-art: The 32B model wins in 11 of 17 cases against the state of the art, whereas the 0.6B model performs poorly partly because generation is unconstrained.The 4B model is described as competitive with highly tuned task-specific models.
  • 4.2 Prompting and Cross-task Transfer: Fine-tuning clearly outperforms the same model’s zero-shot prompt, while few-shot prompting is omitted because it did not match zero-shot performance.
  • 4.2 Prompting and Cross-task Transfer: Leave-one-out training generally exceeds zero-shot performance across tasks, demonstrating cross-task learning capability.The leave-one-out setup trains separate models with each test dataset’s corresponding training split excluded.
  • 4.3 Cross-lingual Transfer: Fully trained HIPPO drops on non-English classification and functional tasks relative to zero-shot, while limited English-only training is competitive for classification and stronger on HateCheck and ParaDetox.Arabic and Hindi perform worst on HateCheck, Chinese performs better, and non-hateful content remains nearly perfect across languages.

5 Conclusion

The study presents HIPPO, a Qwen3-4B-based generalist trained on 36 heterogeneous datasets, and reports strong performance and generalization across tasks and languages.

  • HIPPO is based on Qwen3-4B and trained using a unified instruction-style corpus constructed from 36 heterogeneous datasets.The corpus covers harmful content classification and proactive speech generation tasks.
  • The generalist model performs at least on par with or significantly outperforms task-specific BERT-style models and prompt-based LLM approaches.
  • Held-out performance increases indicate generalization to new tasks that BERT-based specialists cannot readily perform.
  • Generalization extends to some multilingual tasks, although further multilingual training could improve performance on non-English languages.

Limitations

The study’s limitations concern its English-only training data, limited prompt-style evaluation, and the absence of tested reasoning strategies for hate speech tasks.

  • Training uses only English datasets, so performance trends in other languages remain uncertain.Multilingual training is untested and may improve cross-lingual performance, though conflicting annotation styles could hurt results.
  • The evaluation does not test a large number of prompting styles, and zero-shot results use a manually crafted but unoptimized prompt.Definitions and annotation guidelines were omitted when unavailable for many datasets.
  • The study does not incorporate or test model reasoning for hate speech tasks.Other reasoning effort levels were not tested for GPT5-mini, and annotated hate speech reasoning data was unavailable.

Ethics Statement

The paper frames automated moderation as a safety-oriented capability requiring responsible deployment, while acknowledging misuse risks and the need for human and community oversight.

  • The work investigates language technologies for improving online safety and releases code and models under the OpenRAIL-S license.
  • Potential misuse includes aggressive censorship, model jail-breaking for hate behavior, and generation of more hateful content.
  • Effective content moderation cannot rely solely on automated systems and requires user-centered research and attention to social context.Moderation policies should remain with communities so safety mechanisms reflect their values, norms, and expectations.
  • The model can support flexible, fine-grained, scalable, and consistent moderation, but its outputs should inform recommendations rather than final decisions.

C Datasets Labels Statistics

The datasets combine generative tasks with fine-grained target- and style-based labels, while differing licenses support academic use and responsible release of the combined resource.

  • Label distribution: Generative datasets include ToxicSpans, ParaDetox, ImplicitHate, Intervene, and CONAN; treated as discriminative tasks, their examples would largely be toxic or hateful.
  • Fine-grained labels: Fine-grained labels comprise target-based and style-based categories, which are not mutually exclusive within or across these groups.
  • Fine-grained labels: Target-based labels are more frequent in training, while test labels are more evenly distributed and generic labels are more frequent.
  • Fine-grained labels: The large “other” group mostly comes from Gab Hate Corpus annotations covering varied targets, including untargeted hate and uncategorized targeted hate.
  • Licensing: The study plans to release the combined instruction-training dataset under the most restrictive license supporting research-only responsible use.

E Datasets Examples

The examples cover classification and generation datasets across multiple subtasks and domains, illustrating the breadth of the unified instruction-tuning setup. Model comparisons show HIPPO performing best, with Qwen-based models generally stronger overall.

  • Model comparison: HIPPO performs best among the compared models, while both Qwen-based models perform better overall.The comparison includes Qwen3, HIPPO, Llama3.2-3B-Instruct, and Phi4-Mini-Instruct.

G Extended results

The unified model performs across binary and fine-grained labeling schemes and benefits from shared structure between related tasks. Its strongest comparative gains arise where task definitions overlap, reducing confusion between similar categories.

  • Extended results: The unified model accurately predicts binary categories across diverse domains with minimal label confusion.Examples include hate versus non-hate, misogynous versus non-misogynous, and offensive versus non-offensive labels.
  • Extended results: The model also handles fine-grained categories such as slurs, attacks, threats, harassment, and related labels.The cited tasks include AMI18-Task B2 and EDOS-Task C.
  • Extended results: The unified model generalizes beyond binary labels across multiple domains, task formulations, and category granularities.This extends the evaluation beyond a single labeling scheme.
  • Cross-task comparison: Shared definitions between AMI18-B and EDOS-B reduce confusion between discredit/derogation and dominance/animosity categories.The individual models cannot exploit these cross-task similarities to the same extent.

H Further Discussion

The discussion identifies label disagreement and possible data contamination as important constraints on unified hate-speech evaluation. Despite these concerns, the authors report that joint training outperforms individual training and supports cross-task generalization.

  • Label disagreement: Different annotator guidelines and annotator disagreements create inconsistent labels across and within hate-speech datasets.Subtle sentiment differences can produce different classifications, complicating dataset unification.
  • Label disagreement: Guideline differences can hurt cross-task performance, especially when datasets define targets differently.HatEval19-C excludes group targets, whereas HASOC19 includes them.
  • Label disagreement: Including definitions in prompts may address disagreement but risks overfitting when fixed guidelines identify a specific dataset.Paraphrasing guidelines is proposed as a future way to increase variety.
  • Data contamination: Public social-media sources make text contamination highly likely, while text-label contamination is more difficult to assess.The authors distinguish contamination of text from contamination involving labels.
Loading 2608.25605v1…