This is the code for the paper: "Continual Learning with Strategic Selection and Forgetting for Network Intrusion Detection" (Infocom 2025)
Xinchen Zhang, Running Zhao, Zhihan Jiang, Handi Chen, Yulong Ding, Edith C.H. Ngai, Shuang-hua Yang.
The project is implemented using PyTorch and has been tested on the following hardware and software configuration:
- Ubuntu 20.04 Desktop
- NVIDIA GeForce RTX 3090 GPUs
- CUDA, version = 11.7
- PyTorch, version = 1.13.1
- Anaconda3
To install the necessary libraries and dependencies, run the following command:
pip install -r requirements.txtWe tested the effectiveness of our proposed method on the NSL-KDD and UNSW-NB15 datasets. Preprocessed versions of these datasets are provided in this repository, allowing for immediate execution. The continuous attributes have been normalized, and categorical attributes have been one-hot encoded.
Here is two examples for each dataset (NSL-KDD and UNSW-NB15) of how to start training:
python ssf.py --dataset nsl --epochs 200 --epoch_1 20 --sample_interval 5000 --num_labeled_sample 50 --opt_old_lr 100 --opt_new_lr 8 --new_sample_weight 3python ssf.py --dataset unsw --epochs 200 --epoch_1 180 --sample_interval 20000 --num_labeled_sample 200 --opt_old_lr 24 --opt_new_lr 50 --new_sample_weight 60 If you find this code useful in your research, please cite:
@article{zhang2024continual,
title={Continual Learning with Strategic Selection and Forgetting for Network Intrusion Detection},
author={Zhang, Xinchen and Zhao, Running and Jiang, Zhihan and Chen, Handi and Ding, Yulong and Ngai, Edith CH and Yang, Shuang-Hua},
journal={arXiv preprint arXiv:2412.16264},
year={2024}
}