Efficient sarcasm detection in social media using hybrid CapsNet-LSTM fusion and feature optimization
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.
Authors
- Sajid Ali (ORCID: https://orcid.org/0000-0002-0696-3057)
- Dilawar Shah (ORCID: https://orcid.org/0000-0003-2701-6646)
- Sundas Shireen Awan
- Muhammad Tahir
- Suleman Amjad
Institutions
- Bacha Khan University (PK)
- COMSATS University Islamabad (PK)
- Kardan University (AF)
Publication Details
- Journal
- Social Network Analysis and Mining
- Published
- 2026-02-19
- DOI
- https://doi.org/10.1007/s13278-026-01579-3
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 0.00