Explain the Flag: Contextualizing Hate Speech Beyond Censorship

Jason Liartis, Eirini Kaldeli, Lambrini Gyftokosta, Eleftherios Chelioudakis, Orfeas Menis-Mastromichalakis

TL;DR

This paper introduces a hybrid framework that combines Large Language Models (LLMs) with expert-curated vocabularies to detect hate speech and generate natural language explanations for why content was flagged. Operating across English, French, and Greek, the system uses parallel pipelines to catch both explicit slurs and implicit group-targeted attacks, outperforming LLM-only baselines and providing a transparent alternative to black-box censorship.

What Problem Does This Paper Address?

Most automated content moderation systems act as a blunt instrument: they flag or remove offensive content without providing any justification to the user. This lack of transparency fuels concerns over arbitrary censorship and stifles freedom of expression. Furthermore, pure machine learning approaches often struggle with linguistic nuances, such as rare or evolving slurs, or words that are benign in one context but derogatory in another (e.g., reclaimed language).

These challenges are amplified in lower-resource languages like Greek, where training data is scarce. The authors tackle this gap by shifting the focus from mere censorship to contextual explanation, building a system that can reliably identify hate speech across multiple languages and explain its reasoning.

Methods

The authors design a dual-pipeline hybrid architecture that processes text through two parallel tracks:

  1. Term-Based Pipeline: This track targets inherently derogatory terms. The system lemmatizes the input text and performs string matching against a custom, curated vocabulary derived from Wiktionary. If a match is found, an LLM acts as a semantic disambiguator, evaluating the context to determine if the term is being used contentiously or neutrally.
  2. Term-Free Pipeline: This track catches implicit hate speech or group-targeted attacks that don't rely on explicit slurs. It uses an LLM prompted with a structured list of protected identity characteristics (e.g., religion, sexual orientation, race) to evaluate the text directly.

If either pipeline flags the text, it is marked as hate speech. If both pipelines flag it, a final LLM step fuses the outputs to eliminate redundancy and generate a single, coherent, grounded explanation.

Overall system architecture illustrating the two pipelines for hate speech detection and explanation.

The framework was tested using two LLM configurations per language: Claude 3.7 Sonnet as the heavy-duty proprietary model, and smaller open-weight alternatives (Llama-Krikri-8B-Instruct for Greek, and Hermes 3 Llama 3.1 8B for English and French).

Datasets

The authors evaluated their system on real online data (tweets) sampled from three existing sources: the Greek subset of OffensEval2020, the English Hate Speech Superset, and the French Hate Speech Superset.

Because existing datasets often conflate general profanity with identity-based hate speech, the authors re-annotated a subset of 1,600 texts (600 English, 400 French, 600 Greek) using 18 human experts. To analyze system behavior thoroughly, they created four dataset variants based on how borderline cases were handled: Majority (gold standard), Safe (ignoring borderline cases), Permissive (biased toward non-hate speech), and Strict (biased toward hate speech).

Additionally, they introduced three new curated vocabularies extracted from Wiktionary metadata, yielding 3,904 English, 1,644 French, and 288 Greek entries, complete with definitions and targeted identity categories.

Key Insights and Ideas

  • The Sum is Greater Than the Parts: Fusing the term-based and term-free pipelines consistently yielded higher F1-scores than relying on either pipeline alone. External lexical grounding helps even massive models like Claude 3.7 Sonnet overcome blind spots regarding rare or highly contextual terms.
  • The Lower-Resource LLM Penalty: While Claude dominated in English and French, its performance dropped noticeably in Greek. Interestingly, the smaller, language-specific Llama-Krikri-8B model achieved better precision than Claude in Greek, proving that targeted open-weight models can hold their own against proprietary giants in lower-resource settings.
  • Over-flagging in Uncertain Contexts: Human evaluators noted that when the system misclassified text, the generated explanations became overly verbose and occasionally exaggerated the text's toxicity. This suggests that LLMs introduce irrelevant details as a defense mechanism to justify their own uncertainty.

Key Results

  • Detection Accuracy: On the primary Majority dataset variant, the Claude-driven hybrid system achieved strong F1-scores of 0.90 for English and 0.93 for French. For Greek, performance was lower but comparable between Claude (0.83) and the Llama-based model (0.84).
Precision, recall, and F1-score across dataset variations, models, and languages.
  • Pipeline Synergy: The term-based pipeline maintained exceptionally high precision but low recall, acting as a reliable anchor, while the term-free pipeline provided the necessary breadth to catch implicit attacks.
Precision, recall, and F1-score of the Term Free (TF), Term Based (TB), and Fused (F) pipelines.
  • Explanation Quality: Human annotators rated the generated explanations on a 5-point Likert scale. English and French explanations scored highly for content and fluency (averaging ~4.2 to 4.6). Greek scores were lower (~3.1 to 3.3), primarily dragged down by false positives that triggered irrelevant justifications.

Limitations and Future Work

A primary limitation is the system's reliance on Wiktionary, which does not always capture rapid, real-time shifts in how marginalized communities reclaim derogatory terms. Furthermore, due to budget constraints, human validation of the English and French vocabularies was limited to a 10% sample (though it showed a >90% satisfaction rate).

For future work, the authors plan to scale the framework to additional languages and explore advanced engineering techniques—such as Retrieval-Augmented Generation (RAG), self-evaluation loops, and consistency-based decoding—to improve the system's robustness and reduce verbosity in lower-resource languages.

Summary updated

BibTeX
@inproceedings{liartis2026explain,
  author = {Jason Liartis and Eirini Kaldeli and Lambrini Gyftokosta and Eleftherios Chelioudakis and Orfeas Menis-Mastromichalakis},
  title = {{Explain the Flag: Contextualizing Hate Speech Beyond Censorship}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.406},
}
Figure