Deep Learning-Based Identification of Immoral Posts on Social Media Using Fine-tuned Bert Model
DOI:
https://doi.org/10.59461/ijdiic.v3i4.143Keywords:
Immoral Post , Social Media , Deep Learning , Bert model, Word EmbeddingsAbstract
The propagation of immoral content on social media poses substantial worries to online societal well-being and communication standards. While beneficial, traditional machine learning (ML) methods fall short of capturing the difficulty of textual and sequential data. This work reports this gap by suggesting a deep learning-based technique for detecting immoral posts on social media. The proposed model presents a fine-tuned Bidirectional Encoder representation from Transformers (BERT) with word embedding methods. Word2Vec and Global Vectors for Word Representation (GloVe) are employed to improve the identification of immoral posts on social media platforms to advance detection accuracy and strength. The incentive behind this study stems from the increasing demand for more sophisticated methods to struggle with damaging content. The proposed model is considered to capture the complicated patterns and semantic nuances in immoral posts by decreasing the dependence on manual feature engineering. The model is trained and assessed using benchmark datasets containing SARC and HatEval, which deliver a detailed set of labelled user-generated posts. The proposed model shows the best performance compared to traditional ML approaches. The fine-tuned Bert-based Word2Vec embeddings achieved a precision of 95.68%, recall of 96.85 %, and F1 scores of 96.26% on the SARC dataset. Fine-tuned Bert-based GloVe on the HatEval dataset achieved superior precision of 96.65, recall of 97.75, and F1-score of 97.20. The proposed results highlight the potential of the deep learning (DL) approach and fine-tuned BERT models, considerably refining the detection of unethical content on social networks.
Downloads
References
P. M. Valkenburg, “Social media use and well-being: What we know and what we need to know,” Curr. Opin. Psychol., vol. 45, p. 101294, Jun. 2022, doi: 10.1016/j.copsyc.2021.12.006.
B. N. R. B Narasimha Rao, “A Study on Positive and Negative Effects of Social Media on Society,” J. Sci. Technol., vol. 7, no. 10, pp. 46–54, Dec. 2022, doi: 10.46243/jst.2022.v7.i10.pp46-54.
V. Mercan, A. Jamil, A. A. Hameed, I. A. Magsi, S. Bazai, and S. A. Shah, “Hate Speech and Offensive Language Detection from Social Media,” in 2021 International Conference on Computing, Electronic and Electrical Engineering (ICE Cube), IEEE, Oct. 2021, pp. 1–5. doi: 10.1109/ICECube53880.2021.9628255.
L. Charmaraman, O. Sode, and D. Bickham, “Adolescent Mental Health Challenges in the Digital World,” in Technology and Adolescent Health, Elsevier, 2020, pp. 283–304. doi: 10.1016/B978-0-12-817319-0.00012-8.
J. Lee and S. Kim, “Social media advertising: The role of personal and societal norms in page like ads on Facebook,” J. Mark. Commun., vol. 28, no. 3, pp. 329–342, Apr. 2022, doi: 10.1080/13527266.2019.1658466.
V. U. Gongane, M. V. Munot, and A. D. Anuse, “Detection and moderation of detrimental content on social media platforms: current status and future directions,” Soc. Netw. Anal. Min., vol. 12, no. 1, p. 129, Dec. 2022, doi: 10.1007/s13278-022-00951-3.
K. M. Hana, Adiwijaya, S. Al Faraby, and A. Bramantoro, “Multi-label Classification of Indonesian Hate Speech on Twitter Using Support Vector Machines,” in 2020 International Conference on Data Science and Its Applications (ICoDSA), IEEE, Aug. 2020, pp. 1–7. doi: 10.1109/ICoDSA50139.2020.9212992.
A. H. Razavi, D. Inkpen, S. Uritsky, and S. Matwin, “Offensive Language Detection Using Multi-level Classification,” 2010, pp. 16–27. doi: 10.1007/978-3-642-13059-5_5.
M. van Dieijen, A. Borah, G. J. Tellis, and P. H. Franses, “Big Data Analysis of Volatility Spillovers of Brands across Social Media and Stock Markets,” Ind. Mark. Manag., vol. 88, pp. 465–484, Jul. 2020, doi: 10.1016/j.indmarman.2018.12.006.
T. Dias Oliva, “Content Moderation Technologies: Applying Human Rights Standards to Protect Freedom of Expression,” Hum. Rights Law Rev., vol. 20, no. 4, pp. 607–640, Dec. 2020, doi: 10.1093/hrlr/ngaa032.
A. Baccouche, S. Ahmed, D. Sierra-Sosa, and A. Elmaghraby, “Malicious Text Identification: Deep Learning from Public Comments and Emails,” Information, vol. 11, no. 6, p. 312, Jun. 2020, doi: 10.3390/info11060312.
S. Tongman and N. Wattanakitrungroj, “Classifying Positive or Negative Text Using Features Based on Opinion Words and Term Frequency - Inverse Document Frequency,” in 2018 5th International Conference on Advanced Informatics: Concept Theory and Applications (ICAICTA), IEEE, Aug. 2018, pp. 159–164. doi: 10.1109/ICAICTA.2018.8541274.
S. Akuma, T. Lubem, and I. T. Adom, “Comparing Bag of Words and TF-IDF with different models for hate speech detection from live tweets,” Int. J. Inf. Technol., vol. 14, no. 7, pp. 3629–3635, Dec. 2022, doi: 10.1007/s41870-022-01096-4.
S. Varghese, “Dynamics of Social Media Networks in the Post-Truth Era,” in Handbook of Digital Journalism, Singapore: Springer Nature Singapore, 2024, pp. 419–429. doi: 10.1007/978-981-99-6675-2_36.
A. Toktarova et al., “Hate Speech Detection in Social Networks using Machine Learning and Deep Learning Methods,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 5, 2023, doi: 10.14569/IJACSA.2023.0140542.
H. Elfaik and E. H. Nfaoui, “Deep Bidirectional LSTM Network Learning-Based Sentiment Analysis for Arabic Text,” J. Intell. Syst., vol. 30, no. 1, pp. 395–412, Dec. 2020, doi: 10.1515/jisys-2020-0021.
L. and A. P.-M. Hasimi, “Detection of disinformation and content filtering using machine learning: implications to human rights and freedom of speech,” ROMCIR@ ECIR, 2024.
A. Khan, M. Z. Asghar, H. Ahmad, F. M. Kundi, and S. Ismail, “A Rule-Based Sentiment Classification Framework for Health Reviews on Mobile Social Media,” J. Med. Imaging Heal. Informatics, vol. 7, no. 6, pp. 1445–1453, Oct. 2017, doi: 10.1166/jmihi.2017.2208.
K. Crawford and T. Gillespie, “What is a flag for? Social media reporting tools and the vocabulary of complaint,” New Media Soc., vol. 18, no. 3, pp. 410–428, Mar. 2016, doi: 10.1177/1461444814543163.
D. Saputra, V. S. Damayanti, Y. Mulyati, and W. Rahmat, “Expressions of the use of slang among millennial youth on social media and its impact of the extension of Indonesia in society,” BAHASTRA, vol. 43, no. 1, pp. 21–40, Apr. 2023, doi: 10.26555/bs.v43i1.325.
J. Grimmer and B. M. Stewart, “Text as Data: The Promise and Pitfalls of Automatic Content Analysis Methods for Political Texts,” Polit. Anal., vol. 21, no. 3, pp. 267–297, Jan. 2013, doi: 10.1093/pan/mps028.
A. Schmidt and M. Wiegand, “A Survey on Hate Speech Detection using Natural Language Processing,” in Proceedings of the Fifth International Workshop on Natural Language Processing for Social Media, Stroudsburg, PA, USA: Association for Computational Linguistics, 2017, pp. 1–10. doi: 10.18653/v1/W17-1101.
N. S. Mullah and W. M. N. W. Zainon, “Advances in Machine Learning Algorithms for Hate Speech Detection in Social Media: A Review,” IEEE Access, vol. 9, pp. 88364–88376, 2021, doi: 10.1109/ACCESS.2021.3089515.
J. Preetham and J. Anitha, “Offensive Language Detection in Social Media Using Ensemble Techniques,” in 2023 International Conference on Circuit Power and Computing Technologies (ICCPCT), IEEE, Aug. 2023, pp. 805–808. doi: 10.1109/ICCPCT58313.2023.10245673.
Warner, W. and J. Hirschberg, “Detecting hate speech on the world wide web,” Proc. Second Work. Lang. Soc. media, 2012.
T. Davidson, D. Warmsley, M. Macy, and I. Weber, “Automated Hate Speech Detection and the Problem of Offensive Language,” Proc. Int. AAAI Conf. Web Soc. Media, vol. 11, no. 1, pp. 512–515, May 2017, doi: 10.1609/icwsm.v11i1.14955.
P. Badjatiya, S. Gupta, M. Gupta, and V. Varma, “Deep Learning for Hate Speech Detection in Tweets,” in Proceedings of the 26th International Conference on World Wide Web Companion - WWW ’17 Companion, New York, New York, USA: ACM Press, 2017, pp. 759–760. doi: 10.1145/3041021.3054223.
A. Kumar, “A Study: Hate Speech and Offensive Language Detection in Textual Data by Using RNN, CNN, LSTM and BERT Model,” in 2022 6th International Conference on Intelligent Computing and Control Systems (ICICCS), IEEE, May 2022, pp. 1–6. doi: 10.1109/ICICCS53718.2022.9788347.
S. F. Ahmed et al., “Deep learning modelling techniques: current progress, applications, advantages, and challenges,” Artif. Intell. Rev., vol. 56, no. 11, pp. 13521–13617, Nov. 2023, doi: 10.1007/s10462-023-10466-8.
Y. Kim, “Convolutional Neural Networks for Sentence Classification,” Aug. 2014, doi: https://doi.org/10.48550/arXiv.1408.5882.
B. Jang, I. Kim, and J. W. Kim, “Word2vec convolutional neural networks for classification of news articles and tweets,” PLoS One, vol. 14, no. 8, p. e0220976, Aug. 2019, doi: 10.1371/journal.pone.0220976.
G. K. Pitsilis, H. Ramampiaro, and H. Langseth, “Effective hate-speech detection in Twitter data using recurrent neural networks,” Appl. Intell., vol. 48, no. 12, pp. 4730–4742, Dec. 2018, doi: 10.1007/s10489-018-1242-y.
S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Comput., vol. 9, no. 8, pp. 1735–1780, Nov. 1997, doi: 10.1162/neco.1997.9.8.1735.
C. Raj, A. Agarwal, G. Bharathy, B. Narayan, and M. Prasad, “Cyberbullying Detection: Hybrid Models Based on Machine Learning and Natural Language Processing Techniques,” Electronics, vol. 10, no. 22, p. 2810, Nov. 2021, doi: 10.3390/electronics10222810.
I. R. and I. A. H. Naseem, Usman, “Deep Context-Aware Embedding for Abusive and Hate Speech detection on Twitter,” Aust. J. Intell. Inf. Process. Syst, vol. 15, no. 3, pp. 69–76, 2019.
M. S. Lekshmi, A. Mariya Shaji, and S. K. Amrita, “Cyberbullying Detection Using BiLSTM Model,” 2024, pp. 339–350. doi: 10.1007/978-3-031-47942-7_29.
C. P. Soto, G. M. S. Nunes, J. G. R. C. Gomes, and N. Nedjah, “Application-specific word embeddings for hate and offensive language detection,” Multimed. Tools Appl., vol. 81, no. 19, pp. 27111–27136, Aug. 2022, doi: 10.1007/s11042-021-11880-2.
S. Alshattnawi, A. Shatnawi, A. M. R. AlSobeh, and A. A. Magableh, “Beyond Word-Based Model Embeddings: Contextualized Representations for Enhanced Social Media Spam Detection,” Appl. Sci., vol. 14, no. 6, p. 2254, Mar. 2024, doi: 10.3390/app14062254.
S. S, U. S, N. Abinaya, J. P, S. Priyanka, and D. M N, “A Comparative Exploration in Text Classification for Hate Speech and Offensive Language Detection Using BERT-Based and GloVe Embeddings,” in 2024 2nd International Conference on Disruptive Technologies (ICDT), IEEE, Mar. 2024, pp. 1506–1509. doi: 10.1109/ICDT61202.2024.10489019.
M. Khodak, N. Saunshi, and K. Vodrahalli, “A Large Self-Annotated Corpus for Sarcasm,” Apr. 2017, doi: 10.48550/arXiv.1704.05579.
Ò. Garibo i Orts, “Multilingual Detection of Hate Speech Against Immigrants and Women in Twitter at SemEval-2019 Task 5: Frequency Analysis Interpolation for Hate in Speech Detection,” in Proceedings of the 13th International Workshop on Semantic Evaluation, Stroudsburg, PA, USA: Association for Computational Linguistics, 2019, pp. 460–463. doi: 10.18653/v1/S19-2081.
H. Saleh, A. Alhothali, and K. Moria, “Detection of Hate Speech using BERT and Hate Speech Word Embedding with Deep Model,” Appl. Artif. Intell., vol. 37, no. 1, Dec. 2023, doi: 10.1080/08839514.2023.2166719.
Y. Li and T. Yang, “Word Embedding for Understanding Natural Language: A Survey,” 2018, pp. 83–104. doi: 10.1007/978-3-319-53817-4_4.
T. Mikolov, K. Chen, G. Corrado, and J. Dean, “Efficient Estimation of Word Representations in Vector Space,” Jan. 2013, Available: http://arxiv.org/abs/1301.3781
Pennington, J., R. Socher, and C.D. Manning, “Glove: Global vectors for word representation,” Proc. 2014 Conf. Empir. methods Nat. Lang. Process., 2014.
K. Sreelakshmi, B. Premjith, B. R. Chakravarthi, and K. P. Soman, “Detection of Hate Speech and Offensive Language CodeMix Text in Dravidian Languages Using Cost-Sensitive Learning Approach,” IEEE Access, vol. 12, pp. 20064–20090, 2024, doi: 10.1109/ACCESS.2024.3358811.
A. Kumar, V. T. Narapareddy, V. Aditya Srikanth, A. Malapati, and L. B. M. Neti, “Sarcasm Detection Using Multi-Head Attention Based Bidirectional LSTM,” IEEE Access, vol. 8, pp. 6388–6397, 2020, doi: 10.1109/ACCESS.2019.2963630.
R. Song, F. Giunchiglia, Q. Shen, N. Li, and H. Xu, “Improving Abusive Language Detection with online interaction network,” Inf. Process. Manag., vol. 59, no. 5, p. 103009, Sep. 2022, doi: 10.1016/j.ipm.2022.103009.
K. Saifullah, M. I. Khan, S. Jamal, and I. H. Sarker, “Cyberbullying Text Identification based on Deep Learning and Transformer-based Language Models,” EAI Endorsed Trans. Ind. Networks Intell. Syst., vol. 11, no. 1, Feb. 2024, doi: 10.4108/eetinis.v11i1.4703.
Kumar, A. and S. Kumar, “Optimized Deep Neural Networks Using Sparrow Search Algorithms for Hate Speech Detection,” Int. J. Comput. Digit. Syst., vol. 15, no. 1, pp. 1–9, 2024.
D. K. Sharma, B. Singh, S. Agarwal, H. Kim, and R. Sharma, “Sarcasm Detection over Social Media Platforms Using Hybrid Auto-Encoder-Based Model,” Electronics, vol. 11, no. 18, p. 2844, Sep. 2022, doi: 10.3390/electronics11182844.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2024 Bibi Saqia, Khairullah Khan, Atta Ur Rahman, Wahab Khan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.