Contextual Analysis of Immoral Social Media Posts Using Self-attention-based Transformer Model

Authors

DOI:

https://doi.org/10.59461/ijdiic.v3i4.146

Keywords:

Immoral content, Contextual Analysis, Social media, NLP, Transformer model

Abstract

Immoral posts detection on social media is a serious issue in this digital era. This matter wants advanced natural language processing (NLP) methods to address user-generated text's difficult semantics and context. Incorporating advanced deep learning (DL) techniques improves the model's aptitude to handle challenges such as slang, sarcasm, and vague expressions. This work suggests a deep contextual analysis framework using a self-attention-based transformer model to detect immoral contents on soil networks efficiently. The model captures complex contextual associations and semantic nuances by harnessing the strength of self-attention mechanisms. The proposed technique enables proper differentiation between moral and immoral content. The framework is assessed on two benchmark datasets, SARC and HatEval. The experiment shows the highest F1-score, 98.10%, on the SARC dataset. While on HatEval, the model achieved 97.34%, representing greater performance than state-of-the-art approaches. The results highlight the efficiency of self-attention-based DL models in delivering efficient, scalable, and ethical answers for observing and modifying harmful content on social media networks.

Downloads

Download data is not yet available.

References

S. Saumya, A. Kumar, and J. P. Singh, “Filtering offensive language from multilingual social media contents: A deep learning approach,” Eng. Appl. Artif. Intell., vol. 133, p. 108159, Jul. 2024, doi: 10.1016/j.engappai.2024.108159.

A. U. Rahman, F. Al-Obeidat, A. Tubaishat, B. Shah, S. Anwar, and Z. Halim, “Discovering the Correlation Between Phishing Susceptibility Causing Data Biases and Big Five Personality Traits Using C-GAN,” IEEE Trans. Comput. Soc. Syst., vol. 11, no. 4, pp. 4800–4808, Aug. 2024, doi: 10.1109/TCSS.2022.3201153.

P. Hajibabaee et al., “Offensive Language Detection on Social Media Based on Text Classification,” in 2022 IEEE 12th Annual Computing and Communication Workshop and Conference (CCWC), IEEE, Jan. 2022, pp. 0092–0098. doi: 10.1109/CCWC54503.2022.9720804.

B. Mathew, R. Dutt, P. Goyal, and A. Mukherjee, “Spread of Hate Speech in Online Social Media,” in Proceedings of the 10th ACM Conference on Web Science, New York, NY, USA: ACM, Jun. 2019, pp. 173–182. doi: 10.1145/3292522.3326034.

A. Arora et al., “Detecting Harmful Content on Online Platforms: What Platforms Need vs. Where Research Efforts Go,” ACM Comput. Surv., vol. 56, no. 3, pp. 1–17, Mar. 2024, doi: 10.1145/3603399.

R. Abdrakhmanov et al., “Offensive Language Detection on Social Media using Machine Learning,” Int. J. Adv. Comput. Sci. Appl., vol. 15, no. 5, 2024, doi: 10.14569/IJACSA.2024.0150557.

K. Matsumoto, F. Ren, M. Matsuoka, M. Yoshida, and K. Kita, “Slang feature extraction by analysing topic change on social media,” CAAI Trans. Intell. Technol., vol. 4, no. 1, pp. 64–71, Mar. 2019, doi: 10.1049/trit.2018.1060.

R. Schifanella, P. de Juan, J. Tetreault, and L. Cao, “Detecting Sarcasm in Multimodal Social Platforms,” in Proceedings of the 24th ACM international conference on Multimedia, New York, NY, USA: ACM, Oct. 2016, pp. 1136–1145. doi: 10.1145/2964284.2964321.

H. Yenala, A. Jhanwar, M. K. Chinnakotla, and J. Goyal, “Deep learning for detecting inappropriate content in text,” Int. J. Data Sci. Anal., vol. 6, no. 4, pp. 273–286, Dec. 2018, doi: 10.1007/s41060-017-0088-4.

