## 5 Simulation Results
### A Comparison of the LSTM Model and the Proposed Approaches
In contrast, the lower plot in Figure 6 shows that the yellow crosses align very well with the green dots, indicating that the optimized model had higher accuracy and reliability for the prediction of correct categories. This better alignment is crucial for UAV navigation and security, where precise and reliable predictions are essential to counter GPS spoofing attacks. Figure 7: A comparison of actual and predicted values between the Basic LSTM model and the LSTM-GA model. Figure 8 represents comparative results between the LSTM-GA model and the Optimized LSTM-GA model, which had a wider search space. The LSTM-GA model shows quite a good level of prediction alignment, but the Optimized LSTM-GA model shows far better prediction alignment. The actual values and the the predictions are nearly coincident throughout the series, showing higher precision with less mismatching than those of the LSTM-GA model model. This visual comparison is able to bring out the better performance in hyperparameter optimization of the LSTM-GA model due to the expanded search space. A larger search space for the Genetic Algorithm to traverse with the hyperparameters gave solutions closer to real data; therefore, it was very reliable and highly precise in this important area of GPS anti-spoofing. This fact shows that more holistic optimization strategies can bring great improvements in performance in complex, real-world scenarios. The power of hyperparameter optimization is evident from the graphical comparison of model outputs in the bar graph in Figure 9. It can be observed that the F1 score for the Basic LSTM model was 0.8763, whereas the LSTM-GA model showed an improved F1 score of 0.9294 and the Optimized LSTM-GA model outperformed both with a score of 0.9339. This was an increment of 5.31% and 5.76%, respectively, which is considered significant, as the improved model was able to maintain high accuracy and better balance between precision and recall compared to the standard model. Figure 10 presents a comparison in terms of accuracy between all the three models. The LSTM-GA model showed a significant increase in performance from 88.42% to 92.87% in terms of accuracy, resulting in an improvement of 4.45%. Moreover, the Optimized LSTM  
Figure 8: A comparison of actual and predicted values between the LSTM-GA model and the Optimized LSTM-GA model. GA model presented an accuracy rate of 93.12%, indicating an improvement in model performance and the efficiency of hyperparameter tuning using the Genetic Algorithm. Figure 11 presents a comparison of precision metrics for all the three models. The Optimized LSTM-GA model and the LSTM-GA model had precision values of 93.92% and 93.39%, respectively, which were relatively higher than the value recorded for the Basic LSTM model, which was 87.89%. This indicated significant enhancement in terms of  
Figure 10: Comparison of accuracy between all models. Figure 9: Comparison of F1 scores between all models. precision metrics, resulting in a highly precise model that identified spoofed signals more effectively among the predicted spoofed signals. Figure 12 provides a comparison of recall values for the Basic LSTM model, the LSTM-GA model, and the Optimized LSTM-GA model. It can be noticed that hyperparameter tuning played a significant role in improving the recall values, where the Optimized LSTM-GA model had a 93.12% recall value, which was slightly higher (0.25%) than that of the LSTM-GA model, which reached a value of 92.87%, and significantly higher (4.5%) than that of the Basic LSTM model, which had a value of 88.42%. This increase in the recall values highlighted the improved capability of the system to capture the spoofed signals. Figure 13 provides a comparison of loss across all models. As can be seen, the Optimized LSTM-GA model suffered the least loss with a value of 0.1078, directly followed by the LSTM-GA model, which had a close loss value of 0.1141, and the highest loss value was achieved by the Basic LSTM model, with a value of 0.2129.