Abstract
Class imbalance in Internet of Things (IoT) network traffic poses a significant challenge for accurate network attack detection, as minority attack classes are often underrepresented, leading to poor detection sensitivity. This imbalance not only reduces the reliability of existing detection models but also increases the risk of overlooking rare yet critical attacks. To address this issue, we propose a novel multi-scale deep convolutional generative adversarial networks (MCGAN) enhanced with an attention-guided statistical loss function to generate high-quality synthetic samples for minority classes. Our method stabilizes GAN training and improves the representativeness of generated data, thereby enhancing the detection model's robustness and sensitivity. The framework cascades a multi-scale transposed convolutional generator that fuses hierarchical feature maps across receptive fields with a discriminator trained under an adversarial objective, while an attention-guided statistical loss composed of moment, histogram, protocol-frequency, autocorrelation, and covariance matching terms is jointly optimized to enforce per-dimension distributional fidelity of the synthetic traffic. Extensive experiments on the Canadian Institute for Cybersecurity (CIC) IoT 2023 dataset demonstrate that the proposed MSGAN approach surpasses baseline GAN-based methods and current state-of-the-art GAN schemes. After balancing the dataset, the detection model achieves improvements ranging from 0.8% to 12.6% in key metrics such as recall and F1-score for minority classes, while the discriminator exhibits enhanced filtering of poisoned data, with improvements between 1.43% and 8.94%. These results validate the effectiveness of our approach to mitigate data imbalance, enhance detection performance for minority attack classes, and improve the discriminator's ability to filter poisoned data in realistic IoT scenarios.