Sarcasm detection in text poses significant challenges for traditional sentiment analysis, as it often requires an understanding of context, word meanings, and emotional undertones. For example, in the sentence “I totally love working on Christmas holiday”, detecting sarcasm depends on capturing the contrast between affective words and their context. Existing methods often focus on single-embedding levels, such as word-level or affective-level, neglecting the importance of multi-level context. In this paper, we propose SAWE (Sentence, Affect, and Word Embeddings), a framework that combines sentence-level, affect-level, and context-dependent word embeddings to improve sarcasm detection. We use pre-trained transformer models SBERT and RoBERTa, enhanced with a bidirectional GRU and self-attention, alongside SenticNet to extract affective words. The combined embeddings are processed through a CNN and classified using a multilayer perceptron (MLP). SAWE is evaluated on two benchmark datasets, Sarcasm Corpus V2 (SV2) and Self-Annotated Reddit Corpus 2.0 (SARC 2.0), outperforming previous methods, particularly on long texts, with a 4.2% improvement on F1-Score for SV2. Our results emphasize the importance of multi-level embeddings and contextual information in detecting sarcasm, demonstrating a new direction for future research.
Read full abstract