Hybrid Context-Aware CNN Framework for Sarcasm Detection Using Deep Semantic and Handcrafted Linguistic Features

Authors

  • Karwande Vijay Sureshrao, Amaravathi Pentaganti

Keywords:

Sarcasm Detection; Natural Language Processing; Hybrid CNN; Context-Aware Features; Handcrafted Linguistic Features; Sentiment Analysis; Deep Learning; Text Classification Introduction

Abstract

Sarcasm detection remains a challenging task in natural language processing because sarcastic expressions often convey an intended meaning that contradicts their literal sentiment. This problem is especially difficult in short and informal textual content, where sarcasm may appear through polarity reversal, exaggeration, punctuation emphasis, capitalization, contrast markers, and contextual incongruity. Traditional machine learning models based on lexical representations such as TF-IDF provide useful baseline performance, but they often fail to capture deeper semantic relationships. Deep learning models such as CNN and BiLSTM improve semantic feature learning; however, standalone neural models may overlook explicit linguistic cues that are important for sarcasm interpretation. This paper proposes a Hybrid Context-Aware Convolutional Neural Network framework for sarcasm detection by combining CNN-based deep semantic representations with handcrafted contextual linguistic features. The handcrafted feature set includes sentiment polarity cues, punctuation patterns, capitalization emphasis, contrast indicators, hyperbole signals, and lexical context markers. The proposed framework is evaluated against classical machine learning models, including Logistic Regression, Naive Bayes, Linear SVM, and Random Forest, as well as deep learning baselines such as CNN and BiLSTM. Experimental evaluation is performed using Accuracy, Precision, Recall, F1-score, AUC, confusion matrix analysis, and ablation-based comparison. The results indicate that the hybrid semantic-linguistic representation improves sarcasm classification by combining the contextual learning strength of CNN with interpretable sarcasm-oriented linguistic features. The study demonstrates that effective sarcasm detection requires both learned semantic understanding and explicit contextual feature modeling.

Downloads

Download data is not yet available.

References

M. S. Razali, A. A. Halin, L. Ye, S. Doraisamy, and N. M. Norowi, “Sarcasm Detection Using Deep Learning With Contextual Features,” IEEE Access, vol. 9, pp. 68609–68618, 2021. DOI: 10.1109/ACCESS.2021.3076789.

M. Abulaish, A. Kamal, and M. J. Zaki, “A Survey of Figurative Language and Its Computational Detection in Online Social Networks,” ACM Transactions on the Web, vol. 14, no. 1, pp. 1–52, 2020. DOI: 10.1145/3361573.

Baruah, K. Das, F. Barbhuiya, and K. Dey, “Context-Aware Sarcasm Detection Using BERT,” in Proc. Workshop on Figurative Language Processing, 2020. DOI: 10.18653/v1/2020.figlang-1.12.

N. Majumder, S. Poria, H. Peng, N. Chhaya, E. Cambria, and A. Gelbukh, “Sentiment and Sarcasm Classification With Multitask Learning,” IEEE Intelligent Systems, vol. 34, no. 3, pp. 38–43, 2019. DOI: 10.1109/MIS.2019.2904691.

M. E. Peters, M. Neumann, M. Iyyer, M. Gardner, C. Clark, K. Lee, and L. Zettlemoyer, “Deep Contextualized Word Representations,” in NAACL, 2018. DOI: 10.18653/v1/N18-1202.

E. Troiano, C. Strapparava, G. Ozbal, and S. S. Tekiroğlu, “A Computational Exploration of Exaggeration,” in EMNLP, 2018. DOI: 10.18653/v1/D18-1365.

S. Ilic, E. Marrese-Taylor, J. A. Balazs, and Y. Matsuo, “Deep Contextualized Word Representations for Detecting Sarcasm and Irony,” arXiv preprint arXiv:1809.09795, 2018. DOI: 10.48550/arXiv.1809.09795.

