Comparing Deep Learning and Machine Learning Approaches for Spam Email Detection

Authors

  • Hamzah Universitas Respati Yogyakarta, Indonesia
  • Niko Irsyad Maulana Universitas Respati Yogyakarta, Indonesia
  • Akhmad Wakhid Harbin University of Science and Technology, China

DOI:

https://doi.org/10.70687/3rzz5124

Keywords:

Spam Detection, Machine Learning, CNN, Cybersecurity

Abstract

Spam messages remain one of the most prevalent cybersecurity threats because they facilitate phishing, fraud, and malware distribution through digital communication platforms. This paper evaluates the effectiveness of six machine learning algorithms for spam message detection, namely Convolutional Neural Network (CNN), Support Vector Machine (SVM), Decision Tree, K-Nearest Neighbor (KNN), Gaussian Naïve Bayes (GNB), and Gradient Boosting (GBoost). The proposed approach compares the performance of these classifiers using accuracy, precision, recall, and F1-score to identify the most reliable model for distinguishing spam and legitimate messages. Experimental results demonstrate that the CNN achieves the highest overall accuracy of 99%, with a precision, recall, and F1-score of 0.99, 1.00, and 0.99 for normal messages, and 0.99, 0.92, and 0.95 for spam messages, respectively. Gradient Boosting provides the second-best performance with an accuracy of 92%, while SVM, Decision Tree, and KNN achieve accuracies ranging from 88% to 90% but exhibit lower recall for the spam class. Gaussian Naïve Bayes produces the weakest performance with an accuracy of only 16%, indicating that its feature independence assumption is insufficient for modeling the complex relationships within textual spam data. These findings demonstrate that deep learning, particularly CNN, provides more accurate and balanced spam detection than conventional machine learning approaches. The proposed model offers an effective solution for practical spam filtering systems by minimizing both false positives and false negatives while maintaining high classification reliability. Future work will investigate transformer-based language models, hybrid deep learning architectures, explainable artificial intelligence techniques, and larger multilingual datasets to further improve detection accuracy, interpretability, and robustness against evolving spam patterns.

Downloads

Download data is not yet available.

Downloads

Published

2026-07-07

How to Cite

Comparing Deep Learning and Machine Learning Approaches for Spam Email Detection. (2026). International Journal of Informatics Engineering and Computing, 3(1), 40-55. https://doi.org/10.70687/3rzz5124

Similar Articles

1-10 of 20

You may also start an advanced similarity search for this article.