Enhanced Email Spam Detection Using Fine-Tuned Transformer Models and Classical Machine Learning Techniques

Email spam continues to be a pervasive challenge, causing significant disruptions to users and organizations by wasting time, reducing productivity, and posing cybersecurity risks. Traditional spam filtering techniques have achieved reasonable accuracy but often fall short when confronted with increasingly sophisticated spam tactics. Recent advancements in natural language processing, particularly transformer-based models like BERT, offer new opportunities to enhance spam detection by capturing deeper semantic and contextual information within email content. In this article presents a comprehensive comparative study of spam detection methods, combining classical machine learning classifiers with state-of-the-art fine-tuned transformer models from the Hugging Face library. We implement and evaluate standard classifiers alongside a fine-tuned BERT model for spam classification. The results demonstrate that fine-tuned transformer models outperform traditional approaches, achieving higher accuracy, precision, recall, and F1-scores while significantly reducing false positives and negatives. These improvements underline the value of applying transfer learning and deep contextual understanding to address evolving spam strategies. The study discusses the methodology for preprocessing, model training, and evaluation in detail, and includes insights into the trade-offs between model complexity and computational costs. The findings suggest that integrating fine-tuned transformer models into existing spam filtering systems can substantially improve detection robustness and reliability, paving the way for more secure and efficient email communication. Finally, we outline future directions for research, including exploration of larger transformer architectures and ensemble methods to further enhance spam detection performance.

Authors

Institutions

Publication Details

Journal
Multicriteria Algorithms with Applications
Published
2025-09-19
DOI
https://doi.org/10.61356/j.mawa.2025.8597
Citations
1
Primary Topic
Spam and Phishing Detection
Type
article
Field-Weighted Citation Impact
3.25
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhanced Email Spam Detection Using Fine-Tuned Transformer Models and Classical Machine Learning Techniques

Ahmed Abdelhafeez, Alber S. Aziz
1 citations
Multicriteria Algorithms with Applications
Spam and Phishing Detection
3.25
article

Enhanced Email Spam Detection Using Fine-Tuned Transformer Models and Classical Machine Learning Techniques

Ahmed Abdelhafeez, Alber S. Aziz
article en
1 citations

Abstract

Email spam continues to be a pervasive challenge, causing significant disruptions to users and organizations by wasting time, reducing productivity, and posing cybersecurity risks. Traditional spam filtering techniques have achieved reasonable accuracy but often fall short when confronted with increasingly sophisticated spam tactics. Recent advancements in natural language processing, particularly transformer-based models like BERT, offer new opportunities to enhance spam detection by capturing deeper semantic and contextual information within email content. In this article presents a comprehensive comparative study of spam detection methods, combining classical machine learning classifiers with state-of-the-art fine-tuned transformer models from the Hugging Face library. We implement and evaluate standard classifiers alongside a fine-tuned BERT model for spam classification. The results demonstrate that fine-tuned transformer models outperform traditional approaches, achieving higher accuracy, precision, recall, and F1-scores while significantly reducing false positives and negatives. These improvements underline the value of applying transfer learning and deep contextual understanding to address evolving spam strategies. The study discusses the methodology for preprocessing, model training, and evaluation in detail, and includes insights into the trade-offs between model complexity and computational costs. The findings suggest that integrating fine-tuned transformer models into existing spam filtering systems can substantially improve detection robustness and reliability, paving the way for more secure and efficient email communication. Finally, we outline future directions for research, including exploration of larger transformer architectures and ensemble methods to further enhance spam detection performance.

Multicriteria Algorithms with ApplicationsVol. 8
Cairo University (EG), October 6 University (EG)
Openalex Percentile: Top 6%
Spam and Phishing Detection
3.25
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.