Intrusion Detection System (IDS) is often calibrated to known attacks and generalizes poorly to unknown threats. This paper proposes GMA-SAWGAN-GP, a novel generative augmentation framework built on a Self-Attention-enhanced Wasserstein GAN with Gradient Penalty (WGAN-GP). The generator employs Gumbel-Softmax regularization to model discrete fields, while a Multilayer Perceptron (MLP)-based AutoEncoder acts as a manifold regularizer. A lightweight gating network adaptively balances adversarial and reconstruction losses via entropy regularization, improving stability and mitigating mode collapse. The self-attention mechanism enables the generator to capture both short- and long-range dependencies among features within each record while preserving categorical semantics through Gumbel-Softmax heads. Extensive experiments on NSL-KDD, UNSW-NB15, and CICIDS2017 using five representative IDS models demonstrate that GMA-SAWGAN-GP significantly improves detection performance on known attacks and enhances generalization to unknown attacks. Leave-One-Attack-type-Out (LOAO) evaluations using Area Under the Receiver Operating Characteristic (AUROC) and True Positive Rate at a 5 percent False Positive Rate confirm that IDS models trained on augmented datasets achieve higher robustness under unseen attack scenarios. Ablation studies validate the contribution of each component to performance gains. Compared with baseline models, the proposed framework improves binary classification accuracy by an average of 5.3 percent and multi-classification accuracy by 2.2 percent, while AUROC and True Positive Rate at a 5 percent False Positive Rate for unknown attacks increase by 3.9 percent and 4.8 percent, respectively, across the three datasets. Overall, GMA-SAWGAN-GP provides an effective approach to generative augmentation for mixed-type network traffic, improving IDS accuracy and resilience.
Figures & tables
Fig. 1: The architecture of GMA-SAWGAN-GP: Upper part shows the workflow of the proposed method, while the lower part illustrates the structures of the Generator, Critic, and AutoEncoder blocks. α,β are adaptive mixing weights output by the gating network fω to balance LgAE and Ld .
Number of samples
Dataset
Class
Original Training set
Augmented Training set
Original Test set
NSL-KDD
Normal
67343
67343
9711
R2L
995
10995
2885
Probe
11656
21656
2421
DoS
45927
45927
7460
U2R
52
10052
67
TABLE I: Datasets Information
Dataset
Training Data
IDS Model
Acc.(%)
F1(%)
Normal
Abnormal
Acc.(%)
F1(%)
Acc.(%)
F1(%)
UNSW-NB15
Original
CNN
81.8 ± 4.7
68.8 ± 4.4
89.1 ± 6.5
88.8 ± 3.3
48.1 ± 8.5
48.7 ± 6.2
DNN
84.1 ± 1.5
71.5 ± 3.5
91.5 ± 0.5
90.5 ± 0.8
50.0 ± 8.2
52.6 ± 6.3
LSTM
84.0 ± 3.1
70.2 ± 7.2
92.0 ± 1.0
90.4 ± 1.7
46.7 ± 15.8
50.0 ± 12.7
CNN-BiLSTM
80.7 ± 0.4
61.9 ± 0.4
91.9 ± 0.6
88.7 ± 0.3
29.2 ± 1.2
35.0 ± 0.8
CNN-LSTM
81.0 ± 0.9
62.8 ± 1.9
91.9 ± 0.8
88.6 ± 0.6
31.0 ± 3.5
36.7 ± 3.4
TABLE II: Binary Classification Comparison of Different IDS Models with three datasets for the Proposed model
Dataset
Training Data
IDS Model
Acc.(%)
F1(%)
DoS
Reconnaissance
Shellcode
Worms
Acc. (%)
F1(%)
Acc.(%)
F1(%)
Acc.(%)
F1(%)
Acc.(%)
F1(%)
UNSW-NB15
Original
CNN
86.5 ± 0.8
51.5 ± 1.8
64.6 ± 9.4
68.5 ± 6.0
43.7 ± 3.0
48.1 ± 1.9
45.8 ± 4.0
24.5 ± 1.3
21.1 ± 4.4
23.6 ± 2.6
DNN
82.5 ± 1.3
43.9 ± 3.4
29.2 ± 13.6
38.4 ± 13.7
44.6 ± 1.7
42.3 ± 0.9
37.9 ± 4.6
27.2 ± 2.4
24.6 ± 2.6
21.0 ± 3.1
LSTM
84.2 ± 1.2
40.8 ± 2.0
58.3 ± 13.8
58.6 ± 8.2
33.1 ± 1.8
36.4 ± 1.8
14.4 ± 3.0
17.4 ± 2.1
0.0 ± 0.0
0.0 ± 0.0
CNN-BiLSTM
81.1 ± 0.5
36.1 ± 1.7
19.6 ± 1.4
26.2 ± 1.5
33.0 ± 1.8
39.7 ± 1.9
18.7 ± 5.3
16.8 ± 1.6
4.8 ± 4.6
8.5 ± 7.8
CNN-LSTM
82.6 ± 0.5
44.8 ± 1.1
45.7 ± 1.8
48.2 ± 1.7
30.2 ± 0.3
40.1 ± 0.8
32.7 ± 0.7
19.9 ± 0.9
16.4 ± 4.3
25.6 ± 5.7
TABLE III: Multi-Classification Results of UNSW-NB15 Dataset With Different IDS Models
Dataset
Training Data
IDS Model
Acc.(%)
F1(%)
R2L
Probe
DoS
U2R
Acc.(%)
F1(%)
Acc.(%)
F1(%)
Acc.(%)
F1(%)
Acc.(%)
F1(%)
NSL-KDD
Original
CNN
76.8 ± 0.3
56.6 ± 1.4
1.8 ± 0.6
3.5 ± 1.1
77.7 ± 2.8
78.5 ± 1.7
80.0 ± 1.5
87.6 ± 0.9
21.1 ± 4.2
33.8 ± 5.6
DNN
74.4 ± 0.6
51.9 ± 1.8
0.6 ± 0.5
1.2 ± 1.0
59.2 ± 3.6
67.6 ± 2.4
77.9 ± 0.9
86.1 ± 0.5
15.9 ± 5.2
26.8 ± 7.7
LSTM
75.7 ± 0.5
55.8 ± 1.0
2.7 ± 2.2
5.1 ± 4.0
74.4 ± 2.4
72.0 ± 2.1
76.8 ± 1.0
85.5 ± 0.7
24.9 ± 4.4
36.4 ± 5.0
CNN-BiLSTM
75.1 ± 1.5
53.5 ± 2.5
4.2 ± 2.3
7.9 ± 4.2
58.8 ± 4.5
65.4 ± 4.5
79.1 ± 3.4
86.8 ± 2.1
18.4 ± 7.0
28.6 ± 8.4
CNN-LSTM
77.0 ± 0.6
55.3 ± 1.0
6.2 ± 1.2
11.6 ± 2.1
54.4 ± 4.1
65.9 ± 3.6
85.6 ± 0.2
90.6 ± 0.2
17.9 ± 3.5
29.1 ± 4.9
TABLE IV: Multi-Classification Results of NSL-KDD Dataset With Different IDS Models
Dataset
Training Data
IDS Model
Acc.(%)
F1(%)
DoS
PortScan
BruteForce
WebAttack
Bot
Acc.(%)
F1(%)
Acc.(%)
F1(%)
Acc.(%)
F1(%)
Acc.(%)
F1(%)
Acc.(%)
F1(%)
CICIDS2017
Original
CNN
97.3 ± 0.2
92.8 ± 1.5
98.3 ± 0.9
96.7 ± 0.4
99.8 ± 0.1
93.4 ± 0.2
99.1 ± 0.3
97.4 ± 0.6
91.9 ± 1.1
83.4 ± 0.7
90.6 ± 11.9
88.1 ± 8.0
DNN
96.8 ± 0.2
89.3 ± 2.5
93.9 ± 2.5
95.5 ± 0.6
98.3 ± 1.8
93.2 ± 0.3
98.6 ± 0.7
97.6 ± 0.4
85.7 ± 1.0
80.7 ± 1.1
60.5 ± 16.6
71.1 ± 13.6
LSTM
96.5 ± 0.3
90.0 ± 0.8
97.0 ± 1.1
95.8 ± 0.3
99.3 ± 0.2
93.0 ± 0.1
98.0 ± 2.1
92.0 ± 2.7
88.7 ± 1.0
81.9 ± 0.6
80.4 ± 3.3
79.4 ± 2.6
CNN-BiLSTM
98.1 ± 0.2
94.9 ± 0.5
98.9 ± 0.3
98.0 ± 0.3
97.6 ± 1.5
94.1 ± 0.6
99.0 ± 0.4
98.6 ± 0.3
93.9 ± 1.2
84.5 ± 1.8
98.8 ± 0.3
95.5 ± 0.9
CNN-LSTM
98.4 ± 0.0
95.5 ± 0.1
99.5 ± 0.1
98.5 ± 0.0
97.1 ± 0.7
94.6 ± 0.1
99.2 ± 0.1
99.1 ± 0.0
94.3 ± 0.4
85.4 ± 0.5
98.8 ± 0.2
96.9 ± 0.4
TABLE V: Multi-Classification Results of CICIDS2017 Dataset With Different IDS Models
Dataset
Unknown Attack
Model
Original Dataset
Augmented Dataset
AUROC (%)
TPR@5%FPR (%)
AUROC (%)
TPR@5%FPR (%)
NSL–KDD
Probe
CNN
84.4 ± 2.9
53.3 ± 1.0
85.6 ± 1.2
54.6 ± 8.8
DNN
68.3 ± 11.5
51.4 ± 4.7
75.7 ± 9.4
72.5 ± 13.2
LSTM
72.5 ± 4.7
44.9 ± 11.0
76.4 ± 2.5
39.5 ± 10.3
CNN-BiLSTM
81.3 ± 4.4
53.5 ± 12.2
83.1 ± 2.0
56.3 ± 10.1
CNN-LSTM
78.4 ± 4.1
31.0 ± 12.0
79.5 ± 3.4
33.5 ± 11.1
TABLE VI: LOAO Results Across Five IDS Models on NSL-KDD, UNSW-NB15, and CICIDS2017
Fig. 2: PCA projections of real and synthetic traffic across three datasets. Rows label (a)–(c) correspond to CICIDS2017, UNSW-NB15, and NSL-KDD, respectively. Columns show the original training data and synthetic samples generated by different GAN-based models. In each plot, the horizontal and vertical axes correspond to the first and second principal components of PCA. Colors indicate a standardized scalar, with scales shown on the right side.
Department of Computer Science, New Mexico State University, Las Cruces, NM, USA · University of Hartford, CT, USA · DEVCOM Analysis Center, WSMR, NM, USA