M. Abulaish, A. Kamal, and M. J. Zaki, “A Survey of Figurative Language and Its Computational Detection in Online Social Networks,” ACM Trans. Web, vol. 14, no. 1, pp. 1–52, Feb. 2020, doi: 10.1145/3375547.

M. Anand, K. B. Sahay, M. A. Ahmed, D. Sultan, R. R. Chandan, and B. Singh, “Deep learning and natural language processing in computation for offensive language detection in online social networks by feature selection and ensemble classification techniques,” Theor. Comput. Sci., vol. 943, pp. 203–218, Jan. 2023, doi: 10.1016/j.tcs.2022.06.020.

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.

Bibi Saqia, Khairullah Khan, Atta Ur Rahman, and Wahab Khan, “Deep Learning-Based Identification of Immoral Posts on Social Media Using Fine-tuned Bert Model,” Int. J. Data Informatics Intell. Comput., vol. 3, no. 4, pp. 26–39, Nov. 2024, doi: 10.59461/ijdiic.v3i4.143.

G. Xiang, B. Fan, L. Wang, J. Hong, and C. Rose, “Detecting offensive tweets via topical feature discovery over a large scale twitter corpus,” in Proceedings of the 21st ACM international conference on Information and knowledge management, New York, NY, USA: ACM, Oct. 2012, pp. 1980–1984. doi: 10.1145/2396761.2398556.

I. Abdellaoui, A. Ibrahimi, M. A. El Bouni, A. Mourhir, S. Driouech, and M. Aghzal, “Investigating Offensive Language Detection in a Low-Resource Setting with a Robustness Perspective,” Big Data Cogn. Comput., vol. 8, no. 12, p. 170, Nov. 2024, doi: 10.3390/bdcc8120170.

S. T. Aroyehun, and A. Gelbukh, “Aggression detection in social media: Using deep neural networks, data augmentation, and pseudo labeling,” Proc. first Work. trolling, Aggress. cyberbullying, pp. 90–97, 2018.

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.

S. S. Ilhan, S. Sivakumar, N. J, S. Ramesh, N. Sreeram, and R. Rajalakshmi, “Hate Speech Detection and Classification Using NLP,” in 2024 Second International Conference on Advances in Information Technology (ICAIT), IEEE, Jul. 2024, pp. 1–7. doi: 10.1109/ICAIT61638.2024.10690655.

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.

Anjum and R. Katarya, “Hate speech, toxicity detection in online social media: a recent survey of state of the art and opportunities,” Int. J. Inf. Secur., vol. 23, no. 1, pp. 577–608, Feb. 2024, doi: 10.1007/s10207-023-00755-2.

A. Maisto, S. Pelosi, S. Vietri, and P. Vitale, “Mining offensive language on social media,” Proc. Fourth Ital. Conf. Comput. Linguist. CLiC-it, pp. 1–354, 2017.

M. P. S. Bhatia and S. R. Sangwan, “Debunking Online Reputation Rumours Using Hybrid of Lexicon-Based and Machine Learning Techniques,” 2020, pp. 317–327. doi: 10.1007/978-981-15-3369-3_25.

S. Vashishtha and S. Susan, “Fuzzy rule based unsupervised sentiment analysis from social media posts,” Expert Syst. Appl., vol. 138, p. 112834, Dec. 2019, doi: 10.1016/j.eswa.2019.112834.

K.A. Gemes, Á. Kovács, M. Reichel, and G. Recski, “Offensive text detection on English Twitter with deep learning models and rule-based systems,” CEUR Workshop Proc., pp. 1–14, 2021.

M. Corazza, S. Menini, P. Arslan, R. Sprugnoli, E. Cabrio, S. Tonelli, and S. Villata, “Comparing different supervised approaches to hate speech detection,” EVALITA, pp. 1–6, 2018.

A. Muneer and S. M. Fati, “A Comparative Analysis of Machine Learning Techniques for Cyberbullying Detection on Twitter,” Futur. Internet, vol. 12, no. 11, p. 187, Oct. 2020, doi: 10.3390/fi12110187.

K. Sundararajan and A. Palanisamy, “Multi-Rule Based Ensemble Feature Selection Model for Sarcasm Type Detection in Twitter,” Comput. Intell. Neurosci., vol. 2020, pp. 1–17, Jan. 2020, doi: 10.1155/2020/2860479.

