Table of Contents
Fetching ...

An Innovative CGL-MHA Model for Sarcasm Sentiment Recognition Using the MindSpore Framework

Zhenkai Qin, Qining Luo, Xunyi Nong

TL;DR

Experiments validate the effectiveness of the hybrid approach for sarcasm detection in social media texts, demonstrating that the model achieves an accuracy of 81.20% and an F1 score of 80.77% on Headlines, and an accuracy of 79.72% with an F1 score of 61.39% on Riloff, outperforming traditional models.

Abstract

The pervasive use of the Internet and social media introduces significant challenges to automated sentiment analysis, particularly for sarcastic expressions in user-generated content. Sarcasm conveys negative emotions through ostensibly positive or exaggerated language, complicating its detection within natural language processing tasks. To address this, we propose an innovative sarcasm detection model integrating Convolutional Neural Networks (CNN), Gated Recurrent Units (GRU), Long Short-Term Memory (LSTM), and Multi-Head Attention mechanisms. The CNN component captures local n-gram features, while GRU and LSTM layers model sequential dependencies and contextual information. Multi-Head Attention enhances the model's focus on relevant parts of the input, improving interpretability. Experiments on two sarcasm detection datasets, Headlines and Riloff, demonstrate that the model achieves an accuracy of 81.20% and an F1 score of 80.77% on Headlines, and an accuracy of 79.72% with an F1 score of 61.39% on Riloff, outperforming traditional models. These results validate the effectiveness of our hybrid approach for sarcasm detection in social media texts.

An Innovative CGL-MHA Model for Sarcasm Sentiment Recognition Using the MindSpore Framework

TL;DR

Experiments validate the effectiveness of the hybrid approach for sarcasm detection in social media texts, demonstrating that the model achieves an accuracy of 81.20% and an F1 score of 80.77% on Headlines, and an accuracy of 79.72% with an F1 score of 61.39% on Riloff, outperforming traditional models.

Abstract

The pervasive use of the Internet and social media introduces significant challenges to automated sentiment analysis, particularly for sarcastic expressions in user-generated content. Sarcasm conveys negative emotions through ostensibly positive or exaggerated language, complicating its detection within natural language processing tasks. To address this, we propose an innovative sarcasm detection model integrating Convolutional Neural Networks (CNN), Gated Recurrent Units (GRU), Long Short-Term Memory (LSTM), and Multi-Head Attention mechanisms. The CNN component captures local n-gram features, while GRU and LSTM layers model sequential dependencies and contextual information. Multi-Head Attention enhances the model's focus on relevant parts of the input, improving interpretability. Experiments on two sarcasm detection datasets, Headlines and Riloff, demonstrate that the model achieves an accuracy of 81.20% and an F1 score of 80.77% on Headlines, and an accuracy of 79.72% with an F1 score of 61.39% on Riloff, outperforming traditional models. These results validate the effectiveness of our hybrid approach for sarcasm detection in social media texts.

Paper Structure

This paper contains 19 sections, 23 equations, 3 figures, 4 tables.

Figures (3)

  • Figure 1: Overview of the CGL-MHA model architecture. Word embeddings are processed by CNN, GRU, and LSTM modules before being passed through a Multi-Head Attention mechanism. This structure allows the model to capture both local and global context, essential for sarcasm detection.
  • Figure 2: Internal structure of the GRU module. The GRU primarily focuses on short-term dependencies, processing each word in the input sequence. It uses reset, update, and new gates to manage the flow of information, allowing the model to retain relevant details across short contexts.
  • Figure 3: Internal structure of the Bi-directional LSTM module. The LSTM captures longer-term dependencies in the sequence. By using both forward and backward LSTMs, the model can understand the full context of the input sequence, which is crucial for detecting sarcasm that relies on information from both ends of the sentence.