A Comparative Study of BERT-Based Models for Sarcasm Detection in Social Media Texts

Authors

DOI:

https://doi.org/10.61467/2007.1558.2026.v17i2.853

Keywords:

Natural Language Processing, Transformers, BERT, Sarcasm Detection

Abstract

Social media has transformed communication, facilitating the rapid exchange of emotions and ideas between users. This shift has created the necessity for the development of sentiment analysis tools, enabling businesses to gain insights into audience reactions. However, detecting sentiment remains a challenging task due to the presence of informal language, abbreviations, and, notably, sarcasm, which can modify the intended message. Sarcasm, often conveyed through ironic or contrary statements, is particularly difficult to identify in text, as it lacks the non-verbal cues typically present in face-to-face communication. Recent advancements in deep learning, particularly the emergence of BERT (Bidirectional Encoder Representations from Transformers) based models, have significantly enhanced sarcasm detection by capturing nuanced contextual meanings of words. This paper compares several BERT-based models—BERT, RoBERTa, ALBERT, DistilBERT, and DeBERTa—to assess their effectiveness in sarcasm detection on iSarcasmEval and Sarcasm Corpus V2 datasets. Key performance metrics, including accuracy, computational efficiency, and the ability to capture complex contextual relationships, are analyzed to identify the most suitable model for sarcasm detection tasks. DeBERTa achieved the best performance on both datasets in this challenging task.

 

Smart citations: https://scite.ai/reports/10.61467/2007.1558.2026.v17i2.853
Dimensions.
Open Alex.

References

Abu Farha, I., Oprea, S. V., Wilson, S., & Magdy, W. (2022). SemEval-2022 Task 6: iSarcasmEval, Intended sarcasm detection in English and Arabic. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022) (pp. 802–814). Association for Computational Linguistics. https://doi.org/10.18653/v1/2022.semeval-1.111

Basu Roy Chowdhury, S., & Chaturvedi, S. (2021). Does commonsense help in detecting sarcasm? In Proceedings of the Second Workshop on Insights from Negative Results in NLP (pp. 9–15). Association for Computational Linguistics. https://doi.org/10.18653/v1/2021.insights-1.2

Bouazizi, M., & Otsuki, T. (2016). A pattern-based approach for sarcasm detection on Twitter. IEEE Access, 4, 5477–5488. https://doi.org/10.1109/ACCESS.2016.2594194

Brun, C., & Hagège, C. (2013). Suggestion mining: Detecting suggestions for improvement in users’ comments. Research in Computing Science, 70, 199–209.

D’Andrea, E., Ducange, P., Bechini, A., & Renda, A. (2019). Monitoring the public opinion about the vaccination topic from tweets analysis. Expert Systems with Applications, 116, 209–226.

Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) (pp. 4171–4186). Association for Computational Linguistics.

Du, X., Hu, D., Zhi, J., Jiang, L., & Shi, X. (2022). PALI-NLP at SemEval-2022 Task 6: iSarcasmEval- Fine-tuning the pre-trained model for detecting intended sarcasm. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022) (pp. 815–819). Association for Computational Linguistics. https://doi.org/10.18653/v1/2022.semeval-1.112

Ghosh, D., Fabbri, A. R., & Muresan, S. (2018). Sarcasm analysis using conversation context. Computational Linguistics, 44(4), 755–792. https://doi.org/10.1162/coli_a_00336

Giora, R. (1995). On irony and negation. Discourse Processes, 19(2), 239–264. https://doi.org/10.1080/01638539509544916

Grover, V., & Banati, H. (2022). DUCS at SemEval-2022 Task 6: Exploring emojis and sentiments for sarcasm detection. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022) (pp. 1005–1011). Association for Computational Linguistics. https://doi.org/10.18653/v1/2022.semeval-1.141

Han, Y., Chai, Y., Wang, S., Sun, Y., Huang, H., Chen, G., Xu, Y., & Yang, Y. (2022). X-PuDu at SemEval-2022 Task 6: Multilingual learning for English and Arabic sarcasm detection. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022) (pp. 999–1004). Association for Computational Linguistics. https://doi.org/10.18653/v1/2022.semeval-1.140

He, P., Liu, X., Gao, J., & Chen, W. (2020). DeBERTa: Decoding-enhanced BERT with disentangled attention. arXiv. https://arxiv.org/abs/2006.03654

Hercog, M., Jaroński, P., Kolanowski, J., Mieczyński, P., Wiśniewski, D., & Potoniec, J. (2022). Sarcastic RoBERTa: A RoBERTa-based deep neural network detecting sarcasm on Twitter. In Big Data Analytics and Knowledge Discovery (pp. 46–52). Springer. https://doi.org/10.1007/978-3-031-12670-3_4

Hinton, G., Vinyals, O., & Dean, J. (2015). Distilling the knowledge in a neural network. arXiv. https://arxiv.org/abs/1503.02531

Ivanko, S. L., & Pexman, P. M. (2003). Context incongruity and irony processing. Discourse Processes, 35(3), 241–279. https://doi.org/10.1207/S15326950DP3503_2

Jang, H., & Frassinelli, D. (2024). Generalizable sarcasm detection is just around the corner, of course! In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers) (pp. 4238–4249). Association for Computational Linguistics. https://doi.org/10.18653/v1/2024.naacl-long.238

