Enhancing spam detection with advanced feature extraction and unsupervised clustering
Ali Abdulkarem Habib Alrammahi, Farah Abbac Sari, Zahraa Azhar Muhammad, Mustafa Noaman Kadhim, Dhiah Al‐Shammary, Ayman Ibaida
Abstract
Abstract This paper explores the combined effect of diverse datasets and advanced feature extraction techniques on the performance of email spam detection using unsupervised clustering algorithms Fuzzy C-Means and K-Means. Leveraging the Enron Email Dataset and the SMS Spam Collection Dataset, we extract both traditional features (TF-IDF) and novel attributes (punctuation count, capital letter usage, and body length) that reflect spam characteristics. Clustering is applied to group emails based on these features, and the generated cluster labels are subsequently used to train supervised classifiers, including K-Nearest Neighbours, Naive Bayes, Support Vector Machines, and XGBoost. Comparative analysis reveals that clustering significantly enhances classification accuracy by uncovering latent structures within high-dimensional data. Moreover, our results highlight the strengths and limitations of Fuzzy C-Means versus K-Means in this context. The study demonstrates that integrating unsupervised clustering with rich feature engineering contributes to more robust and efficient spam detection, paving the way for future hybrid spam filtering models.