Journal of Cyber Security and Risk Auditing

Journal of Cyber Security and Risk Auditing

ISSN: 3079-5354 (Online)

Publishing model:

: Open access
Scopus Indexed
2025
14.7

CiteScore

Q1
open accessOpen Access

Article

👁️7views

Hybrid BERT-XGBoost Framework for Early Detection and Classification of Online Cyberbullying across Social Media

by 

Rima Shishakly Orcid link ;

Abdelhadi Mohammad Bayoud Orcid link ;

Mansour Obeidat Obeidat Orcid link ;

Hussein Edrees Orcid link

PDF logoPDF

Published: 2026/06/30

Abstract

Cyberbullying via social media is a constant digital safety issue because the content can be widely shared and openly visible and can have a negative impact on users before it is removed by manual moderation. Current detection models are mostly based on shallow lexical features or transformer-only classifiers, resulting in low-level accuracy and explainability. This study introduces a Hybrid BERT–XGBoost model to detect cyberbullying in short social media texts, which combines the strengths of both models. The contextual sentence embeddings are extracted using BERT and the auxiliary linguistic and behavioral features are extracted in parallel, such as sentiment polarity, profanity score, punctuation intensity, capitalization ratio, hashtag usage, mention count, emoji frequency, and post length. XGBoost is used for the classification of the fused representation. The model is tested on stratified training, validation, and testing splits, compared to a baseline model, ablated, tested with macro-F1, weighted-F1, ROC-AUC, early detection recall, and grouped explainability. The proposed framework achieved 96.18% accuracy, 96.05% macro-F1, 96.16% weighted-F1, 95.88% early detection recall, and 98.42% macro-AUC. It performs better than the BERT + Dense baseline, which obtained 94.31% accuracy and 94.08% macro-F1 score, demonstrating the advantage of fusion of contextual and auxiliary features. The framework provides an interpretable, practical and category-aware solution for early detection of cyberbullying, but further research is needed to validate the framework in multiple languages, modalities and in conversations.

Keywords

Cyberbullying detectionBERTXGBoostSocial media text classificationExplainable AI.

