Open Access
ARTICLE
Enhancing Cyberbullying Detection in Social Media through Attention-Based Deep Neural Networks
Mohammad J. M. Zedan1,2, Edwin Rangga Ardhana1, Siti Raihanah Abdani3, Mohd Asyraf Zulkifley1,*
1 Department of Electrical, Electronic and Systems Engineering, Faculty of Engineering and Built Environment, Universiti Kebangsaan Malaysia, Bangi, Malaysia
2 Computer and Information Engineering Department, College of Electronics Engineering, Ninevah University, Mosul, Iraq
3 School of Computing Sciences, College of Computing, Informatics and Mathematics, Universiti Teknologi MARA, Shah Alam, Malaysia
* Corresponding Author: Mohd Asyraf Zulkifley. Email:
Computers, Materials & Continua https://doi.org/10.32604/cmc.2026.087996
Received 26 June 2026; Accepted 04 September 2026; Published online 18 September 2026
Abstract
The widespread usage of social media has contributed to the global concern of a rapid rise in cyberbullying. Generally, cyberbullying can be defined as intentional and harmful behavior conducted through online communication channels that can cause severe psychological distress, depression, and emotional trauma among victims. Detecting cyberbullying content automatically remains a challenging task because abusive messages are frequently expressed in subtle and ambiguous forms. Consequently, there is an increasing need for intelligent detection systems that are capable of identifying cyberbullying incidents accurately and efficiently. Recent advances in deep learning have demonstrated considerable potential for cyberbullying detection. However, many conventional deep learning models process textual information uniformly, without emphasizing any critical word or phrase that can be a strong indicator of abusive intent. As a result, important features may have been overlooked, which leads to suboptimal detection performance. To address these limitations, this study proposes an enhanced cyberbullying detection framework based on a lightweight attention-enhanced convolutional neural network architecture. This proposed framework employs a compact, one-dimensional neural network architecture to efficiently extract embedded linguistic patterns from short tweets, which are typically extracted using highly complex recurrent networks or transformers. The proposed model was systematically optimized through extensive hyperparameter tuning to identify the most effective configuration of lightweight network layers. In addition, an advanced attention mechanism is integrated to enable the model to focus selectively on bullying-related expressions and contextual cues. This resulted in an improved design capable of detecting most categories of cyberbullying while maintaining low computational complexity and low inference time, which makes it suitable for practical deployment in resource-constrained environments. The proposed model was trained and evaluated using a publicly available cyberbullying dataset containing tweets categorized into five bullying target classes: religion, ethnicity, gender, age, and other cyberbullying, together with an additional non-cyberbullying class. Experimental results demonstrate that the proposed model achieves an accuracy of 83.11% and an F1-score of 82.17%. Furthermore, it also reduces model parameters and floating-point operations by 30.8% and 71.7%, respectively, while maintaining a low inference latency of only 2.5349 ms per sample.
Keywords
Cyberbully identification; text processing; deep learning; social media; attention-based network