Efficient sarcasm detection in social media using hybrid CapsNet-LSTM fusion and feature optimization

Read full text
Authors: Sundas Shireen Awan, Suleman Amjad, Sajid Ali, Dilawar Shah, Muhammad Tahir
Cited by: 1
References: 23

Abstract

Detecting sarcasm in social media remains a challenging task due to its context-dependent nature, implicit sentiment reversal, and lack of explicit linguistic cues. This study proposes an efficient hybrid framework that integrates Capsule Networks (CapsNet) and Long Short-Term Memory (LSTM) architectures, enhanced through a feature optimization pipeline using Word2Vec and TF–IDF embeddings combined with Principal Component Analysis (PCA) and Linear Discriminant Analysis (LDA). The hybrid CapsNet–LSTM model leverages CapsNet’s ability to capture hierarchical phrase-level representations and LSTM’s strength in modeling sequential dependencies, while PCA/LDA reduce noise and improve computational efficiency. The proposed framework is evaluated on the Self-Annotated Reddit Corpus (SARC) comprising 1.3 million comments and further tested on a Twitter sarcasm corpus to assess cross-platform generalizability. The model achieves 86.0% accuracy (81.6% F1-score) on Reddit and 78.5% accuracy on Twitter, outperforming strong baselines including CNN–LSTM, standalone CapsNet, standalone LSTM, and several fine-tuned transformer models (BERT, XLNet, RoBERTa, DistilBERT). SHapley Additive exPlanations (SHAP) are employed to provide token-level interpretability, revealing meaningful attribution patterns aligned with known linguistic markers of sarcasm. Comprehensive runtime profiling demonstrates that the proposed 6.0M-parameter model delivers competitive accuracy with significantly lower memory footprint and faster CPU inference compared to transformer baselines, making it suitable for resource-constrained environments. These findings highlight the potential of combining hierarchical and sequential modeling with lightweight feature optimization for robust and efficient sarcasm detection across diverse social media platforms.

Fields of Study & Subjects

Sentiment Analysis and Opinion Mining Misinformation and Its Impacts Spam and Phishing Detection

Publication details

Journal / source
Social Network Analysis and Mining
Publisher
Springer Science and Business Media LLC
Volume
16
Issue
1
Publication date
19 February 2026
Language
EN