journal article·2023-10-06Open access

RB_BG_MHA: A RoBERTa-Based Model with Bi-GRU and Multi-Head Attention for Chinese Offensive Language Detection in Social Media

Meijia Xu, Shuxian Liu

Applied Sciences· Volume 13· Issue 19

Abstract

Offensive language in social media affects the social experience of individuals and groups and hurts social harmony and moral values. Therefore, in recent years, the problem of offensive language detection has attracted the attention of many researchers. However, the primary research currently focuses on detecting English offensive language, while few studies on the Chinese language exist. In this paper, we propose an innovative approach to detect Chinese offensive language. First, unlike previous approaches, we utilized both RoBERTa’s sentence-level and word-level embedding, combining the sentence embedding and word embedding of RoBERTa’s model, bidirectional GRU, and multi-head self-attention mechanism. This feature fusion allows the model to consider sentence-level and word-level semantic information at the same time so as to capture the semantic information of Chinese text more comprehensively. Second, by concatenating the output results of multi-head attention with RoBERTa’s sentence embedding, we achieved an efficient fusion of local and global information and improved the representation ability of the model. The experiments showed that the proposed model achieved 82.931% accuracy and 82.842% F1-score in Chinese offensive language detection tasks, delivering high performance and broad application potential.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Hate Speech and Cyberbullying Detection · Bullying, Victimization, and Aggression

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

College of Information Science and Engineering, Xinjiang University, Urumqi 830046, China

Funding

National Natural Science Foundation of China · Natural Science Foundation of Xinjiang Uygur Autonomous Region from Xinjiang, China

References (29)

