This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Open AccessArticle
GAN-AHR: A GAN-Based Adaptive Hybrid Resampling Algorithm for Imbalanced Intrusion Detection
by
Monirah Al-Ajlan
Monirah Al-Ajlan * and
Mourad Ykhlef
Mourad Ykhlef
Information System Department, College of Computer and Information Sciences, King Saud University, Riyadh 11451, Saudi Arabia
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(17), 3476; https://doi.org/10.3390/electronics14173476 (registering DOI)
Submission received: 15 July 2025
/
Revised: 14 August 2025
/
Accepted: 26 August 2025
/
Published: 29 August 2025
Abstract
With the recent proliferation of the Internet and the ever-evolving threat landscape, developing a reliable and effective intrusion detection system (IDS) has become an urgent need. However, one of the key challenges hindering the success of IDS development is class imbalance, which often leads to biased models and poor detection rates. To address this challenge, this paper proposes a GAN-AHR algorithm which adaptively balances the dataset by augmenting minority classes using CGAN or BSMOTE, based on class-specific characteristics such as compactness and density. By leveraging BSMOTE to oversample classes with high compactness and high density, we can exploit its simplicity and effectiveness. However, the quality of BSMOTE-generated data is significantly lower when the classes are sparse and lacking clear boundaries. In such cases, CGAN is better suited in this scenario given its ability to capture complex data distributions. We present empirical results on the NF-UNSW-NB15 dataset using a Random Forest (RF) classifier, reporting a significant improvement in the precision, recall, and F1-score of several minority classes. Specifically, a remarkable increase in the F1-score for the Shellcode and DoS classes was reported, reaching 0.90 and 0.51, respectively.
Share and Cite
MDPI and ACS Style
Al-Ajlan, M.; Ykhlef, M.
GAN-AHR: A GAN-Based Adaptive Hybrid Resampling Algorithm for Imbalanced Intrusion Detection. Electronics 2025, 14, 3476.
https://doi.org/10.3390/electronics14173476
AMA Style
Al-Ajlan M, Ykhlef M.
GAN-AHR: A GAN-Based Adaptive Hybrid Resampling Algorithm for Imbalanced Intrusion Detection. Electronics. 2025; 14(17):3476.
https://doi.org/10.3390/electronics14173476
Chicago/Turabian Style
Al-Ajlan, Monirah, and Mourad Ykhlef.
2025. "GAN-AHR: A GAN-Based Adaptive Hybrid Resampling Algorithm for Imbalanced Intrusion Detection" Electronics 14, no. 17: 3476.
https://doi.org/10.3390/electronics14173476
APA Style
Al-Ajlan, M., & Ykhlef, M.
(2025). GAN-AHR: A GAN-Based Adaptive Hybrid Resampling Algorithm for Imbalanced Intrusion Detection. Electronics, 14(17), 3476.
https://doi.org/10.3390/electronics14173476
Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details
here.
Article Metrics
Article Access Statistics
For more information on the journal statistics, click
here.
Multiple requests from the same IP address are counted as one view.