This project was developed as part of the PIDATA – 4th Year Engineering Program at Esprit School of Engineering – Tunisia (Academic Year 2025–2026).
The objective of this project is to design an AI-driven framework for detecting and mitigating cyber-attacks in IoT-based smart city environments within emerging 6G networks. The system leverages data analytics and machine learning techniques to identify anomalous network behavior and enhance network security.
With the rapid growth of IoT devices in smart cities and the evolution toward 6G networks, cybersecurity challenges have become more complex. Traditional rule-based systems are no longer sufficient to detect sophisticated and evolving attacks.
This project addresses:
- Detection of malicious network traffic
- Handling heterogeneous 5G/6G datasets (Global, eMBB, mMTC, URLLC)
- Building intelligent models for real-time anomaly detection
- ✅ Data preprocessing pipeline (cleaning, missing values, encoding)
- ✅ Outlier handling using IQR Winsorization
- ✅ Feature engineering (log transformations, correlation filtering)
- ✅ Categorical encoding (One-Hot Encoding)
- ✅ Multi-dataset analysis (5G traffic scenarios)
- ✅ Machine Learning-based anomaly detection+DL for unlabeled 6G datset
- ✅ Balanced dataset evaluation and performance metrics
- Python
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
- Seaborn
- Streamlit (interactive dashboard)
- Docker (containerization)
- GitHub Actions (CI/CD)
The project uses multiple datasets representing different 5G traffic scenarios:
- Global: Mixed traffic dataset
- eMBB: Enhanced Mobile Broadband
- mMTC: Massive Machine Type Communications
- URLLC: Ultra-Reliable Low Latency Communications
Each dataset includes:
- Network traffic features (packets, bytes, latency, etc.)
- Protocol information
- Target label: Benign (0) / Malicious (1) Also 6G datset
Dataset Access
Due to file size limitations on GitHub, the datasets used in this project are not included in the repository.
They can be accessed through the following link:
👉 Download Dataset : https://drive.google.com/drive/folders/1QHhjL0muKQa_dtk52HXc6WW7MTUyG1nR?usp=sharing
The following steps were applied:
- Removal of irrelevant features (IDs, constant columns)
- Handling missing values using median imputation
- Cleaning categorical anomalies (
?values) - Removing highly correlated features
- Outlier treatment using IQR-based Winsorization
- Log transformation for skewed features
- One-Hot Encoding for categorical variables
- Final dataset validation (no missing values, aligned schema)
- Binary Classification (Benign vs Malicious)
- Logistic Regression
- Random Forest
- XGBoost
- Isolation Forest (for anomaly detection scenario)
- Accuracy
- Precision / Recall
- F1-Score
- ROC-AUC
- Confusion Matrix
5G best model XGboost:
- Accuracy: 99%
- F1-Score: 94%
- ROC-AUC: 98%
📁 project-root
│
├── 📁 data/
│ ├── Global_clean.csv
│ ├── eMBB_clean.csv
│ ├── mMTC_clean.csv
│ └── URLLC_clean.csv
│
├── 📁 notebooks/
│ ├── data_cleaning.ipynb
│ ├── eda.ipynb
│ ├── modeling.ipynb
│
├── 📁 src/
│ ├── preprocessing.py
│ ├── training.py
│ ├── evaluation.py
│
├── 📁 models/
│ └── model.pkl
│
├── requirements.txt
└── README.md
git clone https://github.com/your-username/your-repo.git
cd your-repopip install -r requirements.txt- Open notebooks using Jupyter or Google Colab
- Execute preprocessing → modeling → evaluation
- Bouraoui Rahma
- Cherif Safa
- Mejri Ameni
Developed at Esprit School of Engineering – Tunisia PIDEV – 4rd Year Engineering Program Academic Year: 2025–2026
- Integration with real-time streaming data
- Deployment using Streamlit dashboard
- Deep Learning models (LSTM, Autoencoders)
- MLOps pipeline (CI/CD + monitoring)
- Esprit School of Engineering
- Academic supervisors and project mentors
- Open-source community