Skip to main navigation Skip to search Skip to main content

Detection of Sarcasm in News Headlines Using NLP and Machine Learning

  • Ahmed Mansoori
  • , Khalaf Tahat
  • , Omar Al Zoubi
  • , Dina Naser Tahat
  • , Mohammad Habes
  • , Hanen Himdi
  • , Raghad Alfaisal Alfaisa
  • , Said A. Salloum

Research output: Chapter in Book/Report/Conference proceedingChapter

Abstract

Sarcasm detection in written text, particularly in short, context-limited formats such as news headlines, poses a considerable challenge in natural language processing). Sarcasm often conveys sentiments directly opposing to the literal meaning, hindering the accuracy of traditional sentiment analysis models. This challenge holds relevance in fields such as social media analysis, news aggregation, and conversational agents, where discerning true sentiment is crucial for effective content processing and user interaction. This paper introduces a deep learning-based sarcasm detection model specifically designed to classify sarcastic and non-sarcastic news headlines. The model is trained on a dataset of over 26,000 news headlines sourced from Kaggle, labelled as sarcastic or non-sarcastic. To learn the patterns of sarcasm in news headlines, a long short-term memory neural network was used after preprocessing the text data. To enhance model performance, techniques such as dropout and L2 regularization were implemented to reduce overfitting, and early stopping was used to stop training when validation loss stopped reducing. The trained model achieved an accuracy of 84.82% and an area under the curve score of 0.93 on the test dataset, demonstrating its effectiveness in detecting sarcasm in news headlines. Analysis of misclassified examples revealed common characteristics in sentences where the model struggled, often related to ambiguous language or subtle sarcasm lacking explicit contextual cues. Further analysis, incorporating linguistic and sentiment features, revealed insights into the distinctions between sarcastic and non-sarcastic news headlines, such as headline length and sentiment polarity. The findings from this research have implications for enhancing sentiment analysis models and conversational agents that rely on detecting sarcastic language. Future work can explore the integration of more advanced models, such as transformers, to better capture the context and nuances of sarcasm in text.

Original languageEnglish
Title of host publicationStudies in Computational Intelligence
PublisherSpringer Science and Business Media Deutschland GmbH
Pages503-517
Number of pages15
DOIs
Publication statusPublished - 2025

Publication series

NameStudies in Computational Intelligence
Volume1208
ISSN (Print)1860-949X
ISSN (Electronic)1860-9503

Keywords

  • Deep learning
  • LSTM
  • Machine learning
  • Natural language processing
  • News headlines
  • Sarcasm detection
  • Sentiment analysis
  • Text classification

ASJC Scopus subject areas

  • Artificial Intelligence

Fingerprint

Dive into the research topics of 'Detection of Sarcasm in News Headlines Using NLP and Machine Learning'. Together they form a unique fingerprint.

Cite this