# Threat Detection Model for WLAN of Simulated Data Using Deep Convolutional Neural Network
## 2 Materials and Methods
### The Developed Neural Network Architecture
According to the training progress of this scenario, the developed CNN also achieved 100% accuracy within the first epoch. ### Network Evaluation

The performance of the developed architecture has been tested, which is represented by the obtained accuracy along with the number of devices used in the network as shown in Figure 14.

## 4 Discussion

According to this result, the performance of the proposed model is highly affected by the number of devices on the network. The main issue of applying this approach, in terms

Figure 14: Accuracy versus number of devices for the developed architecture. Figure 13: Scenario 2 (**a**) the training progress, (**b**) the confusion matrix for the tested data, and (**c**) router intrusion detections. of scalability, is that it is required to re-train the whole CNN when any additional device is presented in the network. Generalizability in deep learning is a critical concept to overcome the problem of overfitting. Overfitting occurs when a model learns the training data too well and performs poorly on unseen data because it has essentially memorized the training set. Therefore, to improve generalization and mitigate overfitting in this study, we implemented the following strategies:

* More data has been generated, where a 5000 Non-HT dataset of WLAN beacon frames for each router in the network. More data allows the model to learn a broader range of patterns and relationships. * Monitor for early stopping, where monitoring the model's performance on a validation set during training and stopping when the performance starts to degrade. This prevents the model from continuing to overfit. * Applying Cross-Validation to assess the model's performance on different subsets of the data. This can help to estimate how well the model will perform on unseen data. * Simpler and appropriate feature set, where fewer features are less prone to overfitting, containing 6 parameters chosen to simplify the input representation while maintaining appropriate architecture, such as the L-LTF sequence frame Length, WLAN channel number, channel Band (Ghz), SNR (dB), and number of Known Routers and Unknown Routers. * Ensemble Learning, where the combination of the predictions of multiple models was used to reduce overfitting helped to improve generalization as they can capture patterns that may be missed by a single model especially when dealing with complex I and Q datasets. The developed neural network architecture combines two (models) convolutional layers followed by three fully connected layers for processing complex data with both in-phase (I) and quadrature (Q) components, where the first layer learns the features independently in I and Q, and the next layer extracts the features combining I and Q together. * Batch Normalization, the 7 th layer of the developed architecture was Batch Normalization one, it normalizes the activations in intermediate layers during training, which can improve generalization and make the training process more stable. * Using the Dropout layer in the 12 th layer, where random neurons are \"dropped out\" during each training step. This prevents the network from relying too heavily on any one neuron. Choosing the proper group of features is a challenging task that can cause scalability troubles when an extensive number of instruments are present, guiding to extended computational complexity during training. Furthermore, the inexperienced process of presenting arbitrary mixtures of impairments before training the CNN has three concerns:

1. Communication effect: Naturally, adding impairments raises the BER. Therefore, to limit any negative effects on BER, controlled and cautious addition is required. 2. Accuracy: Demodulated samples from two separate transmitters that were previously simple to distinguish may now seem clustered together due to changes made to where they were placed on the IQ plane. The classifier's performance can suffer as a result. 3.