A Hybrid Deep Learning Model with Gated Representation for the Detection of Offensive Text in Noisy Social Media Environments
Received: 12 August 2025 | Revised: 17 September 2025 | Accepted: 23 September 2025 | Online: 13 December 2025
Corresponding author: Praneetha Garagadakuppe Nanjundappa
Abstract
The increasing prevalence of offensive and abusive language on social networks represents a strong threat to online safety and user welfare. Existing methods, frequently constrained by the argumentative and heterogeneous characteristics of social media text, are unable to effectively deal with informalities and contextual dependencies. To address these challenges, this study proposes a novel hybrid deep learning framework that combines BERT-based contextual encoding with a novel Subword Pattern Recognizer (SPR) for extracting character-level morphological features. This study uses a gated Multi-Layer Perceptron (MLP) fusion mechanism to retain the contribution from both character-level and semantic features, enabling robust detection of objectionable content even in ambiguous or manipulated inputs. The experimental results demonstrated the effectiveness of the proposed model by achieving 91% and 98 % accuracy on the OLID and Davidson datasets. Furthermore, a comprehensive ablation study validates the complementary strengths of the dual-branch architecture and fusion mechanism to mitigate weaknesses in noisy, informal, and ambiguous offensive language.
Keywords:
offensive language, hybrid deep learning, BERT, character-level features, gated MLP fusionDownloads
References
G. Bouvier, "What is a discourse approach to Twitter, Facebook, YouTube and other social media: connecting with other academic fields?," Journal of Multicultural Discourses, vol. 10, no. 2, pp. 149–162, May 2015. DOI: https://doi.org/10.1080/17447143.2015.1042381
S. S. Mane, S. Kundu, and R. Sharma, "A Survey on Online Aggression: Content Detection and Behavioral Analysis on Social Media," ACM Computing Surveys, vol. 57, no. 7, Oct. 2025, Art. no. 171. DOI: https://doi.org/10.1145/3711125
S. V. Kogilavani, S. Malliga, K. R. Jaiabinaya, M. Malini, and M. Manisha Kokila, "Characterization and mechanical properties of offensive language taxonomy and detection techniques," Materials Today: Proceedings, vol. 81, pp. 630–633, Jan. 2023. DOI: https://doi.org/10.1016/j.matpr.2021.04.102
C. J. Ferguson, "Does the Internet Make the World Worse? Depression, Aggression and Polarization in the Social Media Age," Bulletin of Science, Technology & Society, vol. 41, no. 4, pp. 116–135, Dec. 2021. DOI: https://doi.org/10.1177/02704676211064567
O. M. Alyasiri and Y. N. Cheah, "Multi-Class Text Classification using Machine Learning Techniques," Engineering, Technology & Applied Science Research, vol. 15, no. 3, pp. 22598–22604, Jun. 2025. DOI: https://doi.org/10.48084/etasr.9994
H. Mehta and K. Passi, "Social Media Hate Speech Detection Using Explainable Artificial Intelligence (XAI)," Algorithms, vol. 15, no. 8, Aug. 2022, Art. no. 291. DOI: https://doi.org/10.3390/a15080291
A. Yadav, F. A. Khan, and V. Singh, "A Multi-Architecture Approach for Offensive Language Identification Combining Classical Natural Language Processing and BERT-Variant Models," Applied Sciences, vol. 14, no. 23, Jan. 2024, Art. no. 11206. DOI: https://doi.org/10.3390/app142311206
A. T. Azar, H. M. Noori, A. R. Mahlous, A. Al-Khayyat, and I. K. Ibraheem, "Quasi-Reflection Learning Arithmetic Firefly Search Optimization with Deep Learning-based Cyberbullying Detection on Social Networking," Engineering, Technology & Applied Science Research, vol. 14, no. 5, pp. 17162–17169, Oct. 2024. DOI: https://doi.org/10.48084/etasr.8314
Z. Boulouard, M. Ouaissa, M. Ouaissa, M. Krichen, M. Almutiq, and K. Gasmi, "Detecting Hateful and Offensive Speech in Arabic Social Media Using Transfer Learning," Applied Sciences, vol. 12, no. 24, Jan. 2022, Art. no. 12823. DOI: https://doi.org/10.3390/app122412823
M. Madhavi et al., "Elevating Offensive Language Detection: CNN-GRU and BERT for Enhanced Hate Speech Identification," International Journal of Advanced Computer Science and Applications, vol. 15, no. 5, 2024. DOI: https://doi.org/10.14569/IJACSA.2024.01505118
W. Aldjanabi, A. Dahou, M. A. A. Al-qaness, M. A. Elaziz, A. M. Helmi, and R. Damaševičius, "Arabic Offensive and Hate Speech Detection Using a Cross-Corpora Multi-Task Learning Model," Informatics, vol. 8, no. 4, Dec. 2021, Art. no. 69. DOI: https://doi.org/10.3390/informatics8040069
A. Alhazmi, R. Mahmud, N. Idris, M. E. M. Abo, and C. I. Eke, "Code-mixing unveiled: Enhancing the hate speech detection in Arabic dialect tweets using machine learning models," PLOS ONE, vol. 19, no. 7, 2024, Art. no. e0305657. DOI: https://doi.org/10.1371/journal.pone.0305657
M. Xu and S. Liu, "RB_BG_MHA: A RoBERTa-Based Model with Bi-GRU and Multi-Head Attention for Chinese Offensive Language Detection in Social Media," Applied Sciences, vol. 13, no. 19, Jan. 2023, Art. no. 11000. DOI: https://doi.org/10.3390/app131911000
A. Velankar, H. Patil, A. Gore, S. Salunke, and R. Joshi, "Hate and Offensive Speech Detection in Hindi and Marathi." arXiv, Nov. 01, 2021.
B. T. Pham-Hong and S. Chokshi, "PGSG at SemEval-2020 Task 12: BERT-LSTM with Tweets’ Pretrained Model and Noisy Student Training Method," in Proceedings of the Fourteenth Workshop on Semantic Evaluation, Barcelona (online), Sep. 2020, pp. 2111–2116. DOI: https://doi.org/10.18653/v1/2020.semeval-1.280
H. Nghiem and H. D. III, "HateCOT: An Explanation-Enhanced Dataset for Generalizable Offensive Speech Detection via Large Language Models." arXiv, Oct. 05, 2024. DOI: https://doi.org/10.18653/v1/2024.findings-emnlp.343
K. Mnassri, P. Rajapaksha, R. Farahbakhsh, and N. Crespi, "Hate Speech and Offensive Language Detection Using an Emotion-Aware Shared Encoder," in ICC 2023 - IEEE International Conference on Communications, Rome, Italy, May 2023, pp. 2852–2857. DOI: https://doi.org/10.1109/ICC45041.2023.10279690
A. Joshi and R. Joshi, "Harnessing Pre-Trained Sentence Transformers for Offensive Language Detection in Indian Languages." arXiv, Oct. 03, 2023.
T. Davidson, D. Warmsley, M. Macy, and I. Weber, "Automated Hate Speech Detection and the Problem of Offensive Language," Proceedings of the International AAAI Conference on Web and Social Media, vol. 11, no. 1, pp. 512–515, May 2017. DOI: https://doi.org/10.1609/icwsm.v11i1.14955
S. Rosenthal, P. Atanasova, G. Karadzhov, M. Zampieri, and P. Nakov, "SOLID: A Large-Scale Semi-Supervised Dataset for Offensive Language Identification." arXiv, Sep. 24, 2021. DOI: https://doi.org/10.18653/v1/2021.findings-acl.80
T. Y. Zhuo, Q. Xu, X. He, and T. Cohn, "Rethinking Round-Trip Translation for Machine Translation Evaluation." arXiv, May 15, 2023. DOI: https://doi.org/10.18653/v1/2023.findings-acl.22
E. C. Garrido-Merchan, R. Gozalo-Brizuela, and S. Gonzalez-Carvajal, "Comparing BERT Against Traditional Machine Learning Models in Text Classification," Journal of Computational and Cognitive Engineering, vol. 2, no. 4, pp. 352–356, Apr. 2023. DOI: https://doi.org/10.47852/bonviewJCCE3202838
Y. Lin, C. Wang, H. Song, and Y. Li, "Multi-Head Self-Attention Transformation Networks for Aspect-Based Sentiment Analysis," IEEE Access, vol. 9, pp. 8762–8770, 2021. DOI: https://doi.org/10.1109/ACCESS.2021.3049294
A. Vaswani et al., "Attention is All you Need," in Advances in Neural Information Processing Systems, 2017, vol. 30.
A. Gulati et al., "Conformer: Convolution-augmented Transformer for Speech Recognition." arXiv, May 16, 2020. DOI: https://doi.org/10.21437/Interspeech.2020-3015
S. Kılıçarslan, K. Adem, and M. Çelik, "An overview of the activation functions used in deep learning algorithms," Journal of New Results in Science, vol. 10, no. 3, pp. 75–88, Dec. 2021. DOI: https://doi.org/10.54187/jnrs.1011739
R. Ong, "Offensive Language Analysis using Deep Learning Architecture." arXiv, Mar. 19, 2019.
L. S. Mut Altin, À. Bravo Serrano, and H. Saggion, "LaSTUS/TALN at SemEval-2019 Task 6: Identification and Categorization of Offensive Language in Social Media with Attention-based Bi-LSTM model," in Proceedings of the 13th International Workshop on Semantic Evaluation, Minneapolis, MN, USA, Mar. 2019, pp. 672–677. DOI: https://doi.org/10.18653/v1/S19-2120
X. Zhou et al., "Hate Speech Detection Based on Sentiment Knowledge Sharing," in Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Dec. 2021, pp. 7158–7166. DOI: https://doi.org/10.18653/v1/2021.acl-long.556
Y. Wang et al., "Dynamic Sparse LoRA: Adaptive Low-Rank Finetuning for Nuanced Offensive Language Detection." Computer Science and Mathematics, May 27, 2025. DOI: https://doi.org/10.20944/preprints202505.2020.v1
K. Mnassri, P. Rajapaksha, R. Farahbakhsh, and N. Crespi, "BERT-based Ensemble Approaches for Hate Speech Detection," in GLOBECOM 2022 - 2022 IEEE Global Communications Conference, Rio de Janeiro, Brazil, Dec. 2022, pp. 4649–4654. DOI: https://doi.org/10.1109/GLOBECOM48099.2022.10001325
R. Alothman, H. Benhidour, and S. Kerrache, "Offensive Language Detection on Social Media Using XLNet." arXiv, Jun. 26, 2025.
Downloads
How to Cite
License
Copyright (c) 2025 Praneetha Garagadakuppe Nanjundappa, Kamalakshi Naganna

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.
