Abstract
Cyberbullying takes different forms depending on whom it targets, and moderation is more useful when a system can name the target rather than only flag abuse. This study presents a Tuna Swarm Optimized Hierarchical Attention Network (TSO-HAN) for six-class cyberbullying classification on the public tweet benchmark of Wang et al. (47,692 English tweets labelled age, ethnicity, gender, religion, other cyberbullying or not cyberbullying). Texts with conflicting labels (3,284 rows) and repeated copies were removed before splitting, leaving 44,349 tweets. Skip-gram FastText sub word embeddings were trained on the training portion only, and the network encodes each tweet as words within sentences using bidirectional gated recurrent units with attention at both levels. Tuna Swarm Optimization searched seven network settings using validation macro-F1, so the 25% test split (11,088 tweets) was used once. TSO-HAN reached an accuracy of 86.44%, a macro F1-score of 85.48% and a macro AUC of 0.979. Over three seeds its macro F1-score was 85.34 ± 0.14%, against 85.39 ± 0.26% for a conventional HAN, 85.84 ± 0.15% for a BiGRU, 85.58 ± 0.02% for a BiLSTM and 88.54% for word and character TF-IDF with logistic regression, so the swarm search did not improve on the default settings. A late fusion of TSO-HAN with the TF-IDF model, weighted on validation data, reached 89.60 ± 0.09% accuracy and 88.72 ± 0.09% macro F1-score. The evaluation covers one English Twitter benchmark, and other platforms and languages remain to be tested.
Keywords
Cyberbullying Detection, Social Media, Fasttext Embeddings, Hierarchical Attention Network, Tuna Swarm Optimization, TSO-HAN,Downloads
References
- M.S. Islam, A.N. Orno, M. Arifuzzaman, Approach to Social Media Cyberbullying and Harassment Detection Using Advanced Machine Learning. SSRN Electronic Journal, (2024) 4705261. https://doi.org/10.2139/ssrn.4705261
- C. Raj, A. Agarwal, G. Bharathy, B. Narayan, M. Prasad, Cyber bullying Detection: Hybrid Models Based on Machine Learning and Natural Language Processing Techniques. Electronics, 10(22), (2021) 2810. https://doi.org/10.3390/electronics10222810
- T.H.H. Aldhyani, M.H. Al-Adhaileh, S.N. Alsubari, Cyberbullying Identification System Based Deep Learning Algorithms. Electronics, 11(20), (2022) 3273. https://doi.org/10.3390/electronics11203273
- A. Dewani, M.A. Memon, S. Bhatti, Cyberbullying Detection: Advanced Preprocessing Techniques & Deep Learning Architecture for Roman Urdu Data. Journal of Big Data, 8(1), (2021) 160. https://doi.org/10.1186/s40537-021-00550-7
- S. Nawaz, L. Nawaz, H. Ali, M. Yaqoob, M.M. Saeed, Artificial intelligence in mental health: A narrative review of applications, benefits, and ethical challenges. Digital Medicine, 12(3), (2026) e26-00028. https://doi.org/10.1097/dm-2026-00028
- R. Wang, T. Lu, P. Zhang, N. Gu, Role Identification Based Method for Cyberbullying Analysis in Social Edge Computing. Tsinghua Science and Technology, 30(4), (2025) 1659-1684. https://doi.org/10.26599/TST.2024.9010066
- N. Yuvaraj, V. Chang, B. Gobinathan, A. Pinagapani, S. Kannan, G. Dhiman, A.R. Rajan, Automatic Detection of Cyberbullying Using Multi-Feature Based Artificial Intelligence with Deep Decision Tree Classification. Computers and Electrical Engineering, 92, (2021) 107186. https://doi.org/10.1016/j.compeleceng.2021.107186
- I.A. Abbasi, M. Shoaib, M. Alshehri, M. Aldawsari, Utilizing CBNet to Effectively Address and Combat Cyberbullying among University Students on Social Media Platforms. Scientific Reports, 15(1), (2025) 25582. https://doi.org/10.1038/s41598-025-09091-y
- W. Zhang, S. Huang, L. Lam, R. Evans, C. Zhu, Cyberbullying Definitions and Measurements in Children and Adolescents: Summarizing 20 Years of Global Efforts. Frontiers in Public Health, 10, (2022) 1000504. https://doi.org/10.3389/fpubh.2022.1000504
- S. Neelakandan, M. Sridevi, S. Chandrasekaran, K. Murugeswari, A.K. Singh Pundir, R. Sridevi, T. Bheema Lingaiah, Deep Learning Approaches for Cyberbullying Detection and Classification on Social Media. Computational Intelligence and Neuroscience, 2022, (2022) 2163458. https://doi.org/10.1155/2022/2163458
- A.M. Eissa, S.K. Guirguis, M.M. Madbouly, An Optimized Arabic Cyberbullying Detection Approach Based on Genetic Algorithms. Scientific Reports, 15(1), (2025) 38479. https://doi.org/10.1038/s41598-025-23586-8
- M.H. Obaid, S.K. Guirguis, S.M. Elkaffas, Cyberbullying Detection and Severity Determination Model. IEEE Access, IEEE, 11, (2023) 97391-97399. https://doi.org/10.1109/ACCESS.2023.3313113
- G. Orrù, A. Galli, V. Gattulli, M. Gravina, M. Micheletto, S. Marrone, W. Nocerino, A. Procaccino, G. Terrone, D. Curtotti, D. Impedovo, G.L. Marcialis, C. Sansone, Development of Technologies for the Detection of (Cyber)Bullying Actions: the Bullybuster Project. Information, 14(8), (2023) 430. https://doi.org/10.3390/info14080430
- R. Kumar, A. Bhat, A Study of Machine Learning-Based Models for Detection, Control, and Mitigation of Cyberbullying in Online Social Media. International Journal of Information Security, 21(6), (2022) 1409-1431. https://doi.org/10.1007/s10207-022-00600-y
- S. Chokphoemphun, T. Poommhee, A. Ketrueng, N. Pongphaw, A fair comparison and association rule analysis in machine learning to predict heart disease. Digital Medicine, 12(2), (2026) e26-00005. https://doi.org/10.1097/dm-2026-00005
- A.M. Alabdali, A. Mashat, A Novel Approach Toward Cyberbullying with Intelligent Recommendations using Deep Learning Based Blockchain Solution. Frontiers in Medicine, 11, (2024) 1379211. https://doi.org/10.3389/fmed.2024.1379211
- M. Alotaibi, B. Alotaibi, A. Razaque, A Multichannel Deep Learning Framework for Cyberbullying Detection on Social Media. Electronics, 10(21), (2021) 2664. https://doi.org/10.3390/electronics10212664
- M.T. Ahmed, A.S. Urmi, M. Rahman, A.Z.M.T. Islam, D. Das, M.G. Rashed, Cyberbullying Detection Based On Hybrid Ensemble Method using Deep Learning Technique in Bangla Dataset. International Journal of Advanced Computer Science and Applications, 14(9), (2023). https://doi.org/10.14569/IJACSA.2023.0140958
- N. Islam, R. Haque, P.K. Pareek, M.B. Islam, I.H. Sajeeb, M.H. Ratul, (2023). Deep Learning for Multi-Labeled Cyberbully Detection: Enhancing Online Safety. In 2023 International Conference on Data Science and Network Security (ICDSNS), IEEE, Tiptur, India. https://doi.org/10.1109/ICDSNS58469.2023.10245135
- A. Kumar, Contextual Semantics using Hierarchical Attention Network for Sentiment Classification in Social Internet-of-Things. Multimedia Tools and Applications, 81(26), (2022) 36967-36982. https://doi.org/10.1007/s11042-021-11262-8
- L.I. Barbosa-Santillán, B.P. Guzman-Velazquez, M.T. Orozco-Aguilera, L. Flores-Pulido, Unraveling Cyberbullying Dynamis: A Computational Framework Empowered by Artificial Intelligence. Information, 16(2), (2025) 80. https://doi.org/10.3390/info16020080
- A. Djenna, E. Barka, A. Benchikh, K. Khadir, Unmasking cybercrime with artificial-intelligence-driven cybersecurity analytics. Sensors, 23(14), (2023) 6302. https://doi.org/10.3390/s23146302
- A. Ostayeva, Z. Kozhamkulova, Z. Kozhamkulova, Y. Aimakhanov, D. Abylkhassenova, A. Serik, K. Turganbay, Y. Tenizbayev, Utilizing Machine Learning and Deep Learning Approaches for the Detection of Cyberbullying Issues. International Journal of Advanced Computer Science and Applications, 15(6), (2024). https://doi.org/10.14569/IJACSA.2024.01506117
- W.N. Ismail, A Novel Metaheuristic-Based Methodology for Attack Detection in Wireless Communication Networks. Mathematics, 13(11), (2025) 1736. https://doi.org/10.3390/math13111736
- M. Ahmad Al-Khasawneh, M. Faheem, A. Abdulsalam Alarood, S. Habibullah, E. Alsolami, Toward Multi-Modal Approach for Identification and Detection of Cyberbullying in Social Networks. IEEE Access, IEEE, 12, (2024) 90158-90170. https://doi.org/10.1109/ACCESS.2024.3420131
- A. Akhter, U.K. Acharjee, M.A. Talukder, M.M. Islam, M.A. Uddin, A Robust Hybrid Machine Learning Model for Bengali Cyber Bullying Detection in Social Media. Natural Language Processing Journal, 4, (2023) 100027. https://doi.org/10.1016/j.nlp.2023.100027
- S. Salsabila, R. Sarno, I. Ghozali, K.R. Sungkono, Improving Cyberbullying Detection Through Multi-Level Machine Learning. International Journal of Electrical and Computer Engineering, 14(2), (2024) 1779-1787. https://doi.org/10.11591/ijece.v14i2.pp1779-1787
- M.A.S. Nasution, E.B. Setiawan, Enhancing Cyberbullying Detection on Indonesian Twitter: Leveraging Fasttext for Feature Expansion and Hybrid Approach Applying CNN and BiLSTM. Revue d'Intelligence Artificielle, 37(4), (2023) 929-936. https://doi.org/10.18280/ria.370413
- V. Shah, A. Sinha, N. Navalkar, S. Gupta, P. Gonsalves, A. Malik, ML and Natural Language Processing: Cyberbullying Detection System for Safer and Culturally Adaptive Digital Communities. Journal of Smart Internet of Things, 2023(2), (2023) 193-205. https://doi.org/10.2478/jsiot-2023-0020
- A. Almomani, K. Nahar, M. Alauthman, M.A. Al-Betar, Q. Yaseen, B.B. Gupta, Image Cyberbullying Detection and Recognition Using Transfer Deep Machine Learning. International Journal of Cognitive Computing in Engineering, 5, (2024) 14-26. https://doi.org/10.1016/j.ijcce.2023.11.002
- J. Wang, K. Fu, C.-T. Lu, (2020). SOSNet: A Graph Convolutional Network Approach to Fine-Grained Cyberbullying Detection. In 2020 IEEE International Conference on Big Data (Big Data), IEEE, Atlanta, GA, USA. https://doi.org/10.1109/BigData50022.2020.9378065
- T. Mikolov, K. Chen, G. Corrado, J. Dean, Efficient Estimation of Word Representations in Vector Space. Arxiv, (2013) 1301.3781. https://doi.org/10.48550/arXiv.1301.3781
- P. Bojanowski, E. Grave, A. Joulin, T. Mikolov, Enriching Word Vectors with Subword Information. Transactions of the Association for Computational Linguistics, 5, (2017) 135-146. https://doi.org/10.1162/tacl_a_00051
- Z. Yang, D. Yang, C. Dyer, X. He, A. Smola, E. Hovy, Hierarchical Attention Networks for Document Classification. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Association for Computational Linguistics, (2016) 1480-1489. https://doi.org/10.18653/v1/N16-1174
- K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, Y. Bengio, (2014). Learning Phrase Representations Using RNN Encoder-Decoder for Statistical Machine Translation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Association for Computational Linguistics, https://doi.org/10.3115/v1/D14-1179
- D.P. Kingma, J. Ba, Adam: A Method for Stochastic Optimization. Arxiv, (2014) 1412.6980. https://doi.org/10.48550/arXiv.1412.6980
- L. Xie, T. Han, H. Zhou, Z.-R. Zhang, B. Han, A. Tang, Tuna Swarm Optimization: A Novel Swarm-Based Metaheuristic Algorithm for Global Optimization. Computational Intelligence and Neuroscience, 2021, (2021) 9210050. https://doi.org/10.1155/2021/9210050
- S. Balakrishna, Y. Gopi, V.K. Solanki, Comparative Analysis on Deep Neural Network Models for Detection of Cyberbullying on social media. Ingeniería Solidaria, 18(1), (2022) 1-33. https://doi.org/10.16925/2357-6014.2022.01.05
- S. Sathea Sree, L. Nalini Joseph, Revolutionizing Cyber-Bullying Detection with the BullyNet Deep Learning Framework. International Research Journal of Multidisciplinary Technovation, 7(2), (2025) 38-49. https://doi.org/10.54392/irjmt2524
- R.K. Kanna, P.A. Surendhar, J. Rubi, G. Jyothi, A. Ambikapathy, R. Vasuki, (2022). Human Computer Interface Application for Emotion Detection Using Facial Recognition. In 2022 IEEE International Conference on Current Development in Engineering and Technology (CCET), IEEE, Bhopal, India. https://doi.org/10.1109/CCET56606.2022.10080678
Articles

