Enhancing sarcasm detection on social media: A comprehensive study using LLMs and BERT with multi-headed attention on SARC

Sarcasm detection in natural language processing (NLP) remains a complex challenge, especially in social media, where contextual clues are often subtle. This study addresses this challenge by leveraging transformer-based models, including BERT, GPT-3, Claude-2, and Llama-2, for sarcasm detection on a large dataset from the Self-Annotated Reddit Corpus (SARC). The proposed method utilizes multi-head attention mechanisms to enhance model performance by capturing nuanced contextual relationships in the text. Fine-tuning of BERT, GPT-3, and Llama-2 was conducted to ensure a fair comparison and to provide a more detailed understanding of sarcasm in context. Our BERT-based model achieved state-of-the-art performance, with precision, recall, F1 score, and accuracy of 0.918, 0.917, 0.917, and 0.917, respectively, outperforming the other models. The effectiveness of our approach is demonstrated through rigorous statistical validation, ablation studies, and error analysis, providing robust evidence of its superiority. This study also highlights the significance of fine-tuning, machine translation, and multi-head attention in improving sarcasm detection.

Authors

Institutions

Publication Details

Journal
PLoS ONE
Published
2025-11-14
DOI
https://doi.org/10.1371/journal.pone.0334120
Citations
1
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
2.48

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing sarcasm detection on social media: A comprehensive study using LLMs and BERT with multi-headed attention on SARC

Zhang Li-hong, Anwar Ghani, Syed Naqvi, Muhammad Faseeh et al.
1 citations
PLoS ONE
Sentiment Analysis and Opinion Mining
2.48
article

Enhancing sarcasm detection on social media: A comprehensive study using LLMs and BERT with multi-headed attention on SARC

Zhang Li-hong, Anwar Ghani, Syed Naqvi, Muhammad Faseeh, Hu Liang
article en
1 citations

Abstract

Sarcasm detection in natural language processing (NLP) remains a complex challenge, especially in social media, where contextual clues are often subtle. This study addresses this challenge by leveraging transformer-based models, including BERT, GPT-3, Claude-2, and Llama-2, for sarcasm detection on a large dataset from the Self-Annotated Reddit Corpus (SARC). The proposed method utilizes multi-head attention mechanisms to enhance model performance by capturing nuanced contextual relationships in the text. Fine-tuning of BERT, GPT-3, and Llama-2 was conducted to ensure a fair comparison and to provide a more detailed understanding of sarcasm in context. Our BERT-based model achieved state-of-the-art performance, with precision, recall, F1 score, and accuracy of 0.918, 0.917, 0.917, and 0.917, respectively, outperforming the other models. The effectiveness of our approach is demonstrated through rigorous statistical validation, ablation studies, and error analysis, providing robust evidence of its superiority. This study also highlights the significance of fine-tuning, machine translation, and multi-head attention in improving sarcasm detection.

PLoS ONEVol. 20(11)
International Islamic University, Islamabad (PK), COMSATS University Islamabad (PK), Nazarbayev University (KZ), Hunan First Normal University (CN)
National Office for Philosophy and Social Sciences
Openalex Percentile: Top 8%
Sentiment Analysis and Opinion Mining
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Enhancing sarcasm detection on social media: A comprehensive study using LLMs and BERT with multi-headed attention on SARC — Zhang Li-hong, Anwar Ghani, et al. · PLoS ONE (2025) | TGRS Research Map | TGRS