Comparing Deep Learning and Machine Learning Approaches for Spam Email Detection - Hamzah; Niko Irsyad Maulana; Akhmad Wakhid (International Journal of Informatics Engineering and Computing, 2026)
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.