Enhancing XGBoost performance for classification tasks using particle swarm optimization and SHAP-based model interpretability - Mohammad Andri Budiman; Jonson Manurung (International Journal of Basic and Applied Science, 2026)
Phishing remains one of the most critical and rapidly evolving cyber threats, with increasing incidents that challenge conventional detection mechanisms such as blacklist-based approaches. Although machine learning models have improved phishing detection accuracy, many studies emphasize performance optimization without adequately addressing model interpretability and transparent decision-making. This study aims to develop an optimized and explainable phishing detection framework by integrating XGBoost with Particle Swarm Optimization (PSO) for hyperparameter tuning and SHAP for interpretability analysis. The proposed approach was evaluated on the UCI Phishing Websites dataset consisting of 11,055 samples and 30 features, using accuracy, precision, recall, F1-score, and ROC-AUC as performance metrics. Experimental results show that XGBoost optimized using PSO achieved the best performance with an accuracy of 0.911, precision of 0.906, recall of 0.902, F1-score of 0.904, and ROC-AUC of 0.935, outperforming Random Forest (accuracy 0.896; ROC-AUC 0.921), SVM (accuracy 0.872; ROC-AUC 0.903), and XGBoost with default hyperparameters (accuracy 0.842; ROC-AUC 0.875). Furthermore, SHAP analysis identified key influential features such as Have_IP and URL_Length, providing transparent insights into model decisions. These findings demonstrate that combining metaheuristic optimization with explainable AI significantly enhances both predictive performance and interpretability, contributing to the development of reliable and trustworthy phishing detection systems in dynamic cybersecurity environments.