Enhanced Dense Classification Head for BERT-Based Cyberbullying Detection
Corresponding author: N. R. Pallavi
Abstract
Detecting cyberbullying is a significant task in social media moderation, since context-sensitive language comprehension aids in differentiating harassment and objectionable content. This study presents an improved BERT-based text classification architecture that expands a fine-tuned BERT encoder with a deeper dense classification head to increase feature transformation and discrimination. Experiments were carried out on the HateXplain dataset with 20,109 annotated posts from Twitter and Reddit. A comparative evaluation was performed between a baseline BERT classifier with a linear classification head and the proposed two-layer dense head model. The proposed model obtained an F1-score of 0.91 and an accuracy of 0.93, outperforming the baseline BERT classifier, confirming that the additional dense transformation is key for measurable gains in performance. These results demonstrate that deeper dense classification heads can improve contextual feature discrimination in transformer-based cyberbullying detection without sacrificing architectural simplicity and reproducibility.
Keywords:
cyberbullying detection, Natural Language Processing (NLP), deep learning, BERT, text classification, social media analysis, transformer models, offensive language identificationDownloads
References
R. M. Kowalski, G. W. Giumetti, A. N. Schroeder, and H. H. Reese, "Cyber Bullying Among College Students: Evidence from Multiple Domains of College Life," in Cutting-Edge Technologies in Higher Education, L. A. Wankel and C. Wankel, Eds. Emerald Group Publishing Limited, 2012, pp. 293–321.
A. G. Philipo, D. S. Sarwatt, J. Ding, M. Daneshmand, and H. Ning, "Cyberbullying Detection: Exploring Datasets, Technologies, and Approaches on Social Media Platforms," ACM Computing Surveys, vol. 58, no. 7, Feb. 2026, Art. no. 186.
A. Perera and P. Fernando, "Cyberbullying Detection System on Social Media Using Supervised Machine Learning," Procedia Computer Science, vol. 239, pp. 506–516, Jan. 2024.
P. Vivekananth, and N. Sharma, "Detecting Cyberbullying in Social Media: An NLP-Based Classification Framework," Indian Journal Of Science And Technology, vol. 18, no. 5, pp. 380–389, Feb. 2025.
M. Mozafari, R. Farahbakhsh, and N. Crespi, "Hate speech detection and racial bias mitigation in social media based on BERT model," PLOS ONE, vol. 15, no. 8, Aug. 2020, Art. no. e0237861.
S. Agrawal and A. Awekar, "Deep Learning for Detecting Cyberbullying Across Multiple Social Media Platforms," in Advances in Information Retrieval, 2018, pp. 141–153.
J. S. M. Nikitha. A. Shenoyy, K. Chaturya, J. Latha, "Detection of Cyberbullying Using NLP and Machine Learning in Social Networks for Bi-Language," International Journal of Innovative Research in Science Engineering and Technology, vol. 14, no. 4, pp. 9451–9454, 2025.
P. Aggarwal and R. Mahajan, "Shielding Social Media: BERT and SVM Unite for Cyberbullying Detection and Classification," Journal of Information Systems and Informatics, vol. 6, no. 2, pp. 607–623, June 2024.
C. Lohith, H. Chandramouli, U. Balasingam, and S. Arun Kumar, "Aspect Oriented Sentiment Analysis on Customer Reviews on Restaurant Using the LDA and BERT Method," SN Computer Science, vol. 4, no. 4, May 2023, Art. no. 399.
A. Muneer, A. Alwadain, M. G. Ragab, and A. Alqushaibi, "Cyberbullying Detection on Social Media Using Stacking Ensemble Learning and Enhanced BERT," Information, vol. 14, no. 8, Aug. 2023.
A. Aliyeva et al., "Toward Safer Digital Communication: A Deep Hybrid Model for Detecting Abusive Language on Social Networks," Engineering, Technology & Applied Science Research, vol. 15, no. 5, pp. 27126–27132, Oct. 2025.
I. A. Abbasi, M. Shoaib, M. Alshehri, and M. Aldawsari, "Utilizing CBNet to effectively address and combat cyberbullying among university students on social media platforms," Scientific Reports, vol. 15, no. 1, July 2025, Art. no. 25582.
M. H. Obaida, S. M. Elkaffas, and S. K. Guirguis, "Deep Learning Algorithms for Cyber-Bulling Detection in Social Media Platforms," IEEE Access, vol. 12, pp. 76901–76908, 2024.
I. Tabassum and V. Nunavath, "A Hybrid Deep Learning Approach for Multi-Class Cyberbullying Classification Using Multi-Modal Social Media Data," Applied Sciences, vol. 14, no. 24, Dec. 2024, Art. no. 12007.
M. Mubeen, A. Muskan, A. Akram, J. Rashid, T. A. N. Alshalali, and N. Sarwar, "Cyberbullying-Related Automated Hate Speech Detection on Social Media Platforms Using Stack Ensemble Classification Method," International Journal of Computational Intelligence Systems, vol. 18, no. 1, July 2025, Art. no. 174.
"CyberBullying Detection Dataset." Kaggle, [Online]. Available: https://www.kaggle.com/datasets/sayankr007/cyber-bullying-data-for-multi-label-classification?select=final_hateXplain.csv.
Downloads
How to Cite
License
Copyright (c) 2026 N. R. Pallavi, M. R. Sunitha

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.
