BERT Model Adoption for Sarcasm Detection on Twitter Data

Authors

  • Tayyaba Javed Department of Computer Science, Barani Institute of Information Technology, Rawalpindi, 46604, Pakistan https://orcid.org/0009-0003-6903-7362
  • Muhammad Asif Nouman Riphah School of Computing & Innovation, Riphah International University, Lahore, Pakistan https://orcid.org/0000-0001-6884-1090
  • Rushna Zahid Department of Computer Science, COMSATS University Islamabad, Vehari Campus, Pakistan

DOI:

https://doi.org/10.21015/vtse.v12i3.1908

Abstract

Sarcasm is a term used to criticize someone's feelings. Sometimes, humans are not able to identify sarcastic comments, and they typically express the reverse of what they mean when they make snarky remarks. Therefore, the detection of sarcasm within a text automatically is a difficult task. Its significance in enhancing sentiment analysis has also made it an important study field. In previous studies, different approaches to deep learning (DL) and machine learning (ML) have been explored. However, previous approaches mainly depend on the lexical and linguistic aspects. Therefore, these techniques could not perform well in the context of sentiment accuracy. In this research, an efficient approach for detecting sarcasm is proposed. A Bidirectional Encoder Representation from a Transformer (BERT) is proposed to improve the sentiment accuracy in this research. This research also aims to compare the two models of deep learning, the BERT and LSTM (Long Short-Term Memory) models. This comparative analysis aims to provide a detailed overview of the pros and cons of each approach for the detection of sarcasm. The primary aim of this study is to examine the different existing ML and DL approaches for the identification of sarcasm. Apart from this, the comparison of BERT and LSTM contributes to the ongoing debate about whether models work best for sarcasm detection in social media. In this study, sentiment analysis's accuracy is improved by making better decisions, especially when it concerns Twitter interactions.

References

A. Baruah, K. Das, F. Barbhuiya, and K. Dey, "Context-aware sarcasm detection using BERT," in Proc. 2nd Workshop on Figurative Language Processing, 2020, pp. 83–87.

H. Gregory et al., "A transformer approach to contextual sarcasm detection in twitter," in Proc. 2nd Workshop on Figurative Language Processing, 2020, pp. 270–275.

X. Dong, C. Li, and J. D. Choi, "Transformer-based context-aware sarcasm detection in conversation threads from social media," arXiv preprint arXiv:2005.11424, 2020.

C. I. Eke, A. A. Norman, and L. Shuib, "Context-based feature technique for sarcasm identification in benchmark datasets using deep learning and BERT model," IEEE Access, vol. 9, pp. 48501–48518, 2021.

M. S. Jahan and M. Oussalah, "A systematic review of hate speech automatic detection using natural language processing," Neurocomputing, vol. 546, p. 126232, 2023.

A. Thakkar and K. Chaudhari, "Predicting stock trend using an integrated term frequency–inverse document frequency-based feature weight matrix with neural networks," Appl. Soft Comput., vol. 96, p. 106684, 2020.

S. Khotijah, J. Tirtawangsa, and A. A. Suryani, "Using LSTM for context-based approach of sarcasm detection in Twitter," in Proc. 11th Int. Conf. Adv. Inf. Technol., 2020, pp. 1–7.

V. Sukhavasi and V. Dondeti, "Sarcasm detection using optimized bi-directional long short-term memory," Knowl. Inf. Syst., pp. 1–29, 2024.

A. Avvaru, S. Vobilisetty, and R. Mamidi, "Detecting sarcasm in conversation context using transformer-based models," in Proc. 2nd Workshop on Figurative Language Processing, 2020, pp. 98–103.

H. Srivastava, V. Varshney, S. Kumari, and S. Srivastava, "A novel hierarchical BERT architecture for sarcasm detection," in Proc. 2nd Workshop on Figurative Language Processing, 2020, pp. 93–97.

E. Riloff et al., "Sarcasm as contrast between a positive sentiment and negative situation," in Proc. 2013 Conf. Empir. Methods Nat. Lang. Process., 2013, pp. 704–714.

N. Chatterjee, T. Aggarwal, and R. Maheshwari, "Sarcasm detection using deep learning-based techniques," Deep Learning-Based Approaches for Sentiment Analysis, pp. 237–258, 2020.

M. Nirmala, A. H. Gandomi, M. R. Babu, L. D. Babu, and R. Patan, "An Emoticon-Based Novel Sarcasm Pattern Detection Strategy to Identify Sarcasm in Microblogging Social Networks," IEEE Trans. Comput. Soc. Syst., 2023.

A. Ray, S. Mishra, A. Nunna, and P. Bhattacharyya, "A multimodal corpus for emotion recognition in sarcasm," arXiv preprint arXiv:2206.02119, 2022.

J. Venskus, P. Treigys, and J. Markeviči¯ut˙e, "Unsupervised marine vessel trajectory prediction using LSTM network and wild bootstrapping techniques," Nonlinear Anal. Model. Control., vol. 26, no. 4, pp. 718–737, 2021.

R. González-Ibánez, S. Muresan, and N. Wacholder, "Identifying sarcasm in Twitter: a closer look," in Proc. 49th Annu. Meet. Assoc. Comput. Linguist. Human Lang. Technol., 2011, pp. 581–586.

