Journal of Artificial Intelligence and Engineering Applications (JAIEA)
Vol. 5 No. 2 (2026): February 2026

Comparative Performance Analysis of BERT and RoBERTa for Email Spam Classification

Purwadi (Unknown)
Hafizh Dzaky Ahya Gemilang (Unknown)



Article Info

Publish Date
15 Feb 2026

Abstract

The rapid advancement of information technology has increased the use of email as a primary digital communication medium, while also contributing to the growing volume of spam emails that threaten productivity and information security through phishing and malware. An accurate and adaptive email spam classification system is therefore required. This study aims to analyze and compare the performance of BERT and RoBERTa transformer models for email spam classification. An experimental research approach was employed using an email dataset consisting of spam and non-spam (ham) classes. The research process includes data collection, text preprocessing, model fine-tuning, and performance evaluation using accuracy, precision, recall, F1-score, and confusion matrix metrics. The results show that both BERT and RoBERTa achieve high classification performance. However, RoBERTa demonstrates superior results, particularly in terms of spam recall and overall accuracy, indicating a stronger ability to detect spam emails. This advantage is attributed to RoBERTa’s optimized pre-training strategy, which improves contextual semantic understanding of email content. In conclusion, RoBERTa is more effective than BERT for email spam classification and can serve as a reliable model for developing robust transformer-based spam detection systems.

Copyrights © 2026






Journal Info

Abbrev

JAIEA

Publisher

Subject

Automotive Engineering Computer Science & IT Control & Systems Engineering

Description

The Journal of Artificial Intelligence and Engineering Applications (JAIEA) is a peer-reviewed journal. The JAIEA welcomes papers on broad aspects of Artificial Intelligence and Engineering which is an always hot topic to study, but not limited to, cognition and AI applications, engineering ...