Abstract
Global Positioning System (GPS) spoofing poses a significant threat to the reliability of unmanned aerial vehicle (UAV) navigation systems that rely heavily on Global Navigation Satellite Systems (GNSS). To address this challenge, we propose a detection framework named PIR-PSO-XGBoost, which integrates Physics-Informed Residual (PIR) modeling with Particle Swarm Optimization (PSO) and Extreme Gradient Boosting (XGBoost). Unlike existing detection frameworks that rely on handcrafted features or deep black box models, the proposed method introduces a physically interpretable residual construction process that captures signal inconsistencies by enforcing temporal and carrier level consistency across GNSS observables. These residuals, combined with conventional navigation features, are used to train an XGBoost-based classifier, while PSO is employed to perform global hyperparameter tuning to enhance model generalization and robustness across diverse spoofing scenarios. This design improves interpretability and computational efficiency, addressing the limitations of traditional feature engineering and deep learning-based detectors. Experimental results on a real-world GPS spoofing dataset demonstrate that the proposed framework achieves a classification accuracy of 95.26% and an F1-score of 95.28%, significantly outperforming conventional learning baselines. These findings confirm that combining physics-guided feature construction with swarm optimized learning yields a robust, efficient, and deployable solution for GPS spoofing detection in UAV applications.