Submitted:
23 March 2026
Posted:
24 March 2026
You are already at the latest version
Abstract

Keywords:
1. Introduction
- 1.
- We demonstrate the limitations of statistical CAN intrusion detection methods under cross-attack evaluation scenarios.
- 2.
- We propose a lightweight feature extraction framework combining statistical, structural, and graph-based representations of CAN communication behavior.
- 3.
- We evaluate the robustness of the proposed approach across multiple machine learning classifiers.
- 4.
- We show that relational communication modeling significantly improves detection robustness compared with purely statistical traffic descriptors.
- 5.
- We conduct a window size sensitivity analysis demonstrating that the proposed framework maintains stable detection performance across window sizes ranging from 50 to 500 CAN frames, validating the robustness of the approach to this hyperparameter choice.
- 2.
- Related Work
1.1. Statistical CAN Intrusion Detection
1.2. Machine Learning-Based CAN IDS
1.3. Deep Learning Approaches
1.4. Structural Modeling of CAN Traffic
1.5. Graph-Based Intrusion Detection
2. Theoretical Motivation for Structural Modeling
2.1. Structural Transition Modeling
2.2. Graph-Based Communication Topology

2.3. Stability Hypothesis
- 4.
-
MethodologyThe overall architecture of the proposed intrusion detection framework is illustrated in Figure 2. The system processes raw CAN traffic logs and converts them into structured feature representations through several processing stages. First, CAN frames are segmented into sliding windows to capture short-term communication patterns. For each window, statistical traffic descriptors, structural identifier transition features, and graph topology features are extracted.These feature representations are then combined into a unified feature vector and used as input to the detection model. The model learns to distinguish between normal and malicious communication patterns based on these multi-level representations.

2.4. Sliding Window Representation
2.5. Statistical Features
- Mean inter-arrival time
- Standard deviation of inter-arrival time
- Unique identifier ratio
- Payload mean
- Payload variance
- Mean DLC value
- DLC variance
- Identifier entropy
2.6. Structural Transition Features
2.7. Graph Topology Features
- Graph density
- Average node degree
- Maximum node degree
- Degree entropy
2.8. Computational Complexity
- Statistical feature extraction: 0.12 ms per window
- Structural transition features: 0.18 ms per window
- Graph topology features: 0.25 ms per window
3. Experimental Setup
- 1.
- Robustness against various types of attacks
- 2.
- Transferability to other data sets
- 3.
- Contribution of structural and graph based features
3.1. Datasets
- 1.
- HCRL Car-Hacking Dataset
- Denial-of-Service (DoS) attacks
- Fuzzy attacks
- Gear spoofing attacks
- RPM spoofing attacks
- 2.
- ROAD Dataset
- Fuzzing attacks
- Correlated signal attacks
- Speedometer manipulation attacks
3.2. Evaluation Metrics
- 1.
- ROC-AUC
- 2.
- Area Under the Precision-Recall Curve (PR-AUC)
- 3.
- Recall
3.3. Experimental Protocol
3.4. Implementation Details
4. Results
- Statistical features
- Structural transition features
- Graph-enhanced hybrid features
4.1. Cross-Attack Evaluation


4.2. Cross-Dataset Evaluation
4.3. Ablation Study
| Feature Representation | ROC-AUC |
|---|---|
| Statistical | 0.01165 |
| Structural | 0.99955 |
| Graph | 0.71520 |
| Hybrid | 0.99880 |

4.4. Comparison with Prior Work
5. Discussion
5.1. Analysis of Speedometer Attack Detection
5.2. Analysis of Fuzzing Attack Detection Under Cross-Dataset Transfer
6. Implications for Automotive Cybersecurity
6.1. Rethinking Feature Design in CAN Intrusion Detection
6.2. Deployment in Resource-Constrained Automotive Environments
6.3. Cross-Dataset Generalization and Real-World Deployment
6.4. Broader Security Implications
7. Limitations

