## 4 Discussion
In contrast, traditional models like CNN, LSTM, and SVM struggle to keep up, both due to less efficient learning dynamics and higher dependency on sequential or convolutional operations, which scale poorly with complex input spaces. Such computational efficiency is particularly relevant for real-time or near-real-time applications in edge or fog computing layers of IoT networks, where hardware limitations often preclude the use of deep and slow models. The ability of transformer-GAN to reach high accuracy levels in a fraction of the time makes it a strong candidate for deployment in security-critical systems such as smart homes, industrial control systems, or autonomous IoT-based infrastructures that demand both rapid detection and minimal computational footprint. To assess the scalability and practicality of the proposed intrusion detection framework, we analyze its computational complexity by decomposing the system into its three major components: the Transformer-based architecture, the adversarial training process of the GAN, and the INSBBO meta-heuristic optimization loop. This analysis helps quantify the computational demands during training and inference, providing insight into the framework's feasibility in real-world IoT deployments. The Transformer model forms the backbone of both the generator and discriminator. Its self-attention mechanism exhibits \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Proposed Models**} & \multicolumn{4}{c}{**Runtime (s)**} \\  & **Accuracy > 35** & **Accuracy > 55** & **Accuracy > 75** & **Accuracy > 95** \\ \hline Transformer-GAN (INSBBO) & 16 & 59 & 93 & 157 \\ Transformer and GAN & 58 & 142 & 259 & - \\ Transformer & 82 & 173 & 309 & - \\ GAN & 90 & 196 & 419 & - \\ LSTM & 103 & 329 & 598 & - \\ CNN & 156 & 452 & 716 & - \\ SVM & 218 & 612 & 919 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Runtime of models at different accuracy thresholds in multi-class classification (CIC-IoT-2023 dataset). quadratic complexity with respect to sequence length. The complexity of a single forward pass is given by Equation (20):  
\[Complexity=O\Big{(}L\times H\times N^{2}\times D\Big{)} \tag{20}\]  
where \(L\) is the number of Transformer layers, \(H\) is the number of attention heads per layer, \(N\) is the sequence length (i.e., number of input tokens), and \(D\) is the feature dimensionality of each token. During each GAN training step, both the generator and discriminator undergo forward and backward propagation. As a result, the computational complexity of one full adversarial training step becomes Equation (21):  
\[Complexity=O\Big{(}2\times L\times H\times N^{2}\times D\Big{)} \tag{21}\]  
The INSBBO optimizer introduces additional computational overhead by evaluating a population of candidate solutions over multiple evolutionary iterations. For a population of size P and T generations, where each candidate involves a full GAN training pass, the total optimization complexity is expressed as Equation (22):  
\[Complexity=O\Big{(}P\times T\times L\times H\times N^{2}\times D\Big{)} \tag{22}\]  
where \(P\) is the number of candidate solutions per generation and \(T\) is the number of evolutionary iterations in the INSBBO process. This formulation reflects the most computationally intensive phase of the proposed approach, as it encapsulates the repeated training of complex Transformer-GAN models. To validate whether the observed performance differences between the proposed transformer-GAN and the baseline models are statistically meaningful, we conducted a series of independent two-sample \(t\)-tests. This test determines whether the means of two groups are significantly different from each other, under the assumption of unequal variances. In the context of our study, the null hypothesis asserts that there is no significant difference in classification performance between transformer-GAN and each compared baseline.