This is the code for the paper entitled "A Transfer Learning and Optimized CNN Based Intrusion Detection System for Internet of Vehicles" published in IEEE International Conference on Communications (IEEE ICC), doi: 10.1109/ICC45855.2022.9838780.
- Authors: Li Yang and Abdallah Shami
- Organization: The Optimized Computing and Communications (OC2) Lab, ECE Department, Western University
This repository introduces how to use convolutional neural networks (CNNs) and transfer learning techniques to develop intrusion detection systems. Ensemble learning and hyperparameter optimization techniques are also used to achieve optimized model performance.
-
Another intrusion detection system development code using decision tree-based machine learning algorithms (Decision tree, random forest, XGBoost, stacking, etc.) can be found in: Intrusion-Detection-System-Using-Machine-Learning
-
A comprehensive hyperparameter optimization tutorial code can be found in: Hyperparameter-Optimization-of-Machine-Learning-Algorithms
Modern vehicles, including autonomous vehicles and connected vehicles, are increasingly connected to the external world, which enables various functionalities and services. However, the improving connectivity also increases the attack surfaces of the Internet of Vehicles (IoV), causing its vulnerabilities to cyber-threats. Due to the lack of authentication and encryption procedures in vehicular networks, Intrusion Detection Systems (IDSs) are essential approaches to protect modern vehicle systems from network attacks. In this paper, a transfer learning and ensemble learning-based IDS is proposed for IoV systems using convolutional neural networks (CNNs) and hyper-parameter optimization techniques. In the experiments, the proposed IDS has demonstrated over 99.25% detection rates and F1-scores on two well-known public benchmark IoV security datasets: the Car-Hacking dataset and the CICIDS2017 dataset. This shows the effectiveness of the proposed IDS for cyber-attack detection in both intra-vehicle and external vehicular networks.
- VGG16
- VGG19
- Xception
- Inception
- Resnet
- InceptionResnet
- Bagging
- Probability Averaging
- Concatenation
- Random Search (RS)
- Bayesian Optimization - Tree Parzen Estimator(BO-TPE)
- CAN-intrusion/Car-Hacking dataset, a benchmark network security dataset for intra-vehicle intrusion detection
- Publicly available at: https://ocslab.hksecurity.net/Datasets/CAN-intrusion-dataset
- Can be processed using the same code
- CICIDS2017 dataset, a popular network traffic dataset for intrusion detection problems
- Publicly available at: https://www.unb.ca/cic/datasets/ids-2017.html
For the purpose of displaying the experimental results in Jupyter Notebook, the sampled subset of the CAN-intrusion dataset is used in the sample code. The subsets are in the "data" folder.
- 1-Data_pre-processing_CAN.ipynb: code for data pre-processing and transformation (tabular data to images).
- 2-CNN_Model_Development&Hyperparameter Optimization.ipynb: code for the development and CNN models and their hyperparameter optimization.
- 3-Ensemble_Models-CAN.ipynb: code for the construction of three ensemble learning techniques.
Libraries
- Python 3.5+
- Keras 2.1.0+
- Tensorflow 1.10.0+
- OpenCV-python
- hyperopt
Please feel free to contact us for any questions or cooperation opportunities. We will be happy to help.
- Email: [email protected] or [email protected]
- GitHub: LiYangHart and Western OC2 Lab
- LinkedIn: Li Yang
- Google Scholar: Li Yang and OC2 Lab
If you find this repository useful in your research, please cite this article as:
L. Yang and A. Shami, "A Transfer Learning and Optimized CNN Based Intrusion Detection System for Internet of Vehicles," ICC 2022 - IEEE International Conference on Communications, 2022, pp. 2774-2779, doi: 10.1109/ICC45855.2022.9838780.
@INPROCEEDINGS{9838780,
author={Yang, Li and Shami, Abdallah},
booktitle={ICC 2022 - IEEE International Conference on Communications},
title={A Transfer Learning and Optimized CNN Based Intrusion Detection System for Internet of Vehicles},
year={2022},
pages={2774-2779},
doi={10.1109/ICC45855.2022.9838780}}