# Multiple PUE Attack Detection in Cooperative Mobile Cognitive Radio Networks
## 1 Network Operators
### DNN for Detection  
DNNs have become a powerful tool for addressing complex pattern recognition tasks in various domains. In the realm of CRN, DNNs offer promising solutions for enhancing spectrum-sensing capabilities, particularly in the detection and classification of PUE. These consist of neurons connected in several layers; the neuron is connected to another in the subsequent layer. The core components of a DNN architecture include the following:  
Input layer: This layer accepts the input feature vectors derived from spectrum-sensing data. Features may include signal strength, frequency patterns, and temporal information. The input layers for the model are energy and the authentication detection results. Hidden layers: Each layer comprises dense layers, including neurons activated by functions such as Rectified Linear Units (ReLUs). A ReLU is commonly used to train models and efficiently decrease the vanishing gradient. Some neurons are deactivated during the training process to minimize overfitting. It is defined as follows:  
\[\text{ReLU}(x)=\text{max}(x) \tag{6}\]  
This means that a ReLU allows only positive values to pass through, effectively \"rectifying\" the input. Although it looks linear for positive inputs, the function introduces non-linearity into the model, enabling it to learn complex patterns [18]. Output layer: it uses a softmax activation function for classification, allowing the system to separate the input data into categories for different purposes, like the user type [19]. Softmax is a mathematical function commonly used in machine learning, particularly in classification problems involving multiple classes. It converts a vector of raw scores (logits) into probabilities that sum to 1, making it suitable for interpreting a model's output as probabilities for each class. It is often used in the final layer of a neural network model for classification tasks. It converts raw output scores into probabilities by taking the exponential of each output and normalizing these values by dividing by the sum of all the exponentials. This process ensures the output values are in the range (0, 1) and sum up to 1, making them interpretable as probabilities [18]. The input to the softmax function is a vector of K elements, where z without an arrow represents an element of the vector:  
\[\overset{\rightarrow}{Z}=Z_{0},Z_{1}\dots,Z_{K} \tag{7}\]  
Formally, the standard (unit) softmax function is as follows:  
\[\text{softmax}(xi)=\frac{e^{x_{i}}}{\sum\limits_{j=1}^{n}e^{x_{j}}} \tag{8}\]  
where x defines an output. These elements are shown in Figure 4[20]. As with other neural networks, two main steps are required: practical training with extensive and diverse datasets. The data should represent the problem domain and include various scenarios to ensure robustness; the second step is validating the network by testing it. In the first part, data preprocessing involves normalization, augmentation, and splitting into training, validation, and test sets. It starts by randomly initializing each neuron's weight matrices and bias vectors; it is essential to initialize the parameters to values between 0 and 1. In forward propagation within a neural network, let denote the label of a particular layer. The term \(Z^{L}\) is the pre-activation vector for layer \(L\) and represents the weighted sumof the input values \(X\) plus the bias terms \(b\) associated with each neuron, and \(w\) is the weight matrix that quantifies the influence of each input on this summation [21]. \[Z^{L}=w^{L}X^{L-1}+b^{L} \tag{9}\]  
Function \(a\) is the activation input to \(Z\) to obtain the response \(X^{L}\), which is the activation vector after applying the activation function \(\sigma\) to \(Z^{L}\). Common activation functions include the ReLU and the sigmoid function. \[X^{L}=\sigma(Z^{L}) \tag{10}\]  
The error functions show how close the predicted outputs are to the desired outputs by calculating the cost function. This function can be used for regression problems or classification [22].