A lightweight intrusion detection method for IoT based on deep learning and dynamic quantization

Zhendong Wang, Hui Chen, Shuxin Yang, Xiao Luo, Dahai Li, Junling WangPeerJ Comput. Sci 2023 · DOI

TL;DR

This paper introduces a lightweight intrusion detection system (DL-BiLSTM) for the Internet of Things (IoT) that combines deep neural networks (DNNs) and bidirectional long short-term memory (BiLSTM) networks. By employing incremental principal component analysis (IPCA) for dimensionality reduction and dynamic quantization for model compression, the method achieves high detection accuracy while significantly reducing computational resources, making it suitable for resource-constrained IoT devices.

What Problem Does This Paper Address?

The Internet of Things (IoT) is rapidly expanding, offering numerous applications across various industries. However, this widespread adoption also introduces significant security vulnerabilities. IoT devices are often resource-constrained, with limited computing power and storage, making it challenging to deploy traditional, resource-intensive intrusion detection systems (IDS). Existing deep learning-based IDS, while effective, are often too complex for these devices. This paper addresses the critical need for an IDS that can provide robust protection against sophisticated network attacks on IoT devices without overwhelming their limited resources.

Methods

The proposed DL-BiLSTM model integrates two key neural network architectures:

  • Deep Neural Networks (DNNs): Used for nonlinear feature extraction. DNNs can learn complex patterns in data through multiple nonlinear transformations, enhancing the model's ability to capture intricate network behaviors.
  • Bidirectional Long Short-Term Memory (BiLSTM) Networks: Employed for extracting long-distance dependent information from network traffic in both forward and backward directions. This helps in understanding sequential patterns and dependencies in network data.

To address the resource constraints of IoT devices, the authors incorporate two main techniques:

  • Incremental Principal Component Analysis (IPCA): This algorithm is used for feature dimensionality reduction. Unlike traditional PCA, IPCA can incrementally learn data features, making it more suitable for real-time monitoring of network traffic where data is not available all at once. It helps in reducing noise and redundant information, leading to a more efficient model.
  • Dynamic Quantization: This technique compresses the model by reducing the bit-width of model parameters (e.g., from 32-bit floating-point to 8-bit integer). The paper specifically uses post-training dynamic quantization, which converts weights to int8 and activations to int8. This significantly reduces model size and computational requirements without a substantial loss in detection accuracy, making the model lightweight and suitable for deployment on IoT devices.

Additionally, the Optuna optimization framework is used to tune hyperparameters like batch size, learning rate, and weight decay, ensuring the model reaches its optimal performance.

Datasets

The proposed model was evaluated on three widely recognized public datasets for IoT intrusion detection:

  • CIC IDS2017: A dataset containing network traffic characteristics captured over a five-day period, covering various attack scenarios.
  • N-BaIoT: A dataset generated by infecting Linux-based commercial IoT devices with common IoT botnets (BASHLITE and Mirai), designed to simulate realistic IoT network attack environments.
  • CICIoT2023: A recent dataset featuring a diverse set of topologies and 105 authentic IoT devices, designed to emulate IoT deployments in smart home environments.

Key Insights and Ideas

  • Synergy of DNN and BiLSTM: Combining DNNs for nonlinear feature extraction with BiLSTMs for temporal sequence understanding creates a more powerful feature representation than either model alone.
  • IPCA for Real-time Efficiency: The choice of IPCA over traditional PCA is crucial for IoT environments where data streams in continuously, allowing for efficient dimensionality reduction without needing the entire dataset upfront.
  • Dynamic Quantization as a Lightweighting Strategy: Post-training dynamic quantization proves effective in significantly reducing model size and computational load, a critical factor for IoT deployment, while maintaining high accuracy.
  • Trade-offs in Model Complexity: While integrating DNN and BiLSTM enhances feature extraction, it increases model complexity. The paper demonstrates that IPCA and dynamic quantization effectively mitigate this challenge.

Key Results

The DL-BiLSTM model demonstrated superior performance across the evaluated datasets:

  • CIC IDS2017: Achieved an accuracy of 0.9967, precision of 0.9954, recall of 0.9967, and F1-score of 0.9959, outperforming other models in terms of detection accuracy and exhibiting the shortest inference time.
  • N-BaIoT: Achieved an outstanding accuracy of 0.9998, precision of 0.9998, recall of 0.9998, and F1-score of 0.9998, significantly outperforming other methods.
  • CICIoT2023: Achieved an accuracy of 0.9313, precision of 0.9180, recall of 0.9313, and F1-score of 0.9194, showing competitive performance and the shortest training and inference time compared to CNN.

Furthermore, the model exhibited a significantly smaller model size and lower computational complexity compared to other deep learning models across all three datasets. For instance, on the CIC IDS2017 dataset, the DL-BiLSTM model's complexity was reduced by 85.97% compared to the DNN model.

Limitations and Future Work

The authors acknowledge a few limitations:

  • Post-training Dynamic Quantization: This method might not fully restore the optimal detection state of the original model and can increase the number of intrusion detection steps.
  • Experimental Design vs. Real-world IoT: The experimental setup of the intrusion detection dataset cannot perfectly replicate the complex and dynamic nature of real-world IoT network environments, potentially limiting the model's generalizability.

For future work, the authors propose:

  • Investigating advanced quantization techniques to integrate model quantization into the training process, aiming to improve overall effectiveness and restore detection performance.
  • Broadening the dataset scope in future research to include a wider variety of IoT devices and real network scenarios to enhance the model's generalizability.

Summary updated

BibTeX
@article{wang2023lightweight,
  author = {Zhendong Wang and Hui Chen and Shuxin Yang and Xiao Luo and Dahai Li and Junling Wang},
  title = {{A lightweight intrusion detection method for IoT based on deep learning and dynamic quantization}},
  journal = {PeerJ Comput. Sci.},
  year = {2023},
  doi = {10.7717/peerj-cs.1569},
}
Figure