How esvanth/quantumshield works
QuantumShield is an intrusion-detection system: network-flow datasets are preprocessed into scaled, PCA-reduced features, which feed classical and hybrid-quantum models. The deployed API loads those models and the evaluation-derived voting rule to classify traffic; SHAP provides ranked feature explanations. Evaluation also covers model metrics, hypotheses, ablations, and the QAE anomaly-detection capability. The README documents the dashboard and AWS deployment, but their runtime wiring is not shown in the sampled source, so those links are documented rather than inferred from imports.
Main entry points: api.py Prediction API · hypotheses.py Hypothesis evaluation · preprocessing.py Feature preprocessing · circuits.py Hybrid QNN
Components 20
Data preparation
- Feature preprocessing
data/preprocessing.py - Data configuration
data/config.py
Detection models
- DNN classifier
models/classical/dnn.py - CNN classifier
models/classical/cnn.py - LSTM classifier
models/classical/lstm.py - Hybrid QNN
models/quantum/circuits.py - Soft-voting ensemble
models/ensemble.py
Evaluation and explanation
- Hypothesis evaluation
evaluation/hypotheses.py - Model metrics
evaluation/metrics.py - Ablation study
evaluation/ablation.py - SHAP explanations
explainability/shap_hybrid.py - Evaluation results
results
Serving and interface
- Prediction API
deployment/api.py - Dashboard
deployment/dashboard.py
Quantum anomaly research
- Quantum autoencoder
models/quantum/qae.py - Quantum SVM
models/quantum/qsvm.py - Hybrid training
models/quantum/train_hybrid.py
Other components
- Traffic datasets
- Traffic analyst or client
- AWS EC2
Connections 35
- Traffic datasets → Feature preprocessing: provides flows
README.md - Feature preprocessing → Data configuration: reads settings
data/preprocessing.py - Feature preprocessing → DNN classifier: produces model features
README.md - Feature preprocessing → CNN classifier: produces model features
README.md - Feature preprocessing → LSTM classifier: produces model features
README.md - Feature preprocessing → Hybrid QNN: produces model features
README.md - Soft-voting ensemble → DNN classifier: scores with
models/ensemble.py - Soft-voting ensemble → CNN classifier: scores with
models/ensemble.py - Soft-voting ensemble → LSTM classifier: scores with
models/ensemble.py - Soft-voting ensemble → Hybrid QNN: scores with
models/ensemble.py - Prediction API → DNN classifier: loads model
deployment/api.py - Prediction API → CNN classifier: loads model
deployment/api.py - Prediction API → LSTM classifier: loads model
deployment/api.py - Prediction API → Hybrid QNN: loads model
deployment/api.py - Traffic analyst or client → Prediction API: requests prediction
README.md - Prediction API → Traffic analyst or client: returns classification
deployment/api.py - Prediction API → Evaluation results: reads voting rule
deployment/api.py - Traffic analyst or client → Dashboard: views detections
README.md - Dashboard → Prediction API: uses service
- Prediction API → AWS EC2: deployed on
README.md - Hypothesis evaluation → DNN classifier: evaluates
evaluation/hypotheses.py - Hypothesis evaluation → CNN classifier: evaluates
evaluation/hypotheses.py - Hypothesis evaluation → LSTM classifier: evaluates
evaluation/hypotheses.py - Hypothesis evaluation → Hybrid QNN: evaluates
evaluation/hypotheses.py - Hypothesis evaluation → Model metrics: computes measures
- Hypothesis evaluation → Evaluation results: saves findings
evaluation/hypotheses.py - Ablation study → Model metrics: compares models
evaluation/ablation.py - SHAP explanations → DNN classifier: explains ensemble member
explainability/shap_hybrid.py - SHAP explanations → CNN classifier: explains ensemble member
explainability/shap_hybrid.py - SHAP explanations → LSTM classifier: explains ensemble member
explainability/shap_hybrid.py - SHAP explanations → Hybrid QNN: explains ensemble member
explainability/shap_hybrid.py - SHAP explanations → Evaluation results: writes explanations
README.md - Hybrid training → Hybrid QNN: trains circuit model
models/quantum/train_hybrid.py - Quantum autoencoder → Evaluation results: reports anomaly findings
- Quantum SVM → Evaluation results: optional experiment