## 5 Simulation Results
### A Comparison of the LSTM Model and the Proposed Approaches  
The simulation included an experiment which compared the LSTM model to the proposed approach. Initially, the LSTM model was solely used to make predictions for potential GPS spoofing. The second approach used that same LSTM model but optimized it using the GA. Figure 6 shows the training and validation loss of three different configurations--the Basic LSTM model, the LSTM-GA model, and the Optimized LSTM-GA model--over several epochs. The x-axis (epochs) represents the number of successful passes through the training data, whereas the y-axis shows the models' prediction inaccuracy on both training and testing data. For the standard model, the training loss starts off high and then sharply decreases as the model began to learn from the training data, showing an improvement in its ability to predict outcomes based on the input. The validation loss also begins high and then decreases as well. This shows that the model improved on unseen data, data it had not been trained on. However, the training and validation loss lines do not appear to converge, which might indicate the beginning of over-fitting, meaning that the model excelled on training data but acted poorly on data it had not seen, even though regularization techniques were used. In contrast, the training and validation losses for the LSTM-GA model seem to converge; this indicates that the model did not have over-fitting, excelling on both training data and unseen testing data. On a similar note, the Optimized LSTM-GA model showed the best performance as its losses are the lowest among the three and as its convergence seems to be the closest. Therefore, this configuration allows for the best generalization to unseen/new data, which is important since the model should perform efficiently under different conditions. Figure 7 represents an overlay of actual versus predicted values for the 300 sample indices across the Basic LSTM model and the LSTM-GA models, demonstrating the detection of GPS spoofing attacks in a UAV. The upper subplot shows results from the Basic LSTM model, where category values are represented by a blue dot for actual and by red crosses for  
Figure 6: A comparison of training and validation loss between the Basic LSTM model, the LSTM-GA model, and the Optimized LSTM-GA model. model predictions. In the lower subplot, the results obtained from the proposed Optimized LSTM model are presented; category values are portrayed, with green dots standing for actual values and with yellow crosses standing for the predictions. From these plots, one can observe that, compared to those of the Basic model, the LSTM-GA model's predicted values are very close to the actual values. As seen in the upper plot, the predictions often deviate from the actual values, which indicates high rates of false positives and negatives because the red crosses are not very well aligned with the blue dots in the peaks and troughs. Misalignment in UAV operations can pose significant security risks, especially when a model fails to detect GPS spoofing attacks. Malicious actors can exploit this vulnerability to hijack a UAV. For instance, attackers can transmit false GPS signals to manipulate the UAV's navigation system, redirecting it to a predetermined location without the operator's knowledge. This can lead to the UAV being used for unauthorized surveillance, data theft, or even physical attacks. In military or mission-critical applications, such breaches could compromise sensitive missions, exposing critical information or putting public safety at risk. In commercial or civilian contexts, hijacked UAVs could disrupt operations, deliver harmful payloads, or violate privacy by collecting unauthorized data. These security risks underscore the critical need for accurate and reliable GPS spoofing detection systems to prevent unauthorized access and ensure the integrity of UAV operations.