## 2 Related Works  
Machine learning is an intensively researched area within the broader field of artificial intelligence (AI), as it has been used in a variety of real-world applications, such as image identification, speech recognition, natural language processing, autonomous cars, attack detection, fraud detection, etc. [3]. In the research area of attack detection in VANETs, several solutions based on machine learning algorithms have been suggested. In what follows, we present the most recent studies that addressed attack detection in VANETs. In the paper [13], the authors propose a novel technique for detecting jamming in wireless networks within vehicles. They utilize unsupervised machine learning and introduce a new metric called variations of the relative speed (RSV) between the jammer's vehicle and the receiver's vehicle. Additionally, parameters from the wireless communication systems on the receiving vehicle are taken into account. By applying unsupervised learning through clustering, the proposed method effectively distinguishes intentional and unintentional jamming and identifies the unique characteristics associated with each jamming attack. The authors highlight the importance of relative speed and its variations in successful jamming detection. They also demonstrate that relying solely on conventional wireless receiver metrics from the physical and network layers, such as PDR, SINR, and RSSI, is insufficient for discriminating interference from deliberate jamming events or recognizing the specific traits of an attack. In another work [14], the objective is to analyze safety messages and detect false position information sent by misbehaving nodes. Machine learning (ML) techniques are applied to the VeReMi dataset to detect such misbehavior. The researchers consider the ML-based approach to be a practical and efficient method for identifying improper behavior in real-world VANET scenarios. The results indicate that SVM with normalization outperforms logistic regression with or without normalization. The goal of study [15] is to use machine learning to identify wormhole attacks in VANETs' multi-hop communication. The authors create a scenario of multi-hop communication using the AODV routing protocol on the NS3 simulator, employing mobility traces generated by the SUMO traffic simulator to replicate the attack in the VANET. The gathered traces are preprocessed to enable the model to learn about wormhole attacks, and then, K-NN and SVM algorithms are applied. The two machine learning techniques are evaluated in terms of detection accuracy for four different alert types. In [16], various machine learning techniques are employed to identify five different attacks: constant attack, random attack, constant offset attack, eventual attack, and random offset attack. Initially, binary classification methods are used to identify each attack individually. Subsequently, a novel method is developed for multi-classification of attacks. The accuracy obtained for each attack type varies depending on the machine learning algorithm used. The Random Forest technique achieves the highest accuracy in the case of the new multi-classification procedure. The VeReMi dataset is used for malicious node detection in VANETs. Another study [17] suggests a new machine learning approach that utilizes Random Forest and posterior detection based on coresets to enhance the performance of Intrusion Detection Systems (IDSs). The results show that, in comparison to conventional machine learning models utilized in related applications, the proposed model greatly increases detection accuracy. For attack classification in VANETs, a hybrid optimization-based Deep Maxout Network (DMN) is developed in [18]. The hybrid optimization approach is used for Cluster Head (CH) selection and routing operations. Feature selection is crucial for efficient classification, and the DMN is employed for attack classification with a new optimization approach. The optimization model based on the DMN improves routing performance, energy consumption, and trust metrics.