# Toward Generative AI-Based Intrusion Detection Systems for the Internet of Vehicles (IoV)
## 4 Generative AI-Based IDS for IoV
[74] introduced an innovative model that combines a CAN communication matrix with image-based GANs to detect tampering in CAN signals. This method reduces false positives by categorizing messages into different transmission types and constructing images using consecutive messages from the same ID. However, it requires complex preprocessing and is dependent on ID-specific analysis. Further, [PERSON] et al. [75] proposed a two-stage IDS using an Auxiliary Classifier GAN (ACGAN), where the first stage classifies known attacks into categories, and the second stage handles out-of-distribution (unknown) samples. This approach demonstrated high classification accuracy with minimal computational cost, making it suitable for real-time use in embedded systems. Another Generative AI technique is Transformers, which have shown significant promise in intrusion detection for IoV, making several researchers adopt them to build intelligent IDS models to enhance detection performance and adaptability. To begin with, [PERSON]. [76] presents a transformer-based attention network as an innovative IDS for CAN buses in vehicles. Driven by the urgent need to address CAN protocol vulnerabilities, this method leverages self-attention mechanisms for efficient multi-class classification of attacks, such as replay attacks. Furthermore, it employs transfer learning to improve detection performance, especially on small datasets from different car models. In a similar vein, Ref. [77] introduces the MFVT model, an anomaly traffic detection system combining a feature fusion network with a vision transformer architecture. Although it does not explicitly mention Generative AI, this approach significantly improves intrusion detection by accurately identifying suspicious network behaviors, thereby safeguarding network integrity and reducing potential economic losses. Notably, the transformer encoder's multi-head attention mechanism allows the model to focus on different parts of the input \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**GAI Technique** & **Ref** & **Main Approach** & **Detection Target** & \begin{tabular}{c} **Network** \\ **Focus** \\ \end{tabular} & **Performance Summary** & **Strengths and Limitations** \\ \hline \multirow{8}{*}{AEs} & [89] & AE + MLP & DDoS attacks & V2X & Acc: 98.34\% & High accuracy and F1 score \\  & & & & F1: 98.18\% & Limited to DDoS \\ \cline{2-6}  & \multirow{4}{*}{[90]} & Multiple & CAN bus & & Acc: 97\% & Good accuracy with \\  & & LSTM-AEs & anomalies & IVN & F1: 0.98 & dynamic data \\  & & & & Latency: 0.5 ms & Limited to CAN protocol \\  & \multirow{2}{*}{[91]} & Conv-AE + GAN & \multirow{2}{*}{\begin{tabular}{c} General \\ supervised \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} General \\ intrusions \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} IVN \\ intrusions \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} FI: 99.84\% \\ Latency: 0.63 ms (GPU), \\ 0.69 ms (CPU) \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} Strong detection accuracy \\ High training complexity \\ \end{tabular} } \\  & Denoising AE + & \multirow{2}{*}{\begin{tabular}{c} Real-time \\ Anomalies \\ \end{tabular} } & \multirow{2}{*}{\
\begin{tabular}{c} IVN \\ \end{tabular} } & \multirow{2}{*}{
\begin{tabular}{c} — Robust and generalizable \\ Compared only to traditional \\ ML methods \\ \end{tabular} } \\  & & & & & \\ \hline \hline \end{tabular}  
* Acc—Accuracy; F1—F1-score; Lat—Latency; FPR—False Positive Rate; FNR—False Negative Rate; FAR—False Alarm Rate; EER—Equal Error Rate. “—” indicates that the metric was not specified in the referenced study.  
\end{table} 
Table 7: _Cont._data concurrently. However, it sometimes struggles to capture long-range dependencies due to limitations in the self-attention mechanism. Likewise, Ref. [78] proposes CAN-Former IDS, a Transformer-based model that predicts anomalies in CAN communications, considering both ID sequences and message payload values.