Enhancing social media hate speech detection in low-resource languages using transformers and explainable AI
Endrit Fetahi, Arsim Susuri, Mentor Hamiti, Zenun Kastrati, Ercan Canhasi, Arta Misini
Abstract
Abstract Hate speech (HS) on social media exposes public discourse and community well-being. Despite its prevalence, majority of the research and technological advances have focused on rich-resourced languages. In contrast, Albanian, a language marked by dialects, limited NLP tools, and scarcity of annotated data, remains underexplored. To address this gap, this paper explores the enhancement of automatic hate speech detection in Albanian social media using advanced deep neural techniques. We collected a real-life dataset comprising 20,860 Facebook comments manually annotated using a rigorous multi-annotator process. Various techniques, including machine learning, deep neural networks, and transformers, are tested on the collected dataset. Our findings show that character-level 4-gram TF-IDF consistently reinforces ML classifiers effective with informal spelling and slang. However, the fine-tuned transformer XLM-RoBERTa achieves the highest performance with an F1-score up to 86%. These results mark a new benchmark for Albanian HS detection and highlight the impact of thorough feature engineering and robust representation techniques in a low-resource context. We also carried out an error analysis using both manual inspection and explainable AI approaches such as SHAP and LIME. Key language challenges include dialectal writing, short sentences, and implicit insults. These insights highlight the importance of domain-aligned embedding resources, more extensive annotation, and fine-grained context handling for improved detection. This study establishes a new state-of-the-art result for Albanian hate speech detection, provides a valuable comparison of models and feature engineering, and underscores the potential of multilingual transformers in low-resource scenarios.