Universidade da Coruna
Explainable and Efficient Language Models for Hate Speech Detection
Abstract
dc:description.abstract[Abstract] The widespread adoption of online social networks has transformed public communication by enabling users to produce and disseminate content at an unprecedented scale. This user-generated content often takes the form of opinions, reactions, and discussions around socially relevant issues. Yet, the same openness that supports public participation also facilitates the emergence and diffusion of harmful content, including hate speech. In online settings, hate speech can have an amplified impact: social platforms increase its potential reach and speed of dissemination, while perceived anonymity may contribute to more aggressive and explicit forms of expression. At the same time, detecting hate speech remains a complex task, since harmful messages may be explicit or implicit, direct or coded, and often depend on social, cultural, and conversational context. This combination of scale, impact, and linguistic complexity has made automated detection a central challenge for online content moderation. Recent advances in Natural Language Processing (NLP), particularly Large Language Models (LLMs), provide a timely opportunity to address this challenge by modelling nuanced linguistic patterns more effectively. Consequently, these developments have driven increasing interest in automated hate speech detection systems designed to operate at scale in real-world environments. Although recent approaches have advanced hate speech detection through the use of diverse datasets and increasingly powerful models, several challenges remain. First, differences in dataset construction and annotation schemes complicate the development of systems that generalise across domains and definitions of hate speech. Second, the high computational cost of state-of-the-art models can limit their practical deployment in large-scale moderation scenarios. Third, the limited transparency of many detection systems makes it difficult to understand, validate, and trust their decisions. These issues are especially relevant in dynamic online environments, where harmful content changes over time and detection systems must adapt accordingly. This thesis addresses these challenges by developing hate speech detection systems that aim to combine accuracy with efficiency, interpretability, and adaptability to evolving online contexts. The contributions of this thesis are organised across four thematic areas. The first concerns the construction of large-scale data resources for hate speech detection. MetaHate consolidates dozens of publicly available English datasets into a unified meta-collection, accompanied by a linguistic analysis identifying consistent lexical, topical, and psycholinguistic patterns that distinguish hateful from non-hateful content. MetaHateES extends this effort to Iberian languages, constructing the first large-scale cross-lingual benchmark covering Spanish, European Portuguese, and Galician, augmented with synthetic data generation and cross-lingual analysis. of how hate speech dimensions are preserved across translations and lowresource language varieties. The second area develops parameter-efficient and adaptive modelling strategies that retain reasoning capabilities while reducing computational requirements. Knowledge Distillation (KD) is explored as a means of transferring the reasoning and classification capabilities of large teacher LLMs into smaller, deployable student models without sacrificing explanation quality. Building on this, THOR introduces a reinforcement learning framework via Group Relative Policy ptimisation (GRPO) that explicitly aligns reasoning with classification objectives, showing that structured reasoning optimisation can outperform much larger models that rely on prompting alone. This area is completed by a Retrieval-Augmented In-Context Learning (RAICL) approach that retrieves semantically relevant examples at inference time to handle concept drift, enabling adaptation to evolving hate speech patterns without retraining. The third area analyses and mitigates biases and vulnerabilities in LLMs when handling harmful content. An audit of state-of-the-art LLMs reveals substantial variation in how models respond to hate speech in open-ended interactions, and evaluates the effectiveness of guardrailing and fine-tuning strategies to prevent toxic generation. A dedicated study on geographic and linguistic bias shows that country-specific contextualisation systematically degrades classification performance, and proposes a Debias Tuning strategy to restore cross-context robustness. Annotation reliability is further examined under a subjectivity-aware framework, showing that LLMs can serve as scalable proxy evaluators for model comparison even when they diverge from human annotators at the instance level. Finally, a study on demographic perspective-taking evaluates whether persona-conditioned LLMs can reproduce the structure of human disagreement in hate speech perception, finding that vicarious prompting offers a more reliable path towards human-aligned annotation than standard identity conditioning. The fourth area integrates these contributions into a unified operational system. WATCHED is an agent-based moderation framework that coordinates a hate speech classifier, a retrieval module for similar posts and lexical resources, a distilled reasoning model, and a social network policy grounding tool, producing interpretable and evidence-based decisions with a human-in-the-loop feedback mechanism. Taken together, the contributions of this thesis advance hate speech detection along three dimensions: data coverage is broadened through large-scale, multilingual consolidation of existing resources; computational efficiency is improved through distillation and reinforcement learning pipelines that enable compact models to match or exceed the performance of much larger systems; and transparency is enhanced through explicit reasoning traces, retrieval-based adaptation, and subjectivity-aware evaluation. The result is a moderation framework that is more accurate, efficient, and interpretable than existing approaches, providing a foundation for scalable and responsible content moderation systems.
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Piot, Paloma
- Advisors dc:contributor.advisor
-
- Parapar, Javier
- Martín-Rodilla, Patricia
- Oostdijk, Nelleke
Subjects
dc:subject × 5Rights
dc:rights.accessrights- Statement dc:rights.accessrights
-
- open access
- Os titulares dos dereitos de propiedade intelectual autorizan a visualización do contido desta tese a través de Internet, así como a súa reprodución, gravación en soporte informático ou impresión para o seu uso privado e/ou con fins de estudo e de investigación. En ningún caso se permite o uso lucrativo deste documento. Estes dereitos afectan tanto ao resumo da tese como ao seu contido Los titulares de los derechos de propiedad intelectual autorizan la visualización del contenido de esta tesis a través de Internet, así como su reproducción, grabación en soporte informático o impresión para su uso privado o con fines de investigación. En ningún caso se permite el uso lucrativo de este documento. Estos derechos afectan tanto al resumen de la tesis como a su contenido
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/2183/49649