U. Yavanoglu, T. Y. Ibisoglu, and S. G. Wıcana, "Sarcasm detection algorithms," Int. J. Semant. Comput., vol. 12, no. 3, pp. 457–478, 2018.

R. Jahangir et al., "Text-independent speaker identification through feature fusion and deep neural network," IEEE Access, vol. 8, pp. 32187–32202, 2020.

R. Jahangir et al., "Speaker identification through artificial intelligence techniques: A comprehensive review and research challenges," Expert Syst. Appl., vol. 171, p. 114591, 2021.

A. Ghosh and T. Veale, "Fracking sarcasm using neural network," in Proc. 7th Workshop Comput. Approaches Subjectivity, Sentiment, Soc. Media Anal., 2016, pp. 161–169.

A. Joshi, P. Bhattacharyya, and M. J. Carman, "Automatic sarcasm detection: A survey," ACM Comput. Surv., vol. 50, no. 5, pp. 1–22, 2017.

D. Davidov, O. Tsur, and A. Rappoport, "Semi-supervised recognition of sarcasm in Twitter and Amazon," in Proc. 14th Conf. Comput. Nat. Lang. Learn., 2010, pp. 107–116.

K. Nithya, P. D. Kalaivaani, and R. Thangarajan, "An enhanced data mining model for text classification," in Proc. 2012 Int. Conf. Comput. Commun. Appl., 2012, pp. 1–4.

C. I. Eke, A. A. Norman, L. Shuib, and H. F. Nweke, "A survey of user profiling: State-of-the-art, challenges, and solutions," IEEE Access, vol. 7, pp. 144907–144924, 2019.

M. Ghosh, R. Guha, R. Sarkar, and A. Abraham, "A wrapper-filter feature selection technique based on ant colony optimization," Neural Comput. Appl., vol. 32, pp. 7839–7857, 2020.

Y. Hong, B. Hou, H. Jiang, and J. Zhang, "Machine learning and artificial neural network accelerated computational discoveries in materials science," Wiley Interdiscip. Rev. Comput. Mol. Sci., vol. 10, no. 3, p. e1450, 2020.

M. J. C. Samonte, C. J. T. Dollete, P. M. M. Capanas, M. L. C. Flores, and C. B. Soriano, "Sentence-level sarcasm detection in English and Filipino tweets," in Proc. 4th Int. Conf. Ind. Bus. Eng., 2018, pp. 181–186.

M. Abulaish and A. Kamal, "Self-deprecating sarcasm detection: an amalgamation of rule-based and machine learning approach," in Proc. IEEE/WIC/ACM Int. Conf. Web Intell., 2018, pp. 574–579.

M. S. M. Suhaimin, M. H. A. Hijazi, R. Alfred, and F. Coenen, "Mechanism for sarcasm detection and classification in malay social media," Adv. Sci. Lett., vol. 24, no. 2, pp. 1388–1392, 2018.

D. Khurana, A. Koli, K. Khatter, and S. Singh, "Natural language processing: state of the art, current trends and challenges," Multimed. Tools Appl., vol. 82, no. 3, pp. 3713–3744, 2023.

H. K. Kumar and B. Harish, "Sarcasm classification: a novel approach by using content based feature selection method," Procedia Comput. Sci., vol. 143, pp. 378–386, 2018.

A. Giachanou and F. Crestani, "Like it or not: A survey of Twitter sentiment analysis methods," ACM Comput. Surv., vol. 49, no. 2, pp. 1–41, 2016.

Y. Yunitasari, A. Musdholifah, and A. K. Sari, "Sarcasm detection for sentiment analysis in Indonesian tweets," IJCCS Indones. J. Comput. Cybern. Syst., vol. 13, no. 1, pp. 53–62, 2019.

S. Shah, D. Malik, and S. Kumar, "Sarcasm detection on social media using machine learning techniques," Comput. Electr. Eng., vol. 74, pp. 317–327, 2019.

A. Zhang et al., "Recent advances in convolutional neural network acceleration," Neurocomputing, vol. 323, pp. 37–51, 2019.

P. Bhardwaj, G. Singh, and M. Kumar, "A hybrid approach for aspect-level sentiment analysis using deep learning," Appl. Soft Comput., vol. 118, p. 108399, 2022.

J. Kunchakara and A. Naga, "Twitter sarcasm detection using machine learning techniques," Glob. Trans. Artif. Intell., vol. 6, no. 2, pp. 53–58, 2023.

A. S. Kumar, B. George, and K. M. Ashraf, "Sarcasm detection using combined contextual and content-based features," IEEE Access, vol. 8, pp. 187400–187411, 2020.

A. Poria, D. Hazarika, N. Majumder, R. Mihalcea, and E. Cambria, "Beneath the tip of the iceberg: Current challenges and new directions in sentiment analysis research," IEEE Trans. Affect. Comput., vol. 12, no. 4, pp. 1–17, 2021.

Downloads

Published

2024-09-28

How to Cite

Javed, T., Nouman, M. A., & Zahid, R. (2024). BERT Model Adoption for Sarcasm Detection on Twitter Data. VFAST Transactions on Software Engineering, 12(3), 177–198. https://doi.org/10.21015/vtse.v12i3.1908