A Deep Learning Approach for Text-Based Sarcasm Detection using Lexical Cues
Keywords:
Sarcasm Detection, Bi-LSTM, Lexical Cues, Multilingual Text Classification, Low-Resource Languages, Deep LearningAbstract
Sarcasm conveys a meaning opposite to its literal wording, making it a persistent source of error in sentiment analysis, especially on social media and across languages. This study examines whether explicit lexical cues improve recurrent sarcasm detectors. We propose Bi-LSTM-LC, which fuses the pooled Bi-LSTM representation with four lexical cues (sarcastic phrases mined from the training data, emojis, punctuation patterns, and interjections), and compare it with a Bi-LSTM baseline and four TF-IDF classifiers (Decision Tree, Nearest Centroid, Complement NB, and Multinomial NB) on five public datasets in English (news headlines and tweets), Arabic, Urdu, and Persian. All models are evaluated with a leakage-free protocol: deduplication, a single stratified 80/20 split, hyperparameter selection by 5-fold cross-validation on the training set only, and one evaluation on the held-out test set. Bi-LSTM-LC reached test macro-F1 scores of 79.8% (news headlines), 57.4% (English tweets), 67.4% (Arabic), 78.1% (Urdu) and 71.3% (Persian). It outperformed the Bi-LSTM baseline on four of the five datasets under identical fixed settings (−0.5 to +2.8 points), but not consistently once both models were tuned (−3.5 to +3.1 points), and TF-IDF Naive Bayes was the strongest model on three datasets. On the imbalanced Arabic dataset (16% sarcastic), Bi-LSTM-LC achieved the highest macro-F1 (67.4% vs. 64.3% for the tuned Bi-LSTM), with a balanced accuracy of 67.0% and sarcastic-class precision, recall, and F1 of 46.2%, 43.7%, and 44.9%, although its accuracy (83.0%) did not exceed the majority-class rate (84.1%). An architecture-matched ablation showed that the benefit of the cues is dataset-dependent: on Arabic, removing them lowered macro-F1 by 11.7 points and sarcastic-class recall from 43.7% to 11.4%; the mined phrases were the decisive cue for Urdu; and the cues gave no improvement on the English and Persian datasets. Lexical cues are therefore not a general-purpose improvement for Bi-LSTMs trained from scratch, but they are valuable for minority-class detection on imbalanced, low-resource data, and equally tuned baselines are essential when evaluating sarcasm detectors.
References
R. W. Gibbs, “On the Psycholinguistics of Sarcasm,” J. Exp. Psychol. Gen., vol. 115, no. 1, pp. 3–15, Mar. 1986, doi: 10.1037/0096-3445.115.1.3.
S. Mane and V. Khatavkar, “Researchers eye-view of sarcasm detection in social media textual content,” Apr. 2023, doi: 10.1729/Journal.31277.
Ahmed Derbala Yacoub, Amal Elsayed Aboutabl, and Salwa O. Slim, “Multilingual Sarcasm Detection for Enhancing Sentiment Analysis using Deep Learning Algorithms,” J. Commun. Softw. Syst., vol. 20, no. 4, 2024, [Online]. Available: https://jcoms.fesb.unist.hr/pdfs/v20n4_2024-0071_Yacoub.pdf
K. Sreelakshmi and P. C. Rafeeque, “An Effective Approach for Detection of Sarcasm in Tweets,” 2018 Int. CET Conf. Control. Commun. Comput. IC4 2018, pp. 377–382, Nov. 2018, doi: 10.1109/CETIC4.2018.8531044.
A. C. Băroiu and Ștefan Trăușan-Matu, “Automatic Sarcasm Detection: Systematic Literature Review,” Inf. 2022, Vol. 13, Page 399, vol. 13, no. 8, p. 399, Aug. 2022, doi: 10.3390/INFO13080399.
V. Govindan and V. Balakrishnan, “A machine learning approach in analysing the effect of hyperboles using negative sentiment tweets for sarcasm detection,” J. King Saud Univ. - Comput. Inf. Sci., vol. 34, no. 8, pp. 5110–5120, Sep. 2022, doi: 10.1016/J.JKSUCI.2022.01.008.
A. Kumar, V. T. Narapareddy, V. A. 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.
A. D. Yacoub, S. O. Slim, and A. E. Aboutabl, “A Survey of Sentiment Analysis and Sarcasm Detection: Challenges, Techniques, and Trends,” Int. J. Electr. Comput. Eng. Syst., vol. 15, no. 1, pp. 69–78, Jan. 2024, doi: 10.32985/IJECES.15.1.7.
Y. Mansour and A. Elnagar, “Sarcasm Detection in Arabic Text Using Contextualized Models,” Proc. 2023 Int. Conf. Asian Lang. Process. IALP 2023, pp. 278–283, 2023, doi: 10.1109/IALP61005.2023.10337175.
M. E. Hassan, M. Hussain, I. Maab, U. Habib, M. A. Khan, and A. Masood, “Detection of Sarcasm in Urdu Tweets Using Deep Learning and Transformer Based Hybrid Approaches,” IEEE Access, vol. 12, pp. 61542–61555, 2024, doi: 10.1109/ACCESS.2024.3393856.
Q. Abuein, R. M. Al-Khatib, A. Migdady, M. S. Jawarneh, and A. Al-Khateeb, “ArSa-Tweets: A novel Arabic sarcasm detection system based on deep learning model,” Heliyon, vol. 10, no. 17, p. e36892, Sep. 2024, doi: 10.1016/J.HELIYON.2024.E36892.
Y. Zhang, C. Zou, Z. Lian, P. Tiwari, and J. Qin, “SarcasmBench: Towards Evaluating Large Language Models on Sarcasm Understanding,” IEEE Trans. Affect. Comput., vol. 16, no. 4, pp. 2560–2578, 2025, doi: 10.1109/TAFFC.2025.3604806.
Q. Yang, L. Yang, J. Zeng, K. Ma, and H. Lin, “Sarcasm-R1: Enhancing Sarcasm Detection through Focused Reasoning,” EMNLP 2025 - 2025 Conf. Empir. Methods Nat. Lang. Process. Find. EMNLP 2025, pp. 10773–10785, 2025, doi: 10.18653/V1/2025.FINDINGS-EMNLP.570.
R. J. Kreuz and R. M. Roberts, “Two Cues for Verbal Irony: Hyperbole and the Ironic Tone of Voice,” Metaphor Symb., vol. 10, no. 1, pp. 21–31, Mar. 1995, doi: 10.1207/S15327868MS1001_3.
S. Rendalkar and C. Chandankhede, “Sarcasm Detection of Online Comments Using Emotion Detection,” Proc. Int. Conf. Inven. Res. Comput. Appl. ICIRCA 2018, pp. 1244–1249, Dec. 2018, doi: 10.1109/ICIRCA.2018.8597368.
D. Jain, A. Kumar, and G. Garg, “Sarcasm detection in mash-up language using soft-attention based bi-directional LSTM and feature-rich CNN,” Appl. Soft Comput., vol. 91, p. 106198, Jun. 2020, doi: 10.1016/J.ASOC.2020.106198.
A. Reyes, P. Rosso, and D. Buscaldi, “From humor recognition to irony detection: The figurative language of social media,” Data Knowl. Eng., vol. 74, pp. 1–12, Apr. 2012, doi: 10.1016/J.DATAK.2012.02.005.
L. H. Son, A. Kumar, S. R. Sangwan, A. Arora, A. Nayyar, and M. Abdel-Basset, “Sarcasm detection using soft attention-based bidirectional long short-term memory model with convolution network,” IEEE Access, vol. 7, pp. 23319–23328, 2019, doi: 10.1109/ACCESS.2019.2899260.
E. Sharma, N. K. Gondhi, M. Murugappan, G. Naik, and L. Murugan, “Toward Effective Sarcasm Detection in Social Media: A Review of Artificial Intelligence-Based Automated Approaches,” Expert Syst., vol. 43, no. 3, p. e70203, Mar. 2026, doi: 10.1111/EXSY.70203;REQUESTEDJOURNAL:JOURNAL:14680394;WGROUP:STRING:PUBLICATION.
R. Ali et al., “Deep Learning for Sarcasm Identification in News Headlines,” Appl. Sci. 2023, Vol. 13, Page 5586, vol. 13, no. 9, p. 5586, Apr. 2023, doi: 10.3390/APP13095586.
R. Misra and P. Arora, “Sarcasm detection using news headlines dataset,” AI Open, vol. 4, pp. 13–18, Jan. 2023, doi: 10.1016/J.AIOPEN.2023.01.001.
R. A. Potamias, G. Siolas, and A. G. Stafylopatis, “A transformer-based approach to irony and sarcasm detection,” Neural Comput. Appl. 2020 3223, vol. 32, no. 23, pp. 17309–17320, Jun. 2020, doi: 10.1007/S00521-020-05102-3.
S. Kaya and B. Alatas, “Sarcasm Detection with A New CNN+BiLSTM Hybrid Neural Network and BERT Classification Model,” Int. J. Adv. Netw. Appl., vol. 14, no. 03, pp. 5436–5443, 2022, doi: 10.35444/IJANA.2022.14304.
S. Sinha and V. K. Yadav, “Sarcasm Detection in News Headlines Using Deep Learning,” Int. Conf. Recent Adv. Sci. Eng. Technol. ICRASET 2023, 2023, doi: 10.1109/ICRASET59632.2023.10420344.
S. Ili´cili´c, E. Marrese-Taylor, J. A. Balazs, and Y. Matsuo, “Deep contextualized word representations for detecting sarcasm and irony,” Brussels, pp. 2–7, Jun. 2018, doi: 10.18653/V1/W18-6202.
A. Onan and M. A. Tocoglu, “A Term Weighted Neural Language Model and Stacked Bidirectional LSTM Based Framework for Sarcasm Identification,” IEEE Access, vol. 9, pp. 7701–7722, 2021, doi: 10.1109/ACCESS.2021.3049734.
Z. N. Ardilla, T. I. Sari, N. Hayatin, and C. Fatichah, “Sarcasm detection on news headline using multilayer bidirectional-LSTM with glove embeddings,” AIP Conf. Proc., vol. 2927, no. 1, Mar. 2024, doi: 10.1063/5.0192254/3279275.
M. M. Al-Ani, N. Omar, and A. A. Nafea, “A Hybrid Method of Long Short-Term Memory and Auto-Encoder Architectures for Sarcasm Detection,” J. Comput. Sci., vol. 17, no. 11, pp. 1093–1098, Dec. 2021, doi: 10.3844/JCSSP.2021.1093.1098.
M. A. Galal, A. Hassan Yousef, H. H. Zayed, and W. Medhat, “Arabic sarcasm detection: An enhanced fine-tuned language model approach,” Ain Shams Eng. J., vol. 15, no. 6, p. 102736, Jun. 2024, doi: 10.1016/J.ASEJ.2024.102736.
A. Israeli, Y. Nahum, S. Fine, and K. Bar, “The IDC System for Sentiment Classification and Sarcasm Detection in Arabic,” 2021. Accessed: Oct. 23, 2026. [Online]. Available: https://aclanthology.org/2021.wanlp-1.48/
B. Talafha, M. E. Za’ter, S. Suleiman, M. Al-Ayyoub, and M. N. Al-Kabi, “Sarcasm Detection and Quantification in Arabic Tweets,” Proc. - Int. Conf. Tools with Artif. Intell. ICTAI, vol. 2021-November, pp. 1121–1125, 2021, doi: 10.1109/ICTAI52525.2021.00177.
M. Y. Khan, T. Ahmed, M. S. Siddiqui, and S. Wasi, “Cognitive Relationship-Based Approach for Urdu Sarcasm and Sentiment Classification,” IEEE Access, vol. 11, pp. 126661–126690, 2023, doi: 10.1109/ACCESS.2023.3325048.
S. Khan et al., “An automated approach to identify sarcasm in low-resource language,” PLoS One, vol. 19, no. 12, p. e0307186, Dec. 2024, doi: 10.1371/JOURNAL.PONE.0307186.
S. Khan, I. Qasim, W. Khan, K. Aurangzeb, J. A. Khan, and M. S. Anwar, “A novel transformer attention-based approach for sarcasm detection,” Expert Syst., vol. 42, no. 1, p. e13686, Jan. 2025, doi: 10.1111/EXSY.13686;WGROUP:STRING:PUBLICATION.
M. Islam and M. Azhar, “Sarcasm Detection in Multilingual Text through Embedding-Enhanced Language Models: BERT Variants,” Proc. IEEE Int. Multi Top. Conf. INMIC, no. 2024, 2024, doi: 10.1109/INMIC64792.2024.11004369.
“(PDF) Humor Detection in Persian: A Transformers-Based Approach | Academia.edu.” Accessed: Oct. 23, 2026. [Online]. Available: https://www.academia.edu/104337275/Humor_Detection_in_Persian_A_Transformers_Based_Approach
Z. B. Nezhad and M. A. Deihimi, “SARCASM DETECTION IN PERSIAN,” J. Inf. Commun. Technol., vol. 20, no. 1, pp. 1–20, Jan. 2021, doi: 10.32890/JICT2021.20.1.1.
P. Golazizian, B. Sabeti, S. A. A. Asli, Z. Majdabadi, O. Momenzadeh, and R. Fahmi, “Irony Detection in Persian Language: A Transfer Learning Approach Using Emoji Prediction,” 2020. Accessed: Oct. 23, 2026. [Online]. Available: https://aclanthology.org/2020.lrec-1.346/
M. Panahandeh Nigjeh and S. Ghanbari, “Leveraging ParsBERT for cross-domain polarity sentiment classification of Persian social media comments,” Multimed. Tools Appl. 2023 834, vol. 83, no. 4, pp. 10677–10694, Jun. 2023, doi: 10.1007/S11042-023-16067-5.
P. Goel, R. Jain, A. Nayyar, S. Singhal, and M. Srivastava, “Sarcasm detection using deep learning and ensemble learning,” Multimed. Tools Appl. 2022 8130, vol. 81, no. 30, pp. 43229–43252, May 2022, doi: 10.1007/S11042-022-12930-Z.
R. Jamil, I. Ashraf, F. Rustam, E. Saad, A. Mehmood, and G. S. Choi, “Detecting sarcasm in multi-domain datasets using convolutional neural networks and long short term memory network model,” PeerJ. Comput. Sci., vol. 7, pp. 1–24, 2021, doi: 10.7717/PEERJ-CS.645.
A. Y. Muaad et al., “Artificial Intelligence-Based Approach for Misogyny and Sarcasm Detection from Arabic Texts,” Comput. Intell. Neurosci., vol. 2022, no. 1, p. 7937667, Jan. 2022, doi: 10.1155/2022/7937667.
A. El Mahdaouy, A. El Mekki, K. Essefar, N. El Mamoun, I. Berrada, and A. Khoumsi, “Deep Multi-Task Model for Sarcasm Detection and Sentiment Analysis in Arabic Language,” 2021. Accessed: Oct. 23, 2026. [Online]. Available: https://aclanthology.org/2021.wanlp-1.42/
C. van Hee, E. Lefever, and V. Hoste, “SemEval-2018 Task 3: Irony Detection in English Tweets,” NAACL HLT 2018 - Int. Work. Semant. Eval. SemEval 2018 - Proc. 12th Work., pp. 39–50, 2018, doi: 10.18653/V1/S18-1005.
I. A. Farha and W. Magdy, “From Arabic Sentiment Analysis to Sarcasm Detection: The ArSarcasm Dataset,” 2020. Accessed: Oct. 23, 2026. [Online]. Available: https://aclanthology.org/2020.osact-1.5/
“Urdu Sarcastic Tweets Dataset.” Accessed: Oct. 23, 2026. [Online]. Available: https://www.kaggle.com/datasets/shumailakhan/urdu-sarcastic-tweets-dataset
“GitHub - fatemenajafi135/Irony-detection: Persian Irony Detection, include a Persian dataset, creating a dataset automatically, and finetuning transformer-based language models for the task · GitHub.” Accessed: Oct. 23, 2026. [Online]. Available: https://github.com/fatemenajafi135/Irony-detection
S. Szeghalmy and A. Fazekas, “A Comparative Study of the Use of Stratified Cross-Validation and Distribution-Balanced Stratified Cross-Validation in Imbalanced Learning,” Sensors 2023, Vol. 23, Page 2333, vol. 23, no. 4, p. 2333, Feb. 2023, doi: 10.3390/S23042333.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 50sea

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


















