A deep learning approach for intrusion detection in Internet of Things using focal loss function
Ayesha S. Dina,A.B. Siddique,D. Manivannan
DOI: https://doi.org/10.1016/j.iot.2023.100699
IF: 5.711
2023-07-01
Internet of Things
Abstract:Internet of Things (IoT) is likely to revolutionize healthcare, energy, education, transportation, manufacturing, military, agriculture, and other industries. However, for the successful deployment of IoT in various industries, methods for detecting and preventing security breaches need to be designed and implemented. Over the past decade, a number of researchers in academia and industry have used Machine Learning (ML) techniques to design and implement Intrusion Detection Systems (IDSes) for computer networks in general; however, not much work has been done for intrusion detection in IoT. Datasets collected by various organizations were used by many of these researchers to train ML models for predicting intrusions. It is common for datasets used in such systems to be imbalanced (i.e., not all classes have equal number of samples). Predictive models developed using machine learning algorithms can produce unsatisfactory results if imbalanced datasets are used for training the models. To remedy this problem, techniques such as random oversampling and undersampling do not produce robust models. Furthermore, ML models trained using traditional loss functions, such as cross-entropy loss, fail to accurately predict minority class instances. To overcome the data imbalance problem for intrusion detection in IoT, we leverage the specialized loss function, called focal loss, that automatically down-weighs easy examples and focuses on the hard negatives by facilitating dynamically scaled-gradient updates for training effective ML models. We implemented our approach using two well-known Deep Learning (DL) neural network architectures. We conducted extensive experimental evaluations using three datasets from diverse IoT domains and compared our proposed approach with state-of-the-art intrusion detection models. We found that, our approach (training DL models using focal loss function) performed better with respect to accuracy, precision, F 1 score and MCC score by as much as 24%, 39%, 39%, and 60%, respectively, compared to training them on the same datasets using cross-entropy loss function. We also compare our approach with two other state-of-the-art approaches and show that our approach performs better than these state-of-the-art approaches.