Open Access iconOpen Access

ARTICLE

crossmark

Event-Aware Sarcasm Detection in Chinese Social Media Using Multi-Head Attention and Contrastive Learning

Kexuan Niu, Xiameng Si*, Xiaojie Qi, Haiyan Kang

College of Computer Science, Beijing Information Science and Technology University, Beijing, 100192, China

* Corresponding Author: Xiameng Si. Email: email

Computers, Materials & Continua 2025, 85(1), 2051-2070. https://doi.org/10.32604/cmc.2025.065377

Abstract

Sarcasm detection is a complex and challenging task, particularly in the context of Chinese social media, where it exhibits strong contextual dependencies and cultural specificity. To address the limitations of existing methods in capturing the implicit semantics and contextual associations in sarcastic expressions, this paper proposes an event-aware model for Chinese sarcasm detection, leveraging a multi-head attention (MHA) mechanism and contrastive learning (CL) strategies. The proposed model employs a dual-path Bidirectional Encoder Representations from Transformers (BERT) encoder to process comment text and event context separately and integrates an MHA mechanism to facilitate deep interactions between the two, thereby capturing multidimensional semantic associations. Additionally, a CL strategy is introduced to enhance feature representation capabilities, further improving the model’s performance in handling class imbalance and complex contextual scenarios. The model achieves state-of-the-art performance on the Chinese sarcasm dataset, with significant improvements in accuracy (79.55%), F1-score (84.22%), and an area under the curve (AUC, 84.35%).

Keywords

Sarcasm detection; event-aware; multi-head attention; contrastive learning; NLP

Cite This Article

APA Style
Niu, K., Si, X., Qi, X., Kang, H. (2025). Event-Aware Sarcasm Detection in Chinese Social Media Using Multi-Head Attention and Contrastive Learning. Computers, Materials & Continua, 85(1), 2051–2070. https://doi.org/10.32604/cmc.2025.065377
Vancouver Style
Niu K, Si X, Qi X, Kang H. Event-Aware Sarcasm Detection in Chinese Social Media Using Multi-Head Attention and Contrastive Learning. Comput Mater Contin. 2025;85(1):2051–2070. https://doi.org/10.32604/cmc.2025.065377
IEEE Style
K. Niu, X. Si, X. Qi, and H. Kang, “Event-Aware Sarcasm Detection in Chinese Social Media Using Multi-Head Attention and Contrastive Learning,” Comput. Mater. Contin., vol. 85, no. 1, pp. 2051–2070, 2025. https://doi.org/10.32604/cmc.2025.065377



cc Copyright © 2025 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 2548

    View

  • 2075

    Download

  • 0

    Like

Share Link