Attention-Driven Bidirectional LSTM For Context-Aware Sarcasm Detection
Keywords:
Long Short-Term Memory, Deep Learning, Sarcasm, Sentiment Analysis, Attention MechanismsAbstract
Natural Language Processing (NLP) systems have a hard time with sarcasm since it is a complex linguistic sarcasm that depends on context and tone rather than literal sense. Traditional ML methodologies often inefficiently address these difficulties outstand to their dependence on manually formed features. To tackle this problem, we provide a new DL framework that integrates Long Short-Term Memory (LSTM) networks with attention mechanisms to advance sarcasm detection. Our methodology uses bidirectional LSTMs to represent long-range contextual relationships and attention layers to dynamically arrange components that show sarcasm, including exaggerated sentences, contradictions, or emojis. Pre-trained embedding like Word2Vec is used to improve semantic representation, while strong preprocessing takes care of noise and unpredictability in social media content. Our model delivers state-of-the-art performance on a variety of datasets (SARC, Twitter), with accuracy of 97.73%, recall of 96.73%, and F1-score of 97.23% on SARC and 97.02% on Twitter. The approach advances NLP applications in sentiment analysis, understanding consumer feedback, and keeping an eye on social media. It also address issues like multilingual sarcasm and real-time deployment by making LSTM optimizations more efficient
Downloads
References
Yao, B., Zhang, Y., Li, Q., & Qin, J. (2025, April). Is sarcasm detection a step-by-step reasoning process in large language models?. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 39, No. 24, pp. 25651-25659).
Wang, X., Wang, Y., He, D., Yu, Z., Li, Y., Wang, L., ... & Jin, D. (2025). Elevating knowledge-enhanced entity and relationship understanding for sarcasm detection. IEEE Transactions on Knowledge and Data Engineering.
Sukhavasi, V., Sistla, V. P. K., & Dondeti, V. (2025). Sarcasm detection using optimized bi-directional long short-term memory. Knowledge and Information Systems, 67(3), 2771-2799.
Joshi, A., Bhattacharyya, P., & Carman, M. J. (2017). Automatic sarcasm detection: A survey. ACM Computing Surveys (CSUR), 50(5), 1-22.
Chen, W., Lin, F., Li, G., & Liu, B. (2024). A survey of automatic sarcasm detection: Fundamental theories, formulation, datasets, detection methods, and opportunities. Neurocomputing, 578, 127428.
Helal, N. A., Hassan, A., Badr, N. L., & Afify, Y. M. (2024). A contextual-based approach for sarcasm detection. Scientific Reports, 14(1), 15415.
Fatima, E., Kanwal, H., Khan, J. A., & Khan, N. D. (2024). An exploratory and automated study of sarcasm detection and classification in app stores using fine-tuned deep learning classifiers. Automated Software Engineering, 31(2), 69.
Kumar, M., & Patidar, A. (2021, December). Sarcasm detection using stacked bi-directional lstm model. In 2021 3rd International Conference on Advances in Computing, Communication Control and Networking (ICAC3N) (pp. 1-5). IEEE.
Ahuja, R., & Sharma, S. C. (2023). B²GRUA: BERTweet Bi-Directional Gated Recurrent Unit with Attention Model for Sarcasm Detection. Journal of Information Science & Engineering, 39(4).
Krishna, M. M., & Vankara, J. (2023). Detection of sarcasm using bi-directional RNN based deep learning model in sentiment analysis. Journal of Advanced Research in Applied Sciences and Engineering Technology, 31(2), 352-362.
Bavkar, D., Kashyap, R., & Khairnar, V. (2023, May). Deep hybrid model with trained weights for multimodal sarcasm detection. In International conference on information, communication and computing technology (pp. 179-194). Singapore: Springer Nature Singapore.
Khan, S., Qasim, I., Khan, W., Aurangzeb, K., Khan, J. A., & Anwar, M. S. (2025). A novel transformer attention‐based approach for sarcasm detection. Expert Systems, 42(1), e13686.
Dubey, P., Dubey, P., & Bokoro, P. N. (2025). Unpacking Sarcasm: A Contextual and Transformer-Based Approach for Improved Detection. Computers, 14(3), 95.
Gupta, A., Mittal, A., & Jain, R. (2025). A novel sarcasm detection approach for text-image data: Leveraging multimodal fusion and weighted latent factors. Information Fusion, 103266.
https://github.com/bshmueli/SARC accessed on April 2025
https://github.com/EducationalTestingService/sarcasm accessed on April 2025
Mamtani, S., Sonawane, M., Agarwal, K., & Sanjeev, N. (2025). Token-free Models for Sarcasm Detection. arXiv preprint arXiv:2505.01006.
Anusha, M., & Leelavathi, R. (2025). Sarcasm detection using enhanced glove and bi-LSTM model based on deep learning techniques. International Journal of Intelligent Engineering Informatics, 13(1), 26-54.
Dhiman, P., Choudhary, A., Wadhwa, S., & Kaur, A. (2024, March). Improving Deep Learning Classifiers Performance using Preprocessing and Cycle Scheduling Approaches in a Plant Disease Detection. In 2024 11th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions)(ICRITO) (pp. 1-5). IEEE.
Downloads
Published
How to Cite
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License.
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
Terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.