This project studies how contextual information, adaptive decision thresholds and degraded inputs affect network intrusion detection on CIC-IDS2017.
For context-aware supervised learning, I developed a Random Forest baseline and compared temporal, network-state and noise-signature features through an ablation study. A chronological per-file train-validation-test split tested performance on later traffic. Model comparisons used Wilson confidence intervals and McNemar's tests with Holm-Bonferroni correction.
For adaptive thresholds, I built a Gymnasium environment in which a PPO agent adjusted the decision threshold of a pre-trained Random Forest. The experiments compared static, rule-based and reinforcement-learning strategies using classifier confidence, threshold state and different levels of contextual information.
Robustness experiments tested Gaussian feature noise and simulated packet loss across increasing perturbation levels. The supervised models maintained lower false-positive rates, while the adaptive detector preserved high recall at the cost of more false positives.
The comparison shows why clean-condition accuracy alone is insufficient: context representation, threshold strategy and input quality can change the behaviour of the same underlying classifier.