01
Data & preprocessing
Built on the ISCX VPN-nonVPN dataset. Flows were cleaned, deduplicated, and reduced to metadata-only features: packet size statistics, inter-arrival timing, direction ratios, and flow duration. Class imbalance was handled with SMOTE on the training split only, and PCA explored dimensionality reduction for the latency-sensitive deployment story.
- ▸StandardScaler normalization fit on train, applied to val/test.
- ▸SMOTE oversampling restricted to the training fold to avoid leakage.
- ▸Stratified train/val/test split (70/15/15) preserving class ratios.
02
Modeling
A Random Forest baseline established a strong reference point, then XGBoost was tuned for the final classifier. Both models were chosen for their robustness to mixed-scale tabular features and their interpretability via feature importance — important for justifying decisions to a security team.
- ▸Random Forest baseline with grid-searched depth and estimators.
- ▸XGBoost with early stopping on a held-out validation set.
- ▸Feature importance reviewed to confirm the model leaned on timing/size patterns, not artifacts.
03
Evaluation
Evaluated on accuracy, precision/recall per class, F1, ROC-AUC, and confusion matrices — plus a latency budget measurement for inline use. The metadata-only constraint was treated as a hard requirement, not a nice-to-have, so any feature that hinted at payload content was rejected.