Sovereign 8s.is mirror of standardgalactic/6GNetworks
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-02-21 15:44:41 +03:00
__pycache__ feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
Data feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
model feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
performance_evaluator feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
results feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
.gitattributes feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
.gitignore feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
data_handler.py feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
feature_selection.py feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
ISSOA.py feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
model.py feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
README.md feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
reset_random.py feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
ROA.py feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
train.py feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00
utils.py feat: 6G IDS pipeline — ISSOA feature selection, MIX_LSTM model, ROA training, full evaluation 2026-02-21 15:44:41 +03:00

🛡️ Intrusion Detection Framework on 6G Networks (ToN-IoT)

This repository implements a Network Intrusion Detection System on 6G Networks using:

  • Data preprocessing & normalization
  • Feature selection using Improved Sparrow Search Optimizer (ISSOA)
  • Deep Learning model (MIX_LSTM)
  • Custom Rabbit Optimizer (ROA) for training
  • Performance evaluation with ROC, PR curves, and confusion matrix

The pipeline is designed for the ToN-IoT Network Dataset.


📂 Project Workflow

Raw Dataset
    ↓
Preprocessing & Encoding
    ↓
Feature Selection (ISSOA)
    ↓
Deep Learning Training (MIX_LSTM)
    ↓
Evaluation & Visualization

⚙️ Requirements

Python Version

Python >= 3.11.9

Install Dependencies

pip install numpy pandas matplotlib scikit-learn prettytable
pip install tensorflow keras
pip install Py_FS

📁 Project Structure

Data/
 ├── TON_IoT_Train_Test_Network.csv
 ├── preprocessed.csv
 ├── features_selected.csv
 └── ss.pkl

model/
results/
utils.py
model.py
ISSOA.py
ROA.py
train.py
data_handler.py
feature_selection.py
reset_random.py

🚀 Execution Steps

Follow the steps in order.


✅ Step 1 — Dataset Preprocessing

This step:

  • Loads ToN-IoT dataset
  • Cleans missing values
  • Encodes categorical columns
  • Normalizes using StandardScaler
  • Saves processed data

Run:

python data_handler.py

Output:

Data/preprocessed.csv

✅ Step 2 — Feature Selection using ISSOA

This stage selects optimal features using the Improved Sparrow Search Optimizer.

Run:

python feature_selection.py

Outputs:

Data/features_selected.csv
Data/selected_features.txt
Data/convergence_graph.jpg

✅ Step 3 — Model Training

Model Architecture:

  • MIX LSTM
  • Dense Softmax Classifier
  • Rabbit Optimizer (ROA)

Run:

python train.py

Training performs:

  • Standard scaling
  • Train/Test split
  • Model checkpointing
  • Metrics plotting

Outputs:

model/model.h5
model/accuracy.png
model/loss.png

results/train/
results/test/

📊 Evaluation Outputs

Generated automatically:

  • Confusion Matrix
  • ROC Curve
  • Precision-Recall Curve
  • Class-wise Metrics CSV

Location:

results/train/
results/test/

🔁 Reproducibility

Random seed control is handled by:

reset_random.py

Ensures deterministic runs.


🧠 Model Summary

Input → MIX LSTM → Dense Softmax

Optimizer:

Rabbit Optimizer (ROA)

Feature Selection:

Improved Sparrow Search Optimizer (ISSOA)

⚠️ Notes

  • Dataset file must be placed inside Data/.
  • Training uses full dataset for validation as implemented.
  • Large batch size (4096) requires sufficient GPU/CPU memory.
  • TensorFlow eager execution is disabled for reproducibility.

📜 License

This project is intended for academic and research use.