Balancing Efficiency and Accuracy: A Comparative Analysis of LSTM and RoBERTa for Explainable Hate Speech Detection on HateXplain
Social media hate speech poses significant challenges to online communities and platform governance, necessitating efficient automated detection methods. This paper presents a comprehensive comparative study of two alternative models for hate speech classification—a recurrent neural network based on LSTM and a transformer-based RoBERTa model—trained and tested on the publicly available HateXplain dataset. The LSTM model attained a macro-averaged F<inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1</inf> score of 0.85 (weighted F<inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1</inf> of 0.89), demonstrating competitive performance with reduced computational overhead. The RoBERTa model achieved a macro-averaged F<inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1</inf> score of 0.9211, indicating superior classification capacity. Both approaches are evaluated using accuracy, precision, recall, and F<inf xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1</inf> metrics, and compared in terms of training time and parameter efficiency. These findings illuminate the trade-offs between model complexity and performance, providing practical guidance for selecting appropriate architectures in large-scale hate speech detection systems.
Authors
- Khaled Albusays
- Wael H. Gomaa (ORCID: https://orcid.org/0000-0002-6847-2632)
- John Medhat
- Ahmed Mounir
Institutions
- Beni-Suef University (EG)
- October University of Modern Sciences and Arts (EG)
Publication Details
- Published
- 2025-07-12
- DOI
- https://doi.org/10.1109/imsa65733.2025.11166959
- Primary Topic
- Hate Speech and Cyberbullying Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00