# Knowledge Distillation-Based GPS Spoofing Detection for Small UAV
## 6 Evaluation
### Lightweight Detection  
With the TS model, we obtained distilled modeling for lightweight detection. To transfer to another platform easily, we used a neural network (NN) as a student model to obtain a lightweight network. With the survey investigation [42], we set the balance factor, \(\alpha\), as 0.45. The parameter of the NN is shown in Table 2.  
Figure 5: RNN-based GPS spoofing detection.  
With the benign flight data, we distilled the LSTM, GRU, and RNN models into NN models and predicted the GPS data with time sequences. The model parameters of the LSTM, GRU, and RNN are listed in Table 3. After distillation, we evaluated the distilled models with the previous experiments. Each of the distilled models is implemented to detect the spoofing point. The results are shown in Figure 6, which includes three sub-figures (a), (b), and (c). Figure 5(a)-c are the results of the LSTM-distilled NN, GRU-distilled NN, and RNN-distilled NN, respectively.  
Figure 5(a) is the result of the LSTM-distilled NN detection. The result shows that the LSTM-distilled NN has good stability for the GPS localization prediction, which can maintain a similar stability to the LSTM in a small UAV's flight control. The spoofing detection point is at the timestamp 374727138, which is later than in the LSTM-based detection. However, the detection of the LSTM-distilled NN can still help the small UAV find the spoofing attacks successfully. Due to its lightweight characteristics, the LSTM-distilled NN may be implemented on compact platforms that have constraints on computational resources.  
Figure 5(b) is the result of the GRU-distilled NN detection. Generally, the GRU-distilled NN has similar capabilities for maintaining stable flight control of the small UAV. However, we found that the GPS spoofing detection point (timestamp: 375735466) is far later than in the LSTM-distilled NN model. From Figure 5(b), we can see that the trajectory of the GPS  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Models** & **LSTM** & **GRU** & **RNN** \\ \hline Model Size & 72.7 kb & 57.8 kb & 27.7 kb \\ NN Model Size & 3.0 kb & 3.0 kb & 3.0 kb \\ NN Model Overhead & 266.88 Mb & 266.88 Mb & 266.88 Mb \\ Overhead & 390.37 Mb & 391.29 Mb & 389.84 Mb \\ Learning Rate & 0.001 & 0.001 & 0.001 \\ Balance Factor & 0.45 & 0.45 & 0.45 \\ Model Reduced & 95.74\% & 94.80\% & 89.17\% \\ Overhead Reduced & 31.63\% & 31.79\% & 31.54\% \\ \hline \hline \end{tabular}
\end{table}
Table 3: Parameters of the distilled models.  
Figure 5: KD-based GPS spoofing detection.  
Figure 6: KD-based GPS spoofing detection.  
Figure 6c is the result of the RNN-distilled NN detection. Different from the LSTM-distilled NN and GRU-distilled NN, the RNN-distilled NN has weak performance in maintaining the stable flight control of the small UAV. We can see that the GPS location prediction of the RNN-distilled NN model still has sharp fluctuations. At the same time, the GPS spoofing detection point (timestamp: 377731032) is far later than the LSTM-distilled NN and GRU-distilled NN models. From Figure 6b, we can see that the trajectory of the GPS has already fluctuated sharply by this point, so it is not capable of defending against the spoofing attack.  
In summary, compared with the GRU-distilled NN and RNN-distilled NN models, the LSTM-distilled NN has more potential to be implemented on compact platforms.