Downloads · 30 days
0
cathrica/deep-learning-project
deep-learning-project is a machine learning model from cathrica. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
ICCN-INE2 Deep Learning Project — Project 5: Explainable IDS
Downloads · 30 days
0
Access
Public
Updated May 20, 2026
Repo size
3.2 MB
Likes
0
Public
Click a slice to open those files.
.pdf2.1 MB · 59%
From the Hugging Face model README
ICCN-INE2 Deep Learning Project — Project 5: Explainable IDS
This project builds an Intrusion Detection System using deep learning on the NSL-KDD dataset, then applies post-hoc explainability methods (SHAP, LIME) to make decisions interpretable. We evaluate explanation stability and analyze security implications of exposing model explanations.
Can we make IDS decisions interpretable without compromising detection performance, and are these explanations stable enough to be trusted in security-critical settings?
.
├── README.md # This file
├── docs/
│ ├── project_plan.md # Detailed project plan & methodology
│ ├── threat_model.md # Threat model document
│ └── architecture.md # Model architecture & design choices
├── data/
│ └── preprocess.py # Data loading & preprocessing pipeline
├── models/
│ ├── mlp_baseline.py # MLP baseline model
│ ├── lstm_model.py # LSTM variant
│ └── cnn1d_model.py # 1D-CNN variant
├── explainability/
│ ├── shap_analysis.py # SHAP explanations
│ ├── lime_analysis.py # LIME explanations
│ └── stability_eval.py # Explanation stability evaluation
├── experiments/
│ ├── train_baseline.py # Training script
│ ├── run_explainability.py # Run all XAI methods
│ └── run_stability.py # Stability evaluation experiments
├── results/ # Generated results (figures, metrics)
├── requirements.txt # Dependencies
└── reproduce.sh # One-command reproducibility script
# Install dependencies
pip install -r requirements.txt
# Reproduce all experiments
bash reproduce.sh
# Or run step by step:
python data/preprocess.py # Download & preprocess NSL-KDD
python experiments/train_baseline.py # Train 3 models (MLP, LSTM, CNN)
python explainability/shap_analysis.py # SHAP + LIME analysis
python explainability/stability_eval.py # Stability evaluation
NSL-KDD (Network Security Laboratory - KDD) — an improved version of KDD Cup 99.
Mireu-Lab/NSL-KDD| Model | Architecture | Parameters |
|---|---|---|
| MLP | 41→256→128→64→2 with BatchNorm + Dropout | ~50K |
| LSTM | 41-step sequence → 2-layer LSTM(64) → FC(2) | ~35K |
| 1D-CNN | Conv1d(64)→Conv1d(128)→AvgPool→FC(2) | ~45K |
reproduce.shICCN-INE2 Student Project
<!-- ml-intern-provenance -->This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = 'cathrica/deep-learning-project'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
For non-causal architectures, replace AutoModelForCausalLM with the appropriate AutoModel class.