Leveraging Large Language Model on Spam Email Detection and Classification

Spam emails are still an immense cybersecurity problem since they frequently result in financial theft, data breaches, and a general drop in user confidence within online interaction mediums. Although conventional spam detection algorithms have been effective in the past, they frequently fail to identify the more complex and context‐aware strategies employed by contemporary spammers. In this work, we assessed how well both sophisticated large language models (LLMs) and traditional machine learning methods performed in the classification of spam communications. The Enron Spam dataset was used to train four baseline models: multinomial Naïve Bayes (MNB), K‐nearest neighbors, support vector machine (SVM), and multilayer perceptron (MLP). With an accuracy of 98.45%, MLP was the most successful conventional model among all. We also investigated the potential of a suggested GPT‐4o and a refined Bidirectional Encoder Representations from Transformers (BERT) model for spam identification. With an accuracy and F1‐score of 99.45%, the BERT model performed better than any other model, while the GPT‐4o model also produced impressive results with an accuracy of 98.77%. We verified all models on other datasets, such as SMS Spam, SpamAssassin, and Ling‐Spam, to make sure our results were not dataset specific. This made it easier to see how consistent and flexible they were with various layouts and literary approaches. The impact of activation functions in the BERT model was also investigated. Its ongoing usage in transformer‐based systems was supported by the minor performance advantage that the GELU activation function provided over ReLU. Lastly, to increase the statistical validity of our findings, we applied 5‐fold cross‐validation. All things considered, this research demonstrates how well LLMs, especially refined BERT, handle intricate linguistic structures and enhance spam detection mechanisms. However, it also demonstrates that MLP may still be a sensible option when computing assets are few.

Authors

Publication Details

Journal
Applied Computational Intelligence and Soft Computing
Published
2025-01-01
DOI
https://doi.org/10.1155/acis/7032960
Primary Topic
Spam and Phishing Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Leveraging Large Language Model on Spam Email Detection and Classification

Kingsley Ukaoha, Ibidun Christiana Obagbuwa, Charles Okechukwu Ugwunna, Mayowa Samuel Obadina et al.
Applied Computational Intelligence and Soft Computing
Spam and Phishing Detection
article

Leveraging Large Language Model on Spam Email Detection and Classification

Kingsley Ukaoha, Ibidun Christiana Obagbuwa, Charles Okechukwu Ugwunna, Mayowa Samuel Obadina, Ifeanyi Godspower Akawuku
article en

Abstract

Spam emails are still an immense cybersecurity problem since they frequently result in financial theft, data breaches, and a general drop in user confidence within online interaction mediums. Although conventional spam detection algorithms have been effective in the past, they frequently fail to identify the more complex and context‐aware strategies employed by contemporary spammers. In this work, we assessed how well both sophisticated large language models (LLMs) and traditional machine learning methods performed in the classification of spam communications. The Enron Spam dataset was used to train four baseline models: multinomial Naïve Bayes (MNB), K‐nearest neighbors, support vector machine (SVM), and multilayer perceptron (MLP). With an accuracy of 98.45%, MLP was the most successful conventional model among all. We also investigated the potential of a suggested GPT‐4o and a refined Bidirectional Encoder Representations from Transformers (BERT) model for spam identification. With an accuracy and F1‐score of 99.45%, the BERT model performed better than any other model, while the GPT‐4o model also produced impressive results with an accuracy of 98.77%. We verified all models on other datasets, such as SMS Spam, SpamAssassin, and Ling‐Spam, to make sure our results were not dataset specific. This made it easier to see how consistent and flexible they were with various layouts and literary approaches. The impact of activation functions in the BERT model was also investigated. Its ongoing usage in transformer‐based systems was supported by the minor performance advantage that the GELU activation function provided over ReLU. Lastly, to increase the statistical validity of our findings, we applied 5‐fold cross‐validation. All things considered, this research demonstrates how well LLMs, especially refined BERT, handle intricate linguistic structures and enhance spam detection mechanisms. However, it also demonstrates that MLP may still be a sensible option when computing assets are few.

Applied Computational Intelligence and Soft ComputingVol. 2025(1)
Openalex Percentile: Top 55%
Spam and Phishing Detection
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.