Hybrid Transformer Learning with Contextual Semantic Features for Sarcasm Detection
Sarcasm detection is a challenging problem in computational linguistics because the sentiment expressed on the surface of a sarcastic utterance frequently contradicts the sentiment its author intends. Existing detectors are also brittle: models that perform well on one platform typically degrade sharply when applied to text from a different domain or writing style. This paper proposes a context-aware hybrid model that couples a pre-trained BERT encoder with a bidirectional LSTM and an additive attention layer, and fuses the resulting contextual representation with two complementary signals — an unsupervised topic-context vector obtained from BERTopic and a set of nine handengineered linguistic cues. The model is trained only on a labelled Twitter corpus and evaluated in two regimes: an in-domain held-out Twitter test set and a zero-shot cross-domain test on a balanced, formally-written News-Headlines corpus that the model never sees during training. Against four classical TF-IDF baselines and pure transformer baselines evaluated under an identical protocol, the proposed hybrid attains the strongest in-domain results, reaching an accuracy of 0.8695 and an F1-score of 0.7945, and the zero-shot cross-domain evaluation quantifies the extent to which a tweet-trained detector generalizes to a different register. The results indicate that combining a contextual transformer encoder with unsupervised topic context and linguistic cues is an effective and transferable design for sarcasm detection.
Authors
- Yuvraj G. Nikam (ORCID: https://orcid.org/0009-0008-4685-3021)
- Dhanshri Amol Shinde
- Vijay Pal Singh
Institutions
- Mangalayatan University (IN)
Publication Details
- Journal
- International Journal of Drug Delivery Technology
- Published
- 2026-11-19
- DOI
- https://doi.org/10.25258/ijddt.16.80s.70
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 0.00