DAIRE: A lightweight AI model for real-time detection of Controller Area Network attacks in the Internet of Vehicles
The Internet of Vehicles (IoV) is advancing modern transportation by improving safety, efficiency, and intelligence. However, the reliance on the Controller Area Network (CAN) introduces critical security risks, as CAN-based communication is highly vulnerable to cyberattacks. Addressing this challenge, we propose DAIRE (Detecting Attacks in IoV in REal-time), a lightweight machine learning framework designed for real-time detection and classification of CAN attacks. DAIRE is built on a lightweight artificial neural network (ANN) where each layer contains N i = i × c neurons, with N i representing the number of neurons in the i th layer and c corresponding to the total number of attack classes. Other hyperparameters are determined empirically to ensure real-time operation. To support the detection and classification of various IoV attacks, such as Denial-of-Service , Fuzzy , and Spoofing , DAIRE employs the sparse categorical cross-entropy loss function and root mean square propagation for loss minimization. In contrast to more resource-intensive architectures, DAIRE leverages a lightweight ANN to reduce computational demands while still delivering strong performance. Experimental results on the CICIoV2024 and Car-Hacking datasets demonstrate DAIRE’s effectiveness, achieving an average detection rate of 99.88%, a false positive rate of 0.02%, and an overall accuracy of 99.96%. Furthermore, DAIRE significantly outperforms state-of-the-art approaches in inference speed, with a classification time of just 0.03 ms per sample. These results highlight DAIRE’s effectiveness in detecting IoV cyberattacks and its practical suitability for real-time deployment in vehicular systems, underscoring its vital role in strengthening automotive cybersecurity. • DAIRE Model: A compact ML model capable of real-time classification of CAN bus attacks within IoV environments, built using a lightweight Artificial Neural Network (ANN) architecture. • Lightweight Architecture: A simplified ANN design in which the number of neurons per layer is defined as Ni = i × c (where Ni denotes the neurons in layer i and c represents the number of classes). This formulation ensures computational efficiency while retaining strong performance. • Optimized Loss Function and Training: Implementation of Sparse Categorical Cross-Entropy (SCCE) for memory-efficient multinomial classification and the RMSprop optimizer for adaptive learning rate tuning, resulting in faster convergence. • Performance Results: The model attains an average detection rate of 99.88%, a false-positive rate of 0.02%, and an accuracy of 99.96% on the CICIoV2024 and Car-Hacking benchmark datasets. It surpasses existing techniques with a classification speed of 0.03 ms per sample. • Extensive Evaluation: The model is assessed across multiple attack categories using real-world datasets, confirming its robustness and broad applicability.
Authors
- Shahid Alam (ORCID: https://orcid.org/0000-0002-4080-8042)
- Ehab Tawfeek Alnfrawy
- Zahida Parveen (ORCID: https://orcid.org/0000-0002-3119-8051)
- AMINA JAMEEL
- Raza Uddin
- Adeela Ashraf
- Jamal Aqib
Institutions
- University of Ha'il (SA)
- Bahria University (PK)
Publication Details
- Journal
- Machine Learning with Applications
- Published
- 2026-02-03
- DOI
- https://doi.org/10.1016/j.mlwa.2026.100859
- Primary Topic
- Vehicular Ad Hoc Networks (VANETs)
- Type
- article
- Field-Weighted Citation Impact
- 0.00