Analyzing the Performance of Deep Learning Models for Detecting Hate Speech on Social Media Platforms
Abstract
Currently social media and online platforms have become a major source of cyberbullying and hate speech. It is currently affecting people and communities in harmful ways. Hate speech on social media is rising in Bangladesh and it is creating a need for effective tools to prevent and detect these incidents. This study introduces a deep learning model to mitigate this issue of identifying hate speech in text using three types of word embedding methods: Word2Vec, FastText, and BERT. The text data was labeled to mark hate speech and non-hate speech content. After that, these texts are preprocessed by removing punctuation and symbols to help improve model accuracy. Five deep learning models Bi-GRU-LSTM-CNN, Bi-LSTM, CNN, LSTM, and XGBoost were trained to classify the text as hate speech or non-hate speech. The study found that the LSTM model accomplished the highest accuracy at 95.66% with the Word2Vec embedding method, while CNN reached 87.70% with FastText embeddings. Word2Vec is effective for capturing word meanings in general text classification. FastText works well with rare words and languages that have complex word forms. These findings help advance effective hate speech detection techniques. It could promote more respectful and inclusive interactions on social media. This proposed deep-learning model can help stop cyberbullying and hate speech on social media.
Downloads
References
Ahmed, L., et al. (2023). Context based emotion recognition from bengali text using transformers. In 2023 5th International Conference on Smart Systems and Inventive Technology (ICSSIT) (pp. 1478-1484). IEEE.
Al-Hassan, A., & Al-Dossari, H. (2022). Detection of hate speech in Arabic tweets using deep learning. Multimedia Systems, 28(6), 1963–1974.
Baki, R. F., et al. (2023). Intelligent Head-bot, towards the Development of an AI Based Cognitive Platform. MIST International Journal of Science And Technology, 11(2), 01-14.
Bhardwaj, A., Di, W., & Wei, J. (2018). Deep Learning Essentials: Your hands-on guide to the fundamentals of deep learning and neural network modeling. Packt Publishing Ltd.
Bisht, A., Singh, A., Bhadauria, H. S., Virmani, J., & Kriti. (2020). Detection of Hate Speech and Offensive Language in Twitter Data Using LSTM Model. In S. Jain & S. Paul (Eds.), Recent Trends in Image and Signal Processing in Computer Vision (pp. 243–264). Springer.
Br Ginting, P. S., Irawan, B., & Setianingsih, C. (2019). Hate Speech Detection on Twitter Using Multinomial Logistic Regression Classification Method. 2019 IEEE International Conference on Internet of Things and Intelligence System (IoTaIS), 105–111.
Deutsche Welle. (2019, October 24). Bangladesh: Fake news on Facebook fuels communal violence. DW. https://www.dw.com/en/bangladesh-fake-news-on-facebook-fuels-communal-violence/a-51083787.
Dewani, A., Memon, M. A., & Bhatti, S. (2021). Cyberbullying detection: advanced preprocessing techniques & deep learning architecture for Roman Urdu data. Journal of Big Data, 8(1), 160.
El Rifai, H., Al Qadi, L., & Elnagar, A. (2022). Arabic text classification: the need for multi-labeling systems. Neural Computing and Applications, 34(2), 1135–1159.
Gambäck, B., & Sikdar, U. K. (2017). Using Convolutional Neural Networks to Classify Hate-Speech. Proceedings of the First Workshop on Abusive Language Online, 85–90.
Ganfure, G. O. (2022). Comparative analysis of deep learning based Afaan Oromo hate speech detection. Journal of Big Data, 9(1), 76.
Hands-On Gradient Boosting with XGBoost and scikit-learn. (n.d.). Packt. Retrieved April 16, 2023, from https://www.packtpub.com/product/hands-on-gradient-boosting-with-xgboost-and-scikit-learn/9781839218354.
Huang, X., Xing, L., Dernoncourt, F., & Paul, M. J. (2020). Multilingual Twitter Corpus and Baselines for Evaluating Demographic Bias in Hate Speech Recognition. In Proceedings of the Twelfth Language Resources and Evaluation Conference (pp. 1440–1448). European Language Resources Association.
Ishmam, A. M., & Sharmin, S. (2019). Hateful Speech Detection in Public Facebook Pages for the Bengali Language. 2019 18th IEEE International Conference on Machine Learning and Applications (ICMLA), 555–560.
Javaid, M., Haleem, A., Singh, R. P., & Suman, R. (2022). Artificial Intelligence Applications for Industry 4.0: A Literature-Based Study. Journal of Industrial Integration and Management, 07(01), 83–111.
Kang, H. (2013). The prevention and handling of the missing data. Korean Journal of Anesthesiology, 64(5), 402–406.
Khan, S., Fazil, M., Sejwal, V. K., Alshara, M. A., Alotaibi, R. M., Kamal, A., & Baig, A. R. (2022). BiCHAT: BiLSTM with deep CNN and hierarchical attention for hate speech detection. Journal of King Saud University - Computer and Information Sciences, 34(7), 4335–4344.
Mitrović, J., Birkeneder, B., & Granitzer, M. (2019). nlpUP at SemEval-2019 Task 6: A Deep Neural Language Model for Offensive Language Detection. Proceedings of the 13th International Workshop on Semantic Evaluation, 722–726.
Mozafari, M., Farahbakhsh, R., & Crespi, N. (2020). A BERT-Based Transfer Learning Approach for Hate Speech Detection in Online Social Media. In H. Cherifi, S. Gaito, J. F. Mendes, E. Moro, & L. M. Rocha (Eds.), Complex Networks and Their Applications VIII (pp. 928–940). Springer International Publishing.
Plaza-del-Arco, F. M., Molina-González, M. D., Ureña-López, L. A., & Martín-Valdivia, M. T. (2021). Comparing pre-trained language models for Spanish hate speech detection. Expert Systems with Applications, 166, 114120.
The Business Standard. (2021, May 21). Why Chanchal Chowdhury's comment box needs our attention. https://www.tbsnews.net/feature/panorama/why-chanchal-chowdhurys-comment-box-needs-our-attention-244456.
Vo, H. H.-P., Nguyen, H. H., & Do, T.-H. (2022). Analysis of the Effects of Stop-word Removal in Hate Speech Detection Problem for Vietnamese Social Network Data. In N.-T. Nguyen, N.-N. Dao, Q.-D. Pham, & H. A. Le (Eds.), Intelligence of Things: Technologies and Applications (pp. 299–309). Springer International Publishing.
Zhang, A., Lipton, Z. C., Li, M., & Smola, A. J. (2023). Dive into Deep Learning (No. arXiv:2106.11342). arXiv.
Though MIJST follows the open access policy, the journal holds the copyright of each published items.
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.