Show source-provided references
1. Chung, I., and Lin, C.J. (2021, January 10–12). TOCAB: A Dataset for Chinese Abusive Language Processing. Proceedings of the 2021 IEEE 22nd International Conference on Information Reuse and Integration for Data Science (IRI), IEEE, Las Vegas, NV, USA.10.1109/IRI51335.2021.00069 ↗
2. A systematic review of Hate Speech automatic detection using Natural Language Processing10.1016/j.neucom.2023.126232 ↗
3. López-Vizcaíno, M., Nóvoa, F.J., Artieres, T., and Cacheda, F. (2023). Site Agnostic Approach to Early Detection of Cyberbullying on Social Media Networks. Sensors, 23.10.3390/s23104788 ↗
4. Wulczyn, E., Thain, N., and Dixon, L. (2017, January 3–7). Ex machina: Personal attacks seen at scale. Proceedings of the 26th International Conference on World Wide Web, Perth, Australia.10.1145/3038912.3052591 ↗
5. Zhao, Y., and Tao, X. (2021, January 19–23). ZYJ123@ DravidianLangTech-EACL2021: Offensive Language Identification Based on XLM-RoBERTa with DPCNN. Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages, Kiev, Ukraine.
6. Multilingual hate speech detection sentimental analysis on social media platforms using optimal feature extraction and hybrid diagonal gated recurrent neural network10.1007/s11227-023-05361-6 ↗
7. Pereira-Kohatsu, J.C., Quijano-Sánchez, L., Liberatore, F., and Camacho-Collados, M. (2019). Detecting and monitoring hate speech in Twitter. Sensors, 19.10.3390/s19214654 ↗
8. Wang, J., Li, J., and Zhang, Y. (2023). Text3D: 3D Convolutional Neural Networks for Text Classification. Electronics, 12.10.3390/electronics12143087 ↗
9. Fesseha, A., Xiong, S., Emiru, E.D., Diallo, M., and Dahou, A. (2021). Text classification based on convolutional neural networks and word embedding for low-resource languages: Tigrinya. Information, 12.10.3390/info12020052 ↗
10. Wang, Z., Kim, S., and Joe, I. (2023). An Improved LSTM-Based Failure Classification Model for Financial Companies Using Natural Language Processing. Appl. Sci., 13.10.3390/app13137884 ↗
11. Automated self-learning chatbot initially build as a FAQs database information retrieval system: Multi-level and intelligent universal virtual front-office implementing neural network10.31449/inf.v42i4.2173 ↗
12. Deep learning based fusion approach for hate speech detection10.1109/ACCESS.2020.3009244 ↗
13. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. (2019). Roberta: A robustly optimized bert pretraining approach. arXiv.
14. Bahdanau, D., Cho, K., and Bengio, Y. (2014). Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv.
15. Bilal, M., Khan, A., Jan, S., Musa, S., and Ali, S. (2023). Roman Urdu hate speech detection using transformer-based model for cyber security applications. Sensors, 23.10.3390/s23083909 ↗
16. Deng, J., Zhou, J., Sun, H., Zheng, C., Mi, F., Meng, H., and Huang, M. (2022). Cold: A benchmark for chinese offensive language detection. arXiv.10.18653/v1/2022.emnlp-main.796 ↗
17. Chen, Y., Zhou, Y., Zhu, S., and Xu, H. (2012, January 3–5). Detecting offensive language in social media to protect adolescent online safety. Proceedings of the 2012 International Conference on Privacy, Security, Risk and Trust and 2012 International Confernece on Social Computing, IEEE, Amsterdam, The Netherlands.10.1109/SocialCom-PASSAT.2012.55 ↗
18. Shylaja, S.S., Narayanan, A., Venugopal, A., and Prasad, A. (2017, January 13–15). Document embedding generation for cyber-aggressive comment detection using supervised machine learning approach. Proceedings of the 14th International Conference on Natural Language Processing (ICON-2017), Bangalore, India.
19. Bohra, A., Vijay, D., Singh, V., Akhtar, S.S., and Shrivastava, M. (2018, January 6). A dataset of Hindi-English code-mixed social media text for hate speech detection. Proceedings of the Second Workshop on Computational Modeling of People’s Opinions, Personality, and Emotions in Social Media, New Orleans, LA, USA.10.18653/v1/W18-1105 ↗
20. Automatic detection of offensive language for urdu and roman urdu10.1109/ACCESS.2020.2994950 ↗
21. A framework for hate speech detection using deep convolutional neural network10.1109/ACCESS.2020.3037073 ↗
22. Cyberbullying detection in social media text based on character-level convolutional neural network with shortcuts10.1002/cpe.5627 ↗
23. Djandji, M., Baly, F., Antoun, W., and Hajj, H. (2020, January 11–16). Multi-task learning using AraBert for offensive language detection. Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, Marseille, France.
24. Gémes, K., Kovács, Á., Reichel, M., and Recski, G. (2021, January 13–17). Offensive text detection on English Twitter with deep learning models and rule-based systems. Proceedings of the Forum for Information Retrieval Evaluation (Working Notes), (FIRE), Bangladesh, India.
25. Hate speech and offensive language detection in Dravidian languages using deep ensemble framework10.1016/j.csl.2022.101386 ↗
26. Aroyehun, S.T., and Gelbukh, A.F. (2021, January 3–6). Evaluation of Intermediate Pre-training for the Detection of Offensive Language. Proceedings of the IberLEF@ SEPLN, Malaga, Spain.
27. Lu, J., Xu, B., Zhang, X., Min, C., Yang, L., and Lin, H. (2023). Facilitating Fine-grained Detection of Chinese Toxic Language: Hierarchical Taxonomy, Resources, and Benchmarks. arXiv.10.18653/v1/2023.acl-long.898 ↗
28. Zhou, L., Cabello, L., Cao, Y., and Hershcovich, D. (2023). Cross-Cultural Transfer Learning for Chinese Offensive Language Detection. arXiv.10.18653/v1/2023.c3nlp-1.2 ↗
29. Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., Grave, E., Ott, M., Zettlemoyer, L., and Stoyanov, V. (2019). Unsupervised cross-lingual representation learning at scale. arXiv.10.18653/v1/2020.acl-main.747 ↗