Natasha Clarissa Maharani, Mohamad Muslikh, Syaiful Anam
Spam detection is essential for maintaining secure and efficient email communication, as spam messages not only reduce productivity but also pose risks such as phishing, scams, and malware. Effective spam detection improves user experience by filtering out irrelevant messages, safeguarding against fraud, reducing server load, and lowering operational costs. This paper proposes the Binary Seagull Optimization Algorithm (BSOA), a swarm intelligence-based method inspired by seagull migration and hunting behaviors, as an optimizer for classifying spam and non-spam emails using the Spambase dataset from the UCI Machine Learning Repository. BSOA begins by initializing positions and evaluating the objective function, then simulates migration and attack behaviors to generate new candidate solutions, retaining the best ones across iterations. Experimental results show that BSOA improves test accuracy by 1.4% compared to standard Random Forest models, with corresponding gains in precision (1.4%), recall (2.3%), and F1-score (0.5%). Furthermore, BSOA demonstrates competitive performance against other binary metaheuristics, including the Binary Bat, Binary Dragonfly, Binary Gravitational Search, and Binary Whale Optimization Algorithms. Notably, it achieves the lowest computational times for multiple population sizes, such as 20 (630 s), 25 (760 s), and 40 (1297 s), highlighting its efficiency and robustness. These results suggest that BSOA is a promising tool for enhancing spam detection systems by balancing classification accuracy with computational efficiency. © 2026, Penerbit Universiti Kebangsaan Malaysia. All rights reserved.
Mathematics Department, Faculty of Science, Brawijaya University, East Java, Indonesia