References

  1. Hyder, S. B., Tariq, N., Moqurrab, S. A., Ashraf, M., Yoo, J., & Srivastava, G. (2024). BERT-based deceptive review detection in social media: Introducing DeceptiveBERT. IEEE Transactions on Computational Social Systems, 11(6), 7234–7243. https://doi.org/10.1109/TCSS.2024.3403937
  2. Abdullah Alotaibi, E., & Al-Samawi, A. (2025). Cyberbullying detection and identification using machine learning-based hybrid framework. IEEE Access, 13, 215423–215437. https://doi.org/10.1109/ACCESS.2025.3634347
  3. Razi, F., & Ejaz, N. (2024). Multilingual detection of cyberbullying in mixed Urdu, Roman Urdu, and English social media conversations. IEEE Access, 12, 105201–105210. https://doi.org/10.1109/ACCESS.2024.3432908
  4. Mamodiya, U., Kishor, I., Naz, R., Almaiah, M., & Alqutaish, A. (2026). A hybrid blockchain-based framework for adaptive cyber-risk prediction and multi-layer threat mitigation in enterprise networks. Journal of Cybersecurity and Privacy, 6(3), Article 85. https://doi.org/10.3390/jcp6030085
  5. Teng, T. H., & Varathan, K. D. (2023). Cyberbullying detection in social networks: A comparison between machine learning and transfer learning approaches. IEEE Access, 11, 55533–55560. https://doi.org/10.1109/ACCESS.2023.3275130
  6. Mamodiya, U., Kishor, I., Garine, R., Ganguly, P., & Naik, N. (2025). Artificial intelligence based hybrid solar energy systems with smart materials and adaptive photovoltaics for sustainable power generation. Scientific Reports, 15(1), Article 17370. https://doi.org/10.1038/s41598-025-01788-4
  7. Abusaqer, M., Saquer, J., & Ghosh, M. (2026). BERT-OTA: Enhancing hate speech detection with ontology-guided transformer attention. IEEE Access, 14, 3345–3358. https://doi.org/10.1109/ACCESS.2026.3650874
  8. Kishor, I., & Syed, A. A. (2026). A novel federated architecture integrating ViT and BioBERT for real-time healthcare diagnosis. In Transformative role of transformer models in healthcare (Chap. 1, pp. 1–24). IGI Global. https://doi.org/10.4018/979-8-3373-2038-0.ch001
  9. Yadav, A., & Singh, V. (2025). HateFusion: Harnessing attention-based techniques for enhanced filtering and detection of implicit hate speech. IEEE Transactions on Computational Social Systems, 12(4), 1700–1715. https://doi.org/10.1109/TCSS.2024.3512573
  10. Kishor, I., Mamodiya, U., Almaayah, M., Alqutaish, A., Shehab, R., & Obeidat, M. (2025). Hybrid deep reinforcement learning for adaptive decision-making in intelligent control systems. Engineered Science, 38, Article 1680. https://doi.org/10.30919/es1680
  11. Alfurayj, H. S., Lebai Lutfi, S., & Perumal, R. (2024). A chained deep learning model for fine-grained cyberbullying detection with bystander dynamics. IEEE Access, 12, 105588–105604. https://doi.org/10.1109/ACCESS.2024.3435840
  12. Ismail, W. S., Ullah, H., Adnan, M., & Ullah, F. (2026). Multilingual multimodal cyberbullying detection through adaptive and hierarchical fusion. Array, 29, Article 100689. https://doi.org/10.1016/j.array.2026.100689
  13. Ejaz, N., Razi, F., & Choudhury, S. (2024). Towards comprehensive cyberbullying detection: A dataset incorporating aggressive texts, repetition, peerness, and intent to harm. Computers in Human Behavior, 153, Article 108123. https://doi.org/10.1016/j.chb.2023.108123
  14. Mamodiya, U., Redkar, S., Sharma, R., Kishor, I., & Goyal, P. (2025). A hybrid machine learning framework for predictive maintenance in renewable energy systems to enhance efficiency and longevity. In Proceedings of the 2025 International Conference on Sustainability, Innovation & Technology (ICSIT) (pp. 1–6). IEEE. https://doi.org/10.1109/ICSIT65336.2025.11295132
  15. Yadavalli, U. S., & Sahoo, S. R. (2026). A multi-granular hybrid neural architecture for detecting abusive content in online social networks (OSNs) with contextual awareness. Journal of Big Data, 13(1), Article 5. https://doi.org/10.1186/s40537-025-01343-y
  16. Philipo, A., Ding, J., Sarwatt, D., Mohamed, J., Yusufu, A., Daneshmand, M., & Ning, H. (2026). Sentiment-enhanced cyberbullying detection models on social media platforms. ACM Transactions on the Web, 20(1), 1–26. https://doi.org/10.1145/3766075
  17. Mathur, V., Saini, Y., Giri, V., Choudhary, V., Bharadwaj, U., & Kumar, V. (2021). Weather station using Raspberry Pi. In Proceedings of the 2021 Sixth International Conference on Image Information Processing (ICIIP) (pp. 279–283). IEEE.
  18. Ashiq, W., Kanwal, S., Rafique, A., Waqas, M., Khurshaid, T., Montero, E. C., ... & Ashraf, I. (2024). Roman urdu hate speech detection using hybrid machine learning models and hyperparameter optimization. Scientific Reports, 14(1), 28590. https://doi.org/10.1038/s41598-024-79106-7
  19. Mahajan, E., Mahajan, H., & Kumar, S. (2024). EnsMulHateCyb: Multilingual hate speech and cyberbully detection in online social media. Expert Systems with Applications, 236, Article 121228. https://doi.org/10.1016/j.eswa.2023.121228
  20. Mamodiya, U., Kishor, I., Guler, N., Hindi, J., & Naik, N. (2025). Implementation of reinforcement learning environment for hybrid renewable energy systems. In Proceedings of the 2025 International Conference on Computational Intelligence, Security, and Artificial Intelligence (IntelliSecAI) (pp. 1–6). IEEE. https://doi.org/10.1109/IntelliSecAI66368.2025.11472894
  21. Putra, D., & Wang, H.-C. (2024). Semi-meta-supervised hate speech detection. Knowledge-Based Systems, 287, Article 111386. https://doi.org/10.1016/j.knosys.2024.111386
  22. Talaat, S. (2023). Sentiment analysis classification system using hybrid BERT models. Journal of Big Data, 10, Article 110. https://doi.org/10.1186/s40537-023-00781-w
  23. Kishor, I., Mamodiya, U., Sharma, M., Kumar, G., & Goyal, P. (2025). Integrating blockchain with IoT for secure and transparent supply chain management in sustainable manufacturing. In Proceedings of the 2025 International Conference on Sustainability, Innovation & Technology (ICSIT) (pp. 1–6). IEEE. https://doi.org/10.1109/ICSIT65336.2025.11294611
  24. Kibriya, H., Siddiqa, A., Khan, W. Z., & Khan, M. K. (2024). Towards safer online communities: Deep learning and explainable AI for hate speech detection and classification. Computers & Electrical Engineering, 116, Article 109153. https://doi.org/10.1016/j.compeleceng.2024.109153
  25. Lerotholi, A., & Obagbuwa, I. C. (2025). Sentiment analysis to detect cyberbullying on Twitter. Human Behavior and Emerging Technologies, 2025, Article 5419912. https://doi.org/10.1155/hbe2/5419912
  26. Ahuja, V., Kishor, I., Alqutaish, A., Shehab, R., & Obeidat, M. (2026). Mitigating information leakage risks in secure multiparty computation through function hiding. Journal of Cyber Security and Risk Auditing, 2026(1), 38–72. https://doi.org/10.63180/jcsra.thestap.2026.1.3
  27. Miao, Z., Chen, X., Wang, H., Tang, R., Yang, Z., Huang, T., & Tang, W. (2023). Detecting offensive language based on graph attention networks and fusion features. IEEE Transactions on Computational Social Systems, 11(1), 1493-1505. https://doi.org/10.1109/TCSS.2023.3250502
  28. Ramos, G., Batista, F., Ribeiro, R., Fialho, P., Moro, S., Fonseca, A., ... & Silva, C. (2024). A comprehensive review on automatic hate speech detection in the age of the transformer. Social Network Analysis and Mining, 14(1), 204. https://doi.org/10.1007/s13278-024-01361-3
  29. Ortiz Salazar, A. (2025). Detecting hate crimes through machine learning and natural language processing. Police Practice and Research, 26(6), 746–768. https://doi.org/10.1080/15614263.2024.2397363
  30. Mishra, L., Sinha, S., & George, C. P. (2024). Shielding against online harm: A survey on text analysis to prevent cyberbullying. Engineering Applications of Artificial Intelligence, 133, Article 108241. https://doi.org/10.1016/j.engappai.2024.108241
  31. Umansky, N., Kubli, M., Kotarcic, A., Bronner, L., Kurer, S., Grech, P., ... & Donnay, K. (2026). Improving hate speech detection with large language models. European Journal of Political Research, 1, 12. https://doi.org/10.1017/S1475676525100546
  32. Zou, L., He, Z., Zhou, C., & Zhu, W. (2024). Multi-class multi-label classification of social media texts for typhoon damage assessment: A two-stage model fully integrating the outputs of the hidden layers of BERT. International Journal of Digital Earth, 17(1). https://doi.org/10.1080/17538947.2024.2348668
  33. Maity, K., Jain, R., Jha, P., & Saha, S. (2024). Explainable cyberbullying detection in Hinglish: A generative approach. IEEE Transactions on Computational Social Systems, 11(3), 3338–3347. https://doi.org/10.1109/TCSS.2023.3333675
  34. Hussain, I., Rizvi, M. R., Abbas, Z., Cheema, A. N., & Almanjahie, I. M. (2025). MUST: An explainable AI-based framework for multilingual hate speech detection. IEEE Access, 13, 202758–202778. https://doi.org/10.1109/ACCESS.2025.3629527
  35. Niu, Y., Chen, S., Kökciyan, N., & Qiu, W. (2025). Analyzing social media comments to understand and detect privacy violations. IEEE Transactions on Computational Social Systems, 12(5), 2661–2674. https://doi.org/10.1109/TCSS.2024.3521936
  36. Ghosh, S., Priyankar, A., Ekbal, A., & Bhattacharyya, P. (2023). A transformer-based multi-task framework for joint detection of aggression and hate on social media data. Natural Language Engineering, 29(6), 1495–1515. https://doi.org/10.1017/S1351324923000104
  37. Yu, K., Zhu, X., Guo, Z., Tolba, A., Rodrigues, J. J. P. C., & Leung, V. C. M. (2024). A cross-field deep learning-based fuzzy spamming detection approach via collaboration of behavior modeling and sentiment analysis. IEEE Transactions on Fuzzy Systems, 32(12), 7168–7182. https://doi.org/10.1109/TFUZZ.2024.3425510
  38. Sánchez-Corcuera, R., Zubiaga, A., & Almeida, A. (2024). Early detection and prevention of malicious user behavior on Twitter using deep learning techniques. IEEE Transactions on Computational Social Systems, 11(5), 6649–6661. https://doi.org/10.1109/TCSS.2024.3419171
  39. Vujičić Stanković, S., & Mladenović, M. (2023). An approach to automatic classification of hate speech in sports domain on social media. Journal of Big Data, 10, Article 109. https://doi.org/10.1186/s40537-023-00766-9
  40. Hashmi, E., Yayilgan, S. Y., Yamin, M. M., & Ullah, M. (2025). Enhancing misogyny detection in bilingual texts using explainable ai and multilingual fine-tuned transformers. Complex & Intelligent Systems, 11(1), 39. https://doi.org/10.1007/s40747-024-01655-1
  41. Saleous, H., Gergely, M., & Shuaib, K. (2025). Exploring NLP-based solutions to social media moderation challenges. Human Behavior and Emerging Technologies, 2025, Article 9436490. https://doi.org/10.1155/hbe2/9436490
  42. Al-Hashedi, M., Soon, L.-K., Goh, H.-N., Lim, A. H. L., & Siew, E.-G. (2023). Cyberbullying detection based on emotion. IEEE Access, 11, 53907–53918. https://doi.org/10.1109/ACCESS.2023.3280556
  43. Alfurayj, H. S., Farid, D. M., Luna-Jiménez, C., & Lebai Lutfi, S. (2026). CYBY24 and step-wise model for thread-based fine-grained cyberbullying detection. IEEE Access, 14, 10351–10370. https://doi.org/10.1109/ACCESS.2026.3652469
  44. Kapil, P., Kumari, G., Ekbal, A., Pal, S., Chatterjee, A., & Vinutha, B. N. (2023). HHSD: Hindi hate speech detection leveraging multi-task learning. IEEE Access, 11, 101460–101473. https://doi.org/10.1109/ACCESS.2023.3312993
  45. Sweidan, S., Farouk, N. A., Abouhawwash, M., Askar, S. S., & Taha, M.(2026). DeBERTa-based framework for detecting machine-generated content on social media: A comparative study. Journal of Big Data, 13, 10. https://doi.org/10.1186/s40537-025-01349-6
SCImago Journal & Country Rank