8. Threats to Validity
9. Conclusions
References
- Wang, W.; Guo, K.; Cao, W.; Zhu, H.; Nan, J.; Yu, L. Review of Electrical and Electronic Architectures for Autonomous Vehicles: Topologies, Networking and Simulators. Automotive Innovation 2024, 7, 82–101. [Google Scholar] [CrossRef]
- Anwar, A.S.; Anwar, A.; Moukahal, L.J.; Zulkernine, M.; Moukahal, L.; Zulkernine, M. Security assessment of in-vehicle communication protocols. Vehicular Communications 2023, 44, 100639. [Google Scholar] [CrossRef]
- Rai, R.; Grover, J.; Sharma, P.; Pareek, A. Securing the CAN bus using deep learning for intrusion detection in vehicles. Scientific Reports 2025, 15, 13820. [Google Scholar] [CrossRef] [PubMed]
- Rai, R.; Grover, J.; Sharma, P.; Pareek, A. Securing the CAN bus using deep learning for intrusion detection in vehicles. Scientific Reports 2025, 15, 13820. [Google Scholar] [CrossRef]
- Tron, A.D.F.; Longari, S.; Carminati, M.; Polino, M.; Zanero, S. CANflict. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security, 2022; pp. 711–723. [Google Scholar] [CrossRef]
- El-Fatyany, A.; Wang, X.; Li, L.; Ren, K. EF-IDS: An efficient intrusion detection system with enriched features for CAN bus in modern vehicles. Journal of Systems Architecture 2025, 171, 103646. [Google Scholar] [CrossRef]
- Radivilova, T.; Kirichenko, L.; Alghawli, A.S.; Ageyev, D.; Mulesa, O.; Baranovskyi, O.; Ilkov, A.; Kulbachnyi, V.; Bondarenko, O. Statistical and Signature Analysis Methods of Intrusion Detection. Lecture notes on data engineering and communications technologies 2022, 115–131. [Google Scholar] [CrossRef]
- Ennaji, S.; De Gaspari, F.; Hitaj, D.; Kbidi, A.; Mancini, L.V. Adversarial Challenges in Network Intrusion Detection Systems: Research Insights and Future Prospects. IEEE Access 2025, 13, 148613–148645. [Google Scholar] [CrossRef]
- Jia, H.; Xiong, X.; Luo, H.; Cao, Y. Driveshield: Unmasking stealthy attacks on CAN bus via adversarial spatiotemporal feature learning. Journal of King Saud University - Computer and Information Sciences 2025, 37. [Google Scholar] [CrossRef]
- Lin, H.; Yu, X.; Chen, Z.; Cao, Y. RAG-HIDS: A multi-relational graph-based hierarchical intrusion detection system for in-vehicle networks. Ad Hoc Networks 2025, 183, 104108. [Google Scholar] [CrossRef]
- Lin, X.; Ma, B.; Wang, X.; Yu, G.; He, Y.; Liu, R.P.; Ni, W. ByCAN: Reverse Engineering Controller Area Network (CAN) Messages From Bit to Byte Level. IEEE Internet of Things Journal 2024, 11, 35477–35491. [Google Scholar] [CrossRef]
- Lin, H.; Yu, X.; Chen, Z.; Cao, Y. RAG-HIDS: A multi-relational graph-based hierarchical intrusion detection system for in-vehicle networks. Ad Hoc Networks 2025, 183, 104108. [Google Scholar] [CrossRef]
- Donadel, D.; Balasubramanian, K.; Brighente, A.; Cleaveland, R.; Conti, M.; Poovendran, R. CANTXSec: A Deterministic Intrusion Detection and Prevention System for CAN Bus Monitoring ECU Activations. Lecture notes in computer science 2025, 429–458. [Google Scholar] [CrossRef]
- Ye, P.; Liang, Y.; Bie, Y.; Qin, G.; Song, J.; Wang, Y.; Liu, W. GDT-IDS: Graph-based decision tree intrusion detection system for controller area network. The Journal of Supercomputing 2025, 81. [Google Scholar] [CrossRef]
- Longari, S.; Cerracchio, P.; Carminati, M.; Zanero, S. Assessing the Resilience of Automotive Intrusion Detection Systems to Adversarial Manipulation. ACM Transactions on Cyber-Physical Systems 2025, 9, 1–27. [Google Scholar] [CrossRef]
- Rimal, Y.; Sharma, N.; Paudel, S.; Alsadoon, A.; Koirala, M.; Gill, S. Comparative analysis of heart disease prediction using logistic regression, SVM, KNN, and random forest with cross-validation for improved accuracy. Scientific Reports 2025, 15, 13444. [Google Scholar] [CrossRef]
- Liu, C.; Dong, Y.; Xiang, W.; Yang, X.; Su, H.; Zhu, J.; Chen, Y.; He, Y.; Xue, H.; Zheng, S. A Comprehensive Study on Robustness of Image Classification Models: Benchmarking and Rethinking. International Journal of Computer Vision 2024, 133, 567–589. [Google Scholar] [CrossRef]
- Debicha, I.; Bauwens, R.; Debatty, T.; Dricot, J.; Kenaza, T.; Mees, W. TAD: Transfer learning-based multi-adversarial detection of evasion attacks against network intrusion detection systems. Future Generation Computer Systems 2022, 138, 185–197. [Google Scholar] [CrossRef]
- Cerezo, M.; Arrasmith, A.; Babbush, R.; Benjamin, S.C.; Endo, S.; Fujii, K.; McClean, J.R.; Mitarai, K.; Yuan, X.; Cincio, L. Variational quantum algorithms. Nature Reviews Physics 2021, 3, 625–644. [Google Scholar] [CrossRef]
- Saravanan, R.; Balaji, S.; Ganesan, M.; Braveen, M.; Perumal, R.S. Optimal attention deep learning based in-vehicle intrusion detection and classification model on CAN messages. Scientific Reports 2025, 15, 33952. [Google Scholar] [CrossRef]
- Saravanan, R.; Balaji, S.; Ganesan, M.; Braveen, M.; Perumal, R.S. Optimal attention deep learning based in-vehicle intrusion detection and classification model on CAN messages. Scientific Reports 2025, 15, 33952. [Google Scholar] [CrossRef]
- Dash, N.; Chakravarty, S.; Rath, A.K.; Giri, N.C.; AboRas, K.M.; Gowtham, N. An optimized LSTM-based deep learning model for anomaly network intrusion detection. Scientific Reports 2025, 15, 1554. [Google Scholar] [CrossRef]
- Shahriar, M.H.; Xiao, Y.; Moriano, P.; Lou, W.; Hou, Y.T. CANShield: Deep-Learning-Based Intrusion Detection Framework for Controller Area Networks at the Signal Level. IEEE Internet of Things Journal 2023, 10, 22111–22127. [Google Scholar] [CrossRef]
- Alzubaidi, L.; Zhang, J.; Humaidi, A.J.; Al-Dujaili, A.Q.; Duan, Y.; Al-Shamma, O.; Santamaría, J.; Fadhel, M.A.; Al-Amidie, M.; Farhan, L. Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. Journal Of Big Data 2021, 8, 53. [Google Scholar] [CrossRef] [PubMed]
- Kumar, L.K.S.; Nethi, S.R.; Uyyala, R.; Vurubindi, P.; Narahari, S.C.; Das, A.K.; V.B., K.; Alenazi, M.J.F. Anomaly-based intrusion detection on benchmark datasets for network security: A comprehensive evaluation. Scientific Reports 2026, 16. [Google Scholar] [CrossRef] [PubMed]
- Yin, T.; Naqvi, S.A.R.; Nandanoori, S.P.; Kundu, S. Advancing Cyber-Attack Detection in Power Systems: A Comparative Study of Machine Learning and Graph Neural Network Approaches. 2024 Resilience Week (RWS) 2024, 1–9. [Google Scholar] [CrossRef]
- Zola, F.; Medina, J.A.; Venturi, A.; Gil, A.; Orduna-Urrutia, R. A Graph Machine Learning Approach for Detecting Topological Patterns in Transactional Graphs. ArXiv.org 2025. [Google Scholar] [CrossRef]
- Lin, H.; Yu, X.; Chen, Z.; Cao, Y. RAG-HIDS: A multi-relational graph-based hierarchical intrusion detection system for in-vehicle networks. Ad Hoc Networks 2025, 183, 104108. [Google Scholar] [CrossRef]
- Ahmed, U.; Nazir, M.; Sarwar, A.; Ali, T.; Aggoune, E.M.; Shahzad, T.; Khan, M.A. Signature-based intrusion detection using machine learning and deep learning approaches empowered with fuzzy clustering. Scientific Reports 2025, 15, 1726. [Google Scholar] [CrossRef]
- Pollicino, F.; Stabili, D.; Marchetti, M. Performance Comparison of Timing-Based Anomaly Detectors for Controller Area Network: A Reproducible Study. ACM Transactions on Cyber-Physical Systems 2023, 8, 1–24. [Google Scholar] [CrossRef]
- Pollicino, F.; Stabili, D.; Marchetti, M. Performance Comparison of Timing-Based Anomaly Detectors for Controller Area Network: A Reproducible Study. ACM Transactions on Cyber-Physical Systems 2023, 8, 1–24. [Google Scholar] [CrossRef]
- Yu, H.; Yang, W.; Cui, B.; Sui, R.; Wu, X. Renyi entropy-driven network traffic anomaly detection with dynamic threshold. Cybersecurity 2024, 7. [Google Scholar] [CrossRef]
- de Heij, V.; Niazi, M.U.B.; Ahmed, S.; Johansson, K.H. Distributed Traffic State Estimation in V2X-Enabled Connected Vehicle Networks. ArXiv.org, 2025. [Google Scholar]
- Redhu, A.; Choudhary, P.; Srinivasan, K.; Das, T.K. Deep learning-powered malware detection in cyberspace: A contemporary review. Frontiers in Physics 2024, 12. [Google Scholar] [CrossRef]
- Kiflay, A.; Tsokanos, A.; Fazlali, M.; Kirner, R. Network intrusion detection leveraging multimodal features. Array 2024, 22, 100349. [Google Scholar] [CrossRef]
- Alharthi, A.M.; Alaryani, M.; Kaddoura, S. A comparative study of machine learning and deep learning models in binary and multiclass classification for intrusion detection systems. Array 2025, 26, 100406. [Google Scholar] [CrossRef]
- Lampe, B.; Meng, W. can-train-and-test: A curated CAN dataset for automotive intrusion detection. Computers & Security 2024, 140, 103777. [Google Scholar] [CrossRef]
- Jiang, W.; Zhang, T.; Liu, S.; Ji, W.; Zhang, Z.C.; Xiao, G. Exploring the Physical-World Adversarial Robustness of Vehicle Detection. Electronics 2023, 12, 3921. [Google Scholar] [CrossRef]
- Lampe, B.; Meng, W. can-train-and-test: A curated CAN dataset for automotive intrusion detection. Computers & Security 2024, 140, 103777. [Google Scholar] [CrossRef]
- Cantone, M.; Marrocco, C.; Bria, A. On the Cross-Dataset Generalization of Machine Learning for Network Intrusion Detection. In arXiv; Cornell University, 2024. [Google Scholar] [CrossRef]
- Taneja, A.; Kumar, G. Attention-CNN-LSTM based intrusion detection system (ACL-IDS) for in-vehicle networks. Soft Computing 2024, 28, 13429–13441. [Google Scholar] [CrossRef]
- Kumar, L.K.S.; Nethi, S.R.; Uyyala, R.; Vurubindi, P.; Narahari, S.C.; Das, A.K.; V.B., K.; Alenazi, M.J.F. Anomaly-based intrusion detection on benchmark datasets for network security: A comprehensive evaluation. Scientific Reports 2026, 16. [Google Scholar] [CrossRef]
- Zhao, J.; Wu, Y.; Deng, R.; Xu, S.; Gao, J.; Burke, A. A Survey of Autonomous Driving from a Deep Learning Perspective. ACM Computing Surveys 2025, 57, 1–60. [Google Scholar] [CrossRef]
- Munappy, A.R.; Bosch, J.; Olsson, H.H.; Arpteg, A.; Brinne, B. Data management for production quality deep learning models: Challenges and solutions. Journal of Systems and Software 2022, 191, 111359. [Google Scholar] [CrossRef]
- Saravanan, R.; Balaji, S.; Ganesan, M.; Braveen, M.; Perumal, R.S. Optimal attention deep learning based in-vehicle intrusion detection and classification model on CAN messages. Scientific Reports 2025, 15, 33952. [Google Scholar] [CrossRef]
- Bhatt, N.; Bhatt, N.; Prajapati, P.; Sorathiya, V.; Alshathri, S.; El-Shafai, W. A Data-Centric Approach to improve performance of deep learning models. Scientific Reports 2024, 14, 22329. [Google Scholar] [CrossRef]
- Ekundayo, O.; Ezugwu, A.E. Deep learning: Historical overview from inception to actualization, models, applications and future trends. Applied Soft Computing 2025, 181, 113378. [Google Scholar] [CrossRef]
- Hassija, V.; Chamola, V.; Mahapatra, A.; Singal, A.; Goel, D.; Huang, K.; Scardapane, S.; Spinelli, I.; Mahmud, M.; Hussain, A. Interpreting Black-Box Models: A Review on Explainable Artificial Intelligence. Cognitive Computation 2023, 16, 45–74. [Google Scholar] [CrossRef]
- Saeed, N.H.; Hamza, A.A.; Sobh, M.A.; Bahaa-Eldin, A.M. Efficient feature ranked hybrid framework for android Iot malware detection. Scientific Reports 2026, 16, 3726. [Google Scholar] [CrossRef]
| Dataset | Normal Samples | Attack Types |
|---|---|---|
| HCRL | CAN driving data | DoS, Fuzzy, Gear, RPM |
| ROAD | Real driving CAN logs | Fuzzing, Correlated, Speedometer |
| Method | Approach | Same-Dataset Performance | Cross-Attack Evaluated | Lightweight |
| Seo et al. (2018) GIDS | GAN-based | ~98–100% accuracy | No | No |
| Song et al. (2020) DCNN | Deep CNN | High accuracy (all attacks) | No | No (GPU required) |
| Hossain et al. (2020) | LSTM | High accuracy | No | No |
| Lo et al. (2022) HyDL-IDS | CNN + LSTM | ~100% accuracy | No | No |
| Proposed | Structural + Graph (RF) | ROC-AUC = 0.9968 | Yes | Yes |
| Train Attack | Test Attack | Statistical ROC-AUC | Structural ROC-AUC | Graph ROC-AUC | Hybrid ROC-AUC |
|---|---|---|---|---|---|
| DoS | Gear | 0.0132 | 0.9994 | 0.9988 | 0.9992 |
| DoS | RPM | 0.0088 | 0.9992 | 0.9970 | 0.9984 |
| Fuzzy | Gear | 0.0048 | 0.9993 | 0.4302 | 0.9990 |
| Fuzzy | RPM | 0.0145 | 0.9999 | 0.44334 | 0.9992 |
| Classifier | ROC-AUC | PR-AUC | Recall |
|---|---|---|---|
| Logistic Regression | 0.9988 | 0.9893 | 0.9878 |
| SVM | 0.9989 | 0.9655 | 0.9878 |
| Random Forest | 0.9968 | 0.9826 | 0.4939 |
| Gradient Boosting | 0.9946 | 0.9594 | 0.5183 |
| KNN | 0.9354 | 0.9879 | 0.6281 |
| Decision Tree | 0.5272 | 0.4848 | 0.0549 |
| Attack | Statistical ROC | Structural ROC | Graph+Hybrid ROC |
|---|---|---|---|
| Fuzzing | 0.62 | 0.62 | 0.63 |
| Correlated | 0.39 | 0.81 | 0.83 |
| Speedometer | 0.49 | 0.41 | 0.43 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.