Joshi, A., Bhattacharyya, P., & Carman, M. J. (2017). Automatic sarcasm detection: A survey. ACM Computing Surveys, 50(5), Article 73. https://doi.org/10.1145/3124420

Kenneth, M. O., Khosmood, F., & Edalat, A. (2024). A two-model approach for humour style recognition. In Proceedings of the 4th International Conference on Natural Language Processing for Digital Humanities (pp. 259–274). Association for Computational Linguistics. https://doi.org/10.18653/v1/2024.nlp4dh-1.25

Kobak, D., Linderman, G., Steinerberger, S., Kluger, Y., & Berens, P. (2020). Heavy-tailed kernels reveal a finer cluster structure in t-SNE visualisations. In Machine Learning and Knowledge Discovery in Databases (pp. 124–139). Springer. https://doi.org/10.1007/978-3-030-46150-8_8

Krishnan, D., Mahibha C, J., & Durairaj, T. (2022). GetSmartMSEC at SemEval-2022 Task 6: Sarcasm detection using contextual word embedding with Gaussian model for irony type identification. In Proceedings of the 16th International Workshop on Semantic Evaluation (SemEval-2022) (pp. 827–833). Association for Computational Linguistics. https://doi.org/10.18653/v1/2022.semeval-1.114

Kumar, A., & Garg, G. (2019). Empirical study of shallow and deep learning models for sarcasm detection using context in benchmark datasets. Journal of Ambient Intelligence and Humanized Computing. Advance online publication. https://doi.org/10.1007/s12652-019-01419-7

Lan, Z., Chen, M., Goodman, S., Gimpel, K., Sharma, P., & Soricut, R. (2019). ALBERT: A Lite BERT for self-supervised learning of language representations. arXiv. https://doi.org/10.48550/arXiv.1909.11942

Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., & Stoyanov, V. (2019). RoBERTa: A robustly optimized BERT pretraining approach. arXiv. https://doi.org/10.48550/arXiv.1907.11692

Majumder, N., Poria, S., Peng, H., Chhaya, N., Cambria, E., & Gelbukh, A. (2019). Sentiment and sarcasm classification with multitask learning. IEEE Intelligent Systems, 34(3), 38–43. https://doi.org/10.1109/MIS.2019.2904691

Mao, J., & Liu, W. (2019). A BERT-based approach for automatic humor detection and scoring. In Proceedings of the Iberian Languages Evaluation Forum (IberLEF 2019) (pp. 197–202). CEUR Workshop Proceedings.

Najafabadi, M. K., Ko, T. Z. C., Chaeikar, S. S., & Shabani, N. (2024). A multi-level embedding framework for decoding sarcasm using context, emotion, and sentiment feature. Electronics, 13(22), Article 4429. https://doi.org/10.3390/electronics13224429

Pandey, A., Rajpoot, D., & Saraswat, M. (2017). Twitter sentiment analysis using hybrid cuckoo search method. Information Processing & Management, 53, 764–779. https://doi.org/10.1016/j.ipm.2017.02.004

Qiu, X., Sun, T., Xu, Y., Shao, Y., Dai, N., & Huang, X. (2020). Pre-trained models for natural language processing: A survey. Science China Technological Sciences, 63(10), 1872–1897. https://doi.org/10.1007/s11431-020-1647-3

Rajadesingan, A., Zafarani, R., & Liu, H. (2015). Sarcasm detection on Twitter: A behavioral modeling approach. In Proceedings of the Eighth ACM International Conference on Web Search and Data Mining (WSDM ’15) (pp. 97–106). https://doi.org/10.1145/2684822.2685316

Sanh, V., Debut, L., Chaumond, J., & Wolf, T. (2019). DistilBERT, a distilled version of BERT: Smaller, faster, cheaper and lighter. arXiv. https://doi.org/10.48550/arXiv.1910.01108

Shu, X. (2024). BERT and RoBERTa for sarcasm detection: Optimizing performance through advanced fine-tuning. Applied and Computational Engineering, 97(1), 1–11. https://doi.org/10.54254/2755-2721/97/20241354

van der Maaten, L., & Hinton, G. (2008). Visualizing data using t-SNE. Journal of Machine Learning Research, 9(86), 2579–2605.

Wang, Z., Wu, Z., Wang, R., & Ren, Y. (2015). Twitter sarcasm detection exploiting a context-based model. In Web Information Systems Engineering – WISE 2015 (pp. 77–91). Springer. https://doi.org/10.1007/978-3-319-26190-4_6

Wilson, D. (2006). The pragmatics of verbal irony: Echo or pretence? Lingua, 116(10), 1722–1743. https://doi.org/10.1016/j.lingua.2006.05.001

Zhuang, L., Wayne, L., Ya, S., & Jun, Z. (2021). A robustly optimized BERT pre-training approach with post-training. In Proceedings of the 20th Chinese National Conference on Computational Linguistics (pp. 1218–1227). Chinese Information Processing Society of China. https://aclanthology.org/2021.ccl-1.108/

Downloads

Published

2026-02-16

How to Cite

Jiménez Castro, R., Sánchez Solís, J. P., García Jiménez, V., Rivera Zárate, G., & Florencia Juárez, R. (2026). A Comparative Study of BERT-Based Models for Sarcasm Detection in Social Media Texts. International Journal of Combinatorial Optimization Problems and Informatics, 17(2), 378–390. https://doi.org/10.61467/2007.1558.2026.v17i2.853

Issue

Section

Articles

Most read articles by the same author(s)