# AI-Driven Safety and Security for UAVs: From Machine Learning to Large Language Models
## 3 AI for UAV Safety
### Lessons Learned
To be more specific, on the software side, LLMs serve as high-level planners, translating natural language instructions into actionable flight tasks, such as generating 3D waypoints for trajectory planning or coordinating multi-UAV formations [13]. They also process sensor data for real-time decision-making, enabling anomaly detection and secure communication in distributed frameworks [141]. On the hardware side, LLMs are deployed across onboard computers, edge servers with high-performance GPUs, or cloud-based servers, depending on computational demands. For instance, complex tasks like generating emergency response reports in traffic incident scenarios leverage cloud resources [161], while onboard systems handle lighter language processing. LLMs, unlike traditional ML models, offer superior contextual understanding by processing sensor data through optimized frameworks to enhance UAV autonomy [155]. This flexible integration of LLMs with UAV hardware and software significantly boosts autonomy, safety, and user interaction, revolutionizing intelligent aerial systems. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Physical Safety** & **Battery Safety** & \begin{tabular}{c} **Sensor** \\ **Smoofing** \\ **Detection** \\ \end{tabular} & \begin{tabular}{c} **Collision** \\ **Avoidance and** \\ **Path Planning** \\ \end{tabular} & \begin{tabular}{c} **Flight** \\ **Control** \\ \end{tabular} \\ \hline \begin{tabular}{c} **Lack of** \\ **Datasets** \\ \end{tabular} & ✓ & ✓ & ✓ & ✓ & \\ \hline \begin{tabular}{c} **Generalizability** \\ **Issues** \\ \end{tabular} & ✓ & ✓ & ✓ & ✓ & ✓ \\ \hline \begin{tabular}{c} **Limited** \\ **Accuracy** \\ \end{tabular} & ✓ & ✓ & ✓ & & ✓ \\ \hline \begin{tabular}{c} **Sensitivity to** \\ **Adversarial** \\ **Attacks** \\ \end{tabular} & & & ✓ & & ✓ \\ \hline \begin{tabular}{c} **Scalability** \\ **Issues** \\ \end{tabular} & & ✓ & & ✓ \\ \hline \begin{tabular}{c} **Low** \\ **Adaptability** \\ \end{tabular} & & ✓ & & \\ \hline \begin{tabular}{c} **Lack of** \\ **Hardware** \\ **Solution** \\ \end{tabular} & & & ✓ & \\ \hline \begin{tabular}{c} **Low** \\ **Interpretability** \\ \end{tabular} & & ✓ & & \\ \hline \
\begin{tabular}{c} **Unstandardized** \\ **and Highly** \\ **Diverse Data** \\ \end{tabular} & ✓ & & & \\ \hline
\begin{tabular}{c} **Low Optimization** \\ **Search** \\ **Efficiency** \\ \end{tabular} & ✓ & & ✓ \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Limitations of traditional AI models in UAV safety. First, despite the limited airborne processing capacity and energy of UAVs, applying LLMs to identify complex objects and dynamic paths poses significant challenges, especially in intricate and rapidly shifting environments. For example, in dense urban settings with moving vehicles and fluctuating obstacles, unpredictable wilderness areas with variable terrain and weather, or contested zones with adversarial UAVs and jamming, LLMs must process real-time data to detect objects such as birds or debris and compute adaptive flight paths. However, advancements in model compression technologies such as pruning, quantization, and knowledge distillation have led to high-performance lightweight LLMs such as DeepSeek-R1 and Qwen. When paired with AI accelerators such as NVIDIA Jetson TX2, these models can be deployed locally on UAVs, efficiently handling such dynamic scenarios. Second, while traditional AI models, such as battery health prediction systems, rely on large, high-quality datasets for training, LLMs can extract general feature representations from broad data and fine-tune with minimal specific data, reducing data needs. This adaptability  
Figure 12: LLMs for UAV Safety. In physical safety design, LLMs can be deployed in the cloud or onboard for analyzing multimodal data [106] to optimize material choices [108] and structural designs, dynamically adjusting flight parameters for real-time stability [107].