A novel transformer-based explainable AI approach using SHAP for intrusion detection in vehicular ad hoc networks

Waqar Khan, Waqar Khan, Jawad Elsayed Ahmad, Nada Abdulaziz Alasbali, Alanoud Al Mazroa, Mohammed S. Alshehri, Muhammad Shahbaz Khan · Computer Networks · 2025

Vehicular ad hoc networks (VANETs)— a technology to connect autonomous vehicles to enhance the safety and decision-making on the road by enabling wireless communication and sharing of traffic information between sensors, vehicles, and other infrastructure. The dynamic nature of VANETs makes them vulnerable to several security threats, including false message attacks from within the network. Traditional misbehavior detection methods often fail in vehicular security due to the dynamic movement of vehicles. This research paper presents an efficient and accurate transformer-based approach for intrusion detection in VANETs to identify false positional information transmitted by misbehaving nodes and to analyze safety messages utilizing the Vehicular Reference Misbehavior (VeReMi) extension dataset. Moreover, the proposed approach utilises SHAP, an Explainable Artificial Intelligence (XAI) technique, to enhance model transparency by providing insights into feature importance, making the model’s predictions more interpretable and trustworthy for practical use in VANET environments. Performance analysis using both multi-class and binary classification demonstrates that the model outperforms various deep learning and machine learning-based intrusion detection systems, achieving 96.15% accuracy in multi-class and 98.28% in binary classification. The model excels in metrics like Accuracy, F1 Score, Recall, and Precision. In addition, the reliability parameters, i.e., Matthews Correlation Coefficient and Cohen’s Kappa coefficient, have been calculated to assess the quality of the classification and to measure the agreement between the predicted and original classifications, validating the model’s effectiveness in practical scenarios.

Read the paper · More papers on PaperTik