ACRL is an advanced Network Intrusion Detection System (NIDS) project that utilizes ensemble deep learning, dynamic class weighting, and multi-dataset integration to achieve high-performance threat detection across various network environments.
- Ensemble Deep Learning: Combines ANN, CNN, RNN, and LSTM models with a meta-classifier (XGBoost/Logistic Regression) for robust predictions.
- Dynamic Class Weighting: Implements an adaptive weighting mechanism to handle class imbalance in real-time during training.
- Multi-Dataset Support: Integrated preprocessing and evaluation for major datasets:
- UNSW-NB15
- NSL-KDD
- CIC-IDS2017
- Bot-IoT
- MQTT-IoT
- CTU-13
- Advanced Preprocessing: Includes automated feature scaling (Robust/Standard), outlier handling (IQR), and dimensionality reduction.
The repository is organized into several functional components:
ann.py,cnn.py,rnn.py,lstm.py: Base implementations for deep learning models.GNN.py: Implementation of Graph Neural Networks for flow-based detection.aclr.py: The core Adaptive Class-weighted Resampling Learning framework.
aclr_KDD.py,aclr_IDS.py,aclr_Robust_new.py: Specialized training scripts for different datasets and normalization techniques.tuning_NB15.py,aclr_optuna_kdd.py: Hyperparameter optimization scripts using Optuna.
Preprocess.py: Core data cleaning and transformation pipeline.convert_*.py: Scripts to convert various dataset formats to a unified structure.merge_*.py: Data aggregation and merging utilities.
test.py: Comprehensive evaluation script for ensemble and base models.Valid.py: Validation script for model consistency.kdd_test_less_feature_new.py: Optimized testing script for reduced feature sets.
chart.py,picture.py,pie.py: Utilities for generating performance plots and distribution charts.structure_pic.py: Visualization for model architectures.
Install dependencies:
pip install -r requirements.txt- Preprocessing: Use
Preprocess.pyor specificconvert_*.pyscripts to prepare your data. - Training: Run
aclr.pyto start the ensemble training process with dynamic weighting. - Evaluation: Use
test.pyorkdd_test.pyto evaluate trained models on test sets.
To maintain repository efficiency, large data files (.csv, .npy, .pth > 100MB) are excluded via .gitignore. Please ensure datasets are stored locally in the root directory for scripts to function correctly.