K. Sentamilselvan, P. Suresh, G. K. Kamalam, S. Mahendran, and D. Aneri, “Detection on sarcasm using machine learning classifiers and rule based approach,” IOP Conf. Ser. Mater. Sci. Eng., vol. 1055, no. 1, p. 012105, Feb. 2021, doi: 10.1088/1757-899X/1055/1/012105.

C. Eke, A. A. Norman, L. Shuib, F. Faith B., and Z. A. Long, “RANDOM FOREST-BASED CLASSIFIER FOR AUTOMATIC SARCASM CLASSIFICATION ON TWITTER DATA USING MULTIPLE FEATURES,” J. Inf. Syst. Digit. Technol., vol. 4, no. 2, Dec. 2022, doi: 10.31436/jisdt.v4i2.345.

C. I. Eke, A. A. Norman, and L. Shuib, “Multi-feature fusion framework for sarcasm identification on twitter data: A machine learning based approach,” PLoS One, vol. 16, no. 6, p. e0252918, Jun. 2021, doi: 10.1371/journal.pone.0252918.

D. Olaniyan, R. O. Ogundokun, O. P. Bernard, J. Olaniyan, R. Maskeliūnas, and H. B. Akande, “Utilizing an Attention-Based LSTM Model for Detecting Sarcasm and Irony in Social Media,” Computers, vol. 12, no. 11, p. 231, Nov. 2023, doi: 10.3390/computers12110231.

K. Gutiérrez-Batista, J. Gómez-Sánchez, and C. Fernandez-Basso, “Improving automatic cyberbullying detection in social network environments by fine-tuning a pre-trained sentence transformer language model,” Soc. Netw. Anal. Min., vol. 14, no. 1, p. 136, Jul. 2024, doi: 10.1007/s13278-024-01291-0.

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.

A. Bisht, A. Singh, H. S. Bhadauria, J. Virmani, and Kriti, “Detection of Hate Speech and Offensive Language in Twitter Data Using LSTM Model,” 2020, pp. 243–264. doi: 10.1007/978-981-15-2740-1_17.

M. Khodak, N. Saunshi, and K. Vodrahalli, “A large self-annotated corpus for sarcasm,” Proc. Elev. Int. Conf. Lang. Resour. Eval. (LREC 2018), 2018.

V. Basile et al., “SemEval-2019 Task 5: Multilingual Detection of Hate Speech Against Immigrants and Women in Twitter,” in Proceedings of the 13th International Workshop on Semantic Evaluation, Stroudsburg, PA, USA: Association for Computational Linguistics, 2019, pp. 54–63. doi: 10.18653/v1/S19-2007.

A. U. Rahman, Y. Alsenani, A. Zafar, K. Ullah, K. Rabie, and T. Shongwe, “Enhancing heart disease prediction using a self-attention-based transformer model,” Sci. Rep., vol. 14, no. 1, p. 514, Jan. 2024, doi: 10.1038/s41598-024-51184-7.

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.

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.

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.

A. Kumar 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. 617–626, Feb. 2024, doi: 10.12785/ijcds/150145.

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.

D. Vinoth and P. Prabhavathy, “An intelligent machine learning-based sarcasm detection and classification model on social networks,” J. Supercomput., vol. 78, no. 8, pp. 10575–10594, May 2022, doi: 10.1007/s11227-022-04312-x.

N. Srinu, K. Sivaraman, and M. Sriram, “Enhancing sarcasm detection through grasshopper optimization with deep learning based sentiment analysis on social media,” Int. J. Inf. Technol., Aug. 2024, doi: 10.1007/s41870-024-02057-9

Downloads

Published

22-12-2024

How to Cite

Saqia, B., Khan, K., Ur Rahman, A., & Khan, W. (2024). Contextual Analysis of Immoral Social Media Posts Using Self-attention-based Transformer Model. International Journal of Data Informatics and Intelligent Computing, 3(4), 62–76. https://doi.org/10.59461/ijdiic.v3i4.146

Issue

Section

Regular Issue