Jurnal Teknik Informatika (JUTIF)
Vol. 7 No. 5 (2026): JUTIF Volume 7, Number 5, October 2026

Comparative Analysis of TF-IDF, Word2Vec, and BERT with Logistic Regression, Random Forest, and XGBoost for Sarcasm Detection in News Headlines

A'zham Albar Rasyid (Informatics, Universitas Dian Nuswantoro, Indonesia)
Pulung Nurtantio Andono (Informatics, Universitas Dian Nuswantoro, Indonesia)
Ruri Suko Basuki (Informatics, Universitas Dian Nuswantoro, Indonesia)



Article Info

Publish Date
10 Oct 2026

Abstract

The detection of sarcasm in news headlines remains a significant challenge in Natural Language Processing due to the inherent ambiguity and limited contextual information in micro-texts. This research aims to evaluate the effectiveness of various text representation techniques and classification algorithms to identify the most optimal and computationally efficient model for sarcasm detection. The study examines three generations of text representation (TF-IDF, Word2Vec, and BERT) and classification algorithms, including Logistic Regression, Random Forest, XGBoost, and Stacking Ensemble, while comparing heavy and light preprocessing scenarios. The results reveal that light preprocessing which retains stopwords is more optimal for maintaining the semantic integrity of short texts. The combination of Logistic Regression and TF-IDF achieved the best performance with an accuracy of 0.8320 and an F1-Score of 0.8052. This model proved highly efficient with a training time of only 0.1397 seconds, significantly outperforming complex models like BERT and Stacking, which required up to 115.87 seconds without yielding a proportional increase in accuracy. These findings contribute to the field of NLP by demonstrating that for micro-text characteristics, frequency-based representations with minimal preprocessing offer a more effective and resource-efficient solution than complex contextual models, providing a benchmark for real-time sarcasm detection systems.

Copyrights © 2026






Journal Info

Abbrev

jurnal

Publisher

Subject

Computer Science & IT

Description

Jurnal Teknik Informatika (JUTIF) is an Indonesian national journal, publishes high-quality research papers in the broad field of Informatics, Information Systems and Computer Science, which encompasses software engineering, information system development, computer systems, computer network, ...