Enhancing Intrusion Detection Using MAG: A Shallow Multilayer Perceptron Tuned with Adam and Grey Wolf Optimization
Abstract
This study introduces MAG, a lightweight intrusion detection system (IDS) that couples a single-hidden-layer multilayer perceptron (MLP) with the Adam optimizer and a Grey Wolf Optimizer (GWO) for hyperparameter tuning. A Classification and Regression Tree (CART) stage in WEKA first derives compact five-feature subsets for the KDDCup99 and NSL-KDD benchmarks, enabling multiclass and binary evaluation with reduced input dimensionality. The leakage-free pipeline combines target encoding, capped Synthetic Minority Over-sampling Technique (SMOTE) resampling to address class imbalance, and z-score normalization within a repeated nested cross-validation (CV) protocol. Across 25 runs, MAG consistently outperforms plain MLP and its Adam- and GWO-augmented variants in macro-averaged F1 score (F1), while using only 122 parameters and achieving sub-millisecond CPU inference with a negligible memory footprint. A nonparametric Friedman test over four dataset–task combinations confirms that MAG attains a significantly better overall ranking than the competing models, supporting its suitability for cost-aware IDS deployment.
Keywords
Citation Information
@article{imanfarhadiandehkordi2026,
title={Enhancing Intrusion Detection Using MAG: A Shallow Multilayer Perceptron Tuned with Adam and Grey Wolf Optimization},
author={Iman Farhadian Dehkordi and Kooroush Manochehri},
journal={Research Square},
year={2026},
doi={https://doi.org/10.21203/rs.3.rs-9463244/v1}
}
SinoXiv