Machine Learning Enhanced By Sentiment Analysis For Cyberbullying Detection Using Nlp And Lstm
DOI:
https://doi.org/10.63665/rxrr9x57Keywords:
Cyberbullying Detection, Natural Language Processing, LSTM, Deep Learning, Sentiment Analysis, Social Media, Text Classification, Word Embeddings, Sequence Modelling, Data ImbalanceAbstract
The proliferation of social media has brought the critical challenge of cyberbullying to the forefront of digital safety, causing significant psychological harm. Traditional machine learning detection methods often fail to capture the nuanced and contextual nature of harmful language. This paper proposes an advanced framework that combines Natural Language Processing (NLP) techniques with a Long Short-Term Memory (LSTM) network for improved cyberbullying detection in online text. The methodology applies refined text preprocessing steps—tokenization, stop word removal, stemming, and lemmatization—to ensure high-quality input data. Sentiment features and contextual patterns are then extracted using word embeddings to preserve semantic information. These processed inputs are fed into an LSTM model, which effectively captures sequential and temporal dependencies, making it well-suited for understanding the dynamic language of cyberbullying. Resampling techniques are also employed to address multi-class data imbalance, enhancing model robustness. The proposed system demonstrates that integrating deep learning with comprehensive NLP significantly enhances accuracy and contextual understanding, paving the way for more effective and reliable automated content moderation. Experimental results show the proposed LSTM model achieves 92% accuracy, outperforming conventional classifiers such as Naive Bayes and Extra Trees.
Downloads
References
[1] M. S. Akter, H. Shahriar, and A. Cuzzocrea, “A trustable LSTM-autoencoder network for cyberbullying detection,” in Proc. IEEE Int. Conf. Big Data (Big Data), 2023, pp. 1623–1630.
[2] T. H. Teng, M. Lee, and A. Yusof, “A comprehensive review of cyberbullying-related content classification,” IEEE Access, vol. 12, pp. 45123–45138, 2024.
[3] S. Sihab-Us-Sakib, T. Mahmud, and M. Hossain, “Cyberbullying detection for resource-constrained languages using Bi-LSTM,” J. Data Inf. Sci., vol. 9, no. 2, pp. 112–125, 2024.
[4] S. Chen, Y. Zhang, and L. Liu, “Chinese cyberbullying detection using XLNet and deep models,” J. Comput. Linguist., vol. 48, no. 3, pp. 589–601, 2024.
[5] A. Cuzzocrea, M. S. Akter, H. Shahriar, and P. G. Bringas, “Cyberbullying detection, prevention, and analysis via trustable LSTM-autoencoder networks,” IEEE Trans. Dependable Secure Comput., vol. 22, no. 1, pp. 89–102, Jan. 2025.
[6] E. Vogels, Teens and Cyberbullying 2022. Pew Research Center, Dec. 15, 2022. [Online]. Available: https://www.pewresearch.org/internet/2022/12/15/teens-and-cyberbullying-2022/
[7] S. Cook, Cyberbullying Statistics and Facts for 2024, Comparitech, 2024. [Online]. Available: https://www.comparitech.com/internet-providers/cyberbullying-statistics/
[8] L. H. Collantes et al., “The impact of cyberbullying on mental health of the victims,” in Proc. 4th Int. Conf. Vocational Educ. Training (ICOVET), 2020, pp. 30–35.
[9] S. Unnava and S. R. Parasana, “A study of cyberbullying detection and classification techniques: A machine learning approach,” Eng. Technol. Appl. Sci. Res., vol. 14, no. 4, pp. 15607–15613, 2024.
[10] P. Yi and A. Zubiaga, “Session-based cyberbullying detection in social media: A survey,” Online Social Netw. Media, vol. 36, p. 100250, 2023.
[11] T. Ahmed et al., “Performance analysis of transformer-based architectures and their ensembles to detect trait-based cyberbullying,” Social Netw. Anal. Mining, vol. 12, no. 1, p. 99, 2022.
[12] M. I. Mahmud, M. Mamun, and A. Abdelgawad, “A deep analysis of textual features based cyberbullying detection using machine learning,” in Proc. IEEE Global Conf. Artif. Intell. Internet Things (GCAIOT), 2022, pp. 166–170.
[13] J. O. Atoum, “Cyberbullying detection through sentiment analysis,” in Proc. Int. Conf. Comput. Sci. Comput. Intell. (CSCI), 2020, pp. 292–297.
[14] A. Fernández, S. Garcia, E. Herrera, and N. V. Chawla, “SMOTE for learning from imbalanced data: Progress and challenges, marking the 15-year anniversary,” J. Artif. Intell. Res., vol. 61, pp. 863–905, 2018.
[15] F. Wu et al., “FACapsNet: A fusion capsule network with congruent attention for cyberbullying detection,” Neurocomputing, vol. 542, p. 126253, 2023.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Authors

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
