An Intelligent Ensemble Machine Learning Framework for Enhanced Email Spam Detection Under Class Imbalance
DOI:
https://doi.org/10.22399/ijcesen.5537Keywords:
Cybersecurity, Email Spam, Class Imbalance, Ensemble Machine Learning, Voting classifierAbstract
Email is among the most used and effective internet communication and data or message sharing methods. With the importance and high usage of emails, spam mail has also grown at a great rate. Email spam detection is an essential task for maintaining secure and efficient email communication by distinguishing unwanted messages from legitimate emails. This research presents a methodology for accurate Spam email categorization using Spam Base-UCI dataset based on ML. The framework applies data preprocessing, Chi-Squared-based Select Best feature selection to retain the 35 most informative features, StandardAero for feature normalization, and SMOTE-ENN to address class imbalance. Three classification models, namely MLP, Extra Trees, and LightGBM, are developed and integrated using a Soft Voting Classifier. The models are evaluated using accuracy, precision, recall, F1score, sensitivity, specificity, ROC-AUC, and Precision-Recall analysis. Experimental outcomes demonstrate that the Voting Classifier achieves the best performance, with 99.02% accuracy, 99.43% precision, 98.58% recall, and 99.00% F1score, outperforming the individual classifiers and several existing approaches. The results demonstrate that integrating feature selection, class balancing, and complementary ensemble models provides an effective and robust approach for distinguishing Spam Emails and Legitimate Emails. The values of the research performance measures indicate that ML models have the potential to enhance the adoption of cybersecurity solutions in combating email spam attacks.
References
[1] Y. Tian, X. Dai, Z. Li, H. Guo, and X. Mao, “Improving the accuracy of cybersecurity spam email detection using ensemble techniques: A stacking approach Machine learning for spam email detection,” PLoS One, vol. 20, no. 9, p. e0331574, Sep. 2025, doi: 10.1371/journal.pone.0331574. DOI: https://doi.org/10.1371/journal.pone.0331574
[2] M. Adnan, M. O. Imam, M. F. Javed, and I. Murtza, “Improving spam email classification accuracy using ensemble techniques: a stacking approach,” Int. J. Inf. Secur., vol. 23, no. 1, pp. 505–517, Feb. 2024, doi: 10.1007/s10207-023-00756-1. DOI: https://doi.org/10.1007/s10207-023-00756-1
[3] N. Ahmed, R. Amin, H. Aldabbas, D. Koundal, B. Alouffi, and T. Shah, “Machine Learning Techniques for Spam Detection in Email and IoT Platforms: Analysis and Research Challenges,” Secur. Commun. Networks, vol. 2022, pp. 1–19, Feb. 2022, doi: 10.1155/2022/1862888. DOI: https://doi.org/10.1155/2022/1862888
[4] M. Crawford, T. M. Khoshgoftaar, J. D. Prusa, A. N. Richter, and H. Al Najada, “Survey of review spam detection using machine learning techniques,” J. Big Data, vol. 2, no. 1, p. 23, Dec. 2015, doi: 10.1186/s40537-015-0029-9. DOI: https://doi.org/10.1186/s40537-015-0029-9
[5] C. P. Singh, “Enterprise-Grade AI-Driven Text Analytics and Insight Extraction Using Transformer-Based NLP Models,” in 2026 14th International Symposium on Digital Forensics and Security (ISDFS), IEEE, Mar. 2026, pp. 1–6. doi: 10.1109/ISDFS69419.2026.11459059. DOI: https://doi.org/10.1109/ISDFS69419.2026.11459059
[6] K. Agarwal, P. Uniyal, S. Virendrasingh, S. Krishna, and V. Dutt, “Spam Mail Classification Using Ensemble and Non-Ensemble Machine Learning Algorithms,” in Lecture Notes in Networks and Systems, 2021, pp. 179–189. doi: 10.1007/978-981-15-7106-0_18. DOI: https://doi.org/10.1007/978-981-15-7106-0_18
[7] A. M. John and S. S. Joseph, “A Lightweight and Interpretable Machine Learning Approach for SMS and Email Spam Detection,” in 2026 International Conference on AI-Driven Solutions for Sustainable Smart Cities: Challenges and Opportunities (ADSSSC), IEEE, Apr. 2026, pp. 1–5. doi: 10.1109/ADSSSC67751.2026.11582785. DOI: https://doi.org/10.1109/ADSSSC67751.2026.11582785
[8] T. Chanda, B. Mondal, S. Das, S. Banerjee, and B. Mondal, “An Explainable AI-Based Hybrid SVM–CNN Ensemble Model Implementation for Intelligent Email Spam Detection,” in 2026 International Conference on Emerging Systems and Intelligent Computing (ESIC), IEEE, Feb. 2026, pp. 240–245. doi: 10.1109/ESIC68176.2026.11496294. DOI: https://doi.org/10.1109/ESIC68176.2026.11496294
[9] V. Sowmitha, R. Deebika, K. Vinoth, S. Suryaprakash, K. Kalaivendhan, and V. Karthi, “Federated Learning in Email Server Authentication for Spam Mail Detection Using LSTM Algorithm,” in 2025 International Conference on Smart and Sustainable Technology, INCSST 2025, 2025. doi: 10.1109/INCSST64791.2025.11210294. DOI: https://doi.org/10.1109/INCSST64791.2025.11210294
[10] L. Zou, “A Comparative Analysis of Count-Based and Inference-Based NLP Models in Spam Email Detection Task,” in 2024 5th International Seminar on Artificial Intelligence, Networking and Information Technology, AINIT 2024, 2024. doi: 10.1109/AINIT61980.2024.10581485. DOI: https://doi.org/10.1109/AINIT61980.2024.10581485
[11] N. Ramojirao, S. Anusuya, Harshavardhini, and C. B. Sembuli, “Analysis of Email Spam Detection Using Naive Bayes and Support Vector Machine Classification Algorithms,” in ICETAS 2024 - 9th IEEE International Conference on Engineering Technologies and Applied Sciences, 2024. doi: 10.1109/ICETAS62372.2024.11120193. DOI: https://doi.org/10.1109/ICETAS62372.2024.11120193
[12] A. Saini, K. Guleria, and S. Sharma, “Machine Learning Approaches for an Automatic Email Spam Detection,” in 2023 International Conference on Artificial Intelligence and Applications, ICAIA 2023 and Alliance Technology Conference, ATCON-1 2023 - Proceeding, 2023. doi: 10.1109/ICAIA57370.2023.10169201.
[13] V. I. Del Rosario, B. D. P. Fernandez, and D. A. Padilla, “Email Spam Classification using DistilBERT,” in 2023 IEEE 15th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management, HNICEM 2023, 2023. doi: 10.1109/HNICEM60674.2023.10589211. DOI: https://doi.org/10.1109/HNICEM60674.2023.10589211
[14] J. Hopkins, M., Reeber, E., Forman, G., & Suermondt, “UCI Machine Learning Repository,” Kaggel, 1999, [Online]. Available: https://archive.ics.uci.edu/dataset/94/spambase
[15] A. Saini, K. Guleria, and S. Sharma, “Machine Learning Approaches for an Automatic Email Spam Detection,” in 2023 International Conference on Artificial Intelligence and Applications (ICAIA) Alliance Technology Conference (ATCON-1), IEEE, Apr. 2023, pp. 1–5. doi: 10.1109/ICAIA57370.2023.10169201. DOI: https://doi.org/10.1109/ICAIA57370.2023.10169201
[16] M. H. Alsuwit, M. A. Haq, and M. A. Aleisa, “Advancing Email Spam Classification using Machine Learning and Deep Learning Techniques,” Eng. Technol. Appl. Sci. Res., vol. 14, no. 4, pp. 14994–15001, Aug. 2024, doi: 10.48084/etasr.7631. DOI: https://doi.org/10.48084/etasr.7631
[17] M. Jamil, H. Mihajloska Trpcheska, A. Popovska-Mitrovikj, V. Dimitrova, and R. Creutzburg, “Advancing Image Spam Detection: Evaluating Machine Learning Models Through Comparative Analysis,” Appl. Sci., vol. 15, no. 11, p. 6158, May 2025, doi: 10.3390/app15116158. DOI: https://doi.org/10.3390/app15116158
[18] S. Saleem, Z. U. Islam, S. S. U. Hasan, H. Akbar, M. F. Khan, and S. A. Ibrar, “Spam Email Detection Using Long Short-Term Memory and Gated Recurrent Unit,” Appl. Sci., vol. 15, no. 13, p. 7407, Jul. 2025, doi: 10.3390/app15137407 DOI: https://doi.org/10.3390/app15137407
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 International Journal of Computational and Experimental Science and Engineering

This work is licensed under a Creative Commons Attribution 4.0 International License.