D. Hazarika, S. Poria, S. Gorantla, E. Cambria, R. Zimmermann, and R. Mihalcea, “CASCADE: Contextual Sarcasm Detection in Online Discussion Forums,” arXiv preprint arXiv:1805.06413, 2018. DOI: 10.48550/arXiv.1805.06413.

Joshi, P. Bhattacharyya, and M. J. Carman, “Automatic Sarcasm Detection: A Survey,” ACM Computing Surveys, vol. 50, no. 5, pp. 1–22, 2017. DOI: 10.1145/3124420.

M. Ebrahimi, A. H. Yazdavar, and A. Sheth, “Challenges of Sentiment Analysis for Dynamic Events,” IEEE Intelligent Systems, vol. 32, no. 5, pp. 70–75, 2017. DOI: 10.1109/MIS.2017.3711648.

L. Peled and R. Reichart, “Sarcasm SIGN: Interpreting Sarcasm With Sentiment Based Monolingual Machine Translation,” arXiv preprint arXiv:1704.06836, 2017. DOI: 10.48550/arXiv.1704.06836.

Ghosh and T. Veale, “Magnets for Sarcasm: Making Sarcasm Detection Timely, Contextual and Very Personal,” in Proc. EMNLP, 2017. DOI: 10.18653/v1/D17-1057.

P. Bojanowski, E. Grave, A. Joulin, and T. Mikolov, “Enriching Word Vectors With Subword Information,” Transactions of the ACL, vol. 5, pp. 135–146, 2017. DOI: 10.1162/tacl_a_00051.

S. K. Bharti, B. Vachha, R. K. Pradhan, K. S. Babu, and S. K. Jena, “Sarcastic Sentiment Detection in Tweets Streamed in Real Time: A Big Data Approach,” Digital Communications and Networks, vol. 2, no. 3, pp. 108–121, 2016. DOI: 10.1016/j.dcan.2016.05.002.

S. Poria, E. Cambria, D. Hazarika, and P. Vij, “A Deeper Look Into Sarcastic Tweets Using Deep Convolutional Neural Networks,” arXiv preprint arXiv:1610.08815, 2016. DOI: 10.48550/arXiv.1610.08815.

M. Zhang, Y. Zhang, and G. Fu, “Tweet Sarcasm Detection Using Deep Neural Network,” in COLING, 2016. DOI: 10.48550/arXiv.1610.08815.

S. Amir, B. C. Wallace, H. Lyu, and P. C. M. J. Silva, “Modelling Context With User Embeddings for Sarcasm Detection in Social Media,” arXiv preprint arXiv:1607.00976, 2016. DOI: 10.48550/arXiv.1607.00976.

Ghosh and T. Veale, “Fracking Sarcasm Using Neural Network,” in WASSA, 2016. DOI: 10.18653/v1/W16-0427.

M. Bouazizi and T. Ohtsuki, “Sarcasm Detection in Twitter: ‘All Your Products Are Incredibly Amazing’—Are They Really,” in IEEE GLOBECOM, 2015. DOI: 10.1109/GLOCOM.2015.7417600.

Rajadesingan, R. Zafarani, and H. Liu, “Sarcasm Detection on Twitter: A Behavioral Modeling Approach,” in Proc. WSDM, 2015. DOI: 10.1145/2684822.2685316.

Joshi, V. Sharma, and P. Bhattacharyya, “Harnessing Context Incongruity for Sarcasm Detection,” in ACL-IJCNLP, 2015. DOI: 10.3115/v1/P15-2124.

F. Kunneman, C. Liebrecht, M. van Mulken, and A. van den Bosch, “Signaling Sarcasm: From Hyperbole to Hashtag,” Information Processing & Management, vol. 51, no. 4, pp. 500–509, 2015. DOI: 10.1016/j.ipm.2014.07.006.

S. K. Bharti, K. S. Babu, and S. K. Jena, “Parsing-Based Sarcasm Sentiment Recognition in Twitter Data,” in ASONAM, 2015. DOI: 10.1145/2808797.2809410.

D. Bamman and N. A. Smith, “Contextualized Sarcasm Detection on Twitter,” in Proc. ICWSM, 2015. DOI: 10.1609/icwsm.v9i1.14663.

T. Ptacek, I. Habernal, and J. Hong, “Sarcasm Detection on Czech and English Twitter,” in COLING, 2014. DOI: 10.3115/v1/C14-1021.

F. Barbieri, H. Saggion, and F. Ronzano, “Modelling Sarcasm in Twitter, A Novel Approach,” in WASSA, 2014. DOI: 10.3115/v1/W14-2611.

Liebrecht, F. Kunneman, and A. van den Bosch, “The Perfect Solution for Detecting Sarcasm in Tweets #not,” in WASSA, 2013. DOI: 10.3115/v1/W13-1604.

E. Riloff, A. Qadir, P. Surve, L. De Silva, N. Gilbert, and R. Huang, “Sarcasm as Contrast Between a Positive Sentiment and Negative Situation,” in Proc. EMNLP, 2013. DOI: 10.3115/v1/D13-1066.

T. Mikolov, K. Chen, G. Corrado, and J. Dean, “Efficient Estimation of Word Representations in Vector Space,” arXiv preprint arXiv:1301.3781, 2013. DOI: 10.48550/arXiv.1301.3781.

Ramteke, A. Malu, P. Bhattacharyya, and J. S. Nath, “Detecting Turnarounds in Sentiment Analysis: Thwarting,” in ACL Short Papers, 2013. DOI: 10.3115/v1/P13-2150.

Reyes, P. Rosso, and D. Buscaldi, “From Humor Recognition to Irony Detection: The Figurative Language of Social Media,” Data & Knowledge Engineering, vol. 74, pp. 1–12, 2012. DOI: 10.1016/j.datak.2012.02.005.

J. D. Campbell and A. N. Katz, “Are There Necessary Conditions for Inducing a Sense of Sarcastic Irony,” Discourse Processes, vol. 49, no. 6, pp. 459–480, 2012. DOI: 10.1080/0163853X.2012.688454.

Davidov, O. Tsur, and A. Rappoport, “Semi-Supervised Recognition of Sarcasm in Twitter and Amazon,” in Proc. CoNLL, 2010. DOI: 10.5555/1944566.1944584.

O. Tsur, D. Davidov, and A. Rappoport, “ICWSM—A Great Catchy Name: Semi-Supervised Recognition of Sarcastic Sentences in Online Product Reviews,” in ICWSM, 2010. DOI: 10.1609/icwsm.v4i1.14031.

P. Rockwell, “Vocal Features of Conversational Sarcasm: A Comparison of Methods,” Journal of Psycholinguistic Research, vol. 36, no. 5, pp. 361–369, 2007. DOI: 10.1007/s10936-006-9049-0.

Liu, M. Hu, and J. Cheng, “Opinion Observer: Analyzing and Comparing Opinions on the Web,” in WWW, 2005. DOI: 10.1145/1060745.1060797.

S. Attardo, J. Eisterhold, J. Hay, and I. Poggi, “Multimodal Markers of Irony and Sarcasm,” Humor, vol. 16, no. 2, pp. 243–260, 2003. DOI: 10.1515/humr.2003.012.

S. L. Ivanko and P. M. Pexman, “Context Incongruity and Irony Processing,” Discourse Processes, vol. 35, no. 3, pp. 241–279, 2003. DOI: 10.1207/S15326950DP3503_02.

P. Rockwell, “Empathy and the Expression and Recognition of Sarcasm by Close Relations or Strangers,” Perceptual and Motor Skills, vol. 97, no. 1, pp. 251–256, 2003. DOI: 10.2466/pms.2003.97.1.251.

Downloads

Published

30.11.2022

How to Cite

Karwande Vijay Sureshrao. (2022). Hybrid Context-Aware CNN Framework for Sarcasm Detection Using Deep Semantic and Handcrafted Linguistic Features. International Journal of Intelligent Systems and Applications in Engineering, 10(3s), 554–573. Retrieved from https://mail.ijisae.org/index.php/IJISAE/article/view/8408

Issue

Section

Research Article