# Survey on 5G Physical Layer Security Threats and Countermeasures
## 6 Machine Learning for Enhancing PHY Layer Security
### Convolutional Neural Networks  
Convolutional Neural Network (CNN) are one of the most fundamental architectures in the field of deep learning [111]. Initially inspired by the human visual perception mechanism [112], they have been proven to be highly effective for computer vision [113]. Later, they were adopted for several other tasks, such as natural-language processing [114], automatic modulation classification, signal identification, and interference detection and RF fingerprinting for LTE and 5G networks [107, 115, 116].  
The CNN typically consists of several layers that process and transform the inputs to produce the desired output, where the fundamental layers are called _Convolutional layers_, _Pooling layers_, _Flatten layers_, and _Fully-connected layers_[117]. Convolutional layers are the heart of CNNs and consist of learnable convolutional kernels that extract and learn features automatically through convolution operation. Pooling layers are used to reduce the spatial dimensions of the input data and help reduce the computational load and memory usage. On top of that, they help to detect invariant features to scale and orientation changes. Towards the end of the network, CNNs typically include one or more fully connected layers (equivalent to traditional Multi-Layer Perceptron (MLP) networks), which perform high-level reasoning, such as classifying the input data based on the features extracted  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**USRP** & **4G SISO** & **4G** & **5G NSA** & **5G NSA** & **5G SA** & **5G SA** \\  & & **MIMO** & **SISO** & **MIMO** & **SISO** & **MIMO** \\ \hline ExpressMIMO2 & yes & yes & yes & yes & yes & yes \\ X310 & yes & yes & yes & no & yes & yes \\ B210 & yes & yes & yes * & no & yes & yes \\ B200 & yes & no & no & no & yes & no \\ \hline \hline \end{tabular}  
* In 5G NSA mode, the 4G and 5G must operate on the same frequency due to the presence of only one shared local oscillator. Suitable for experimentation only.  
\end{table}
Table 4: Appropriate hardware to use with OpenAirInterface and individual 4G or 5G types.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**USRP** & **4G SISO** & **4G MIMO** & **5G NSA** & **5G NSA** & **5G SA** & **5G SA** \\  & & & **SISO** & **MIMO** & **SISO** & **MIMO** \\ \hline X310 & yes & yes & yes & no & yes & yes \\ B210 & yes & yes & yes * & no & yes & yes \\ B200 & yes & no & no & no & yes & no \\ \hline \hline \end{tabular}  
* In 5G NSA mode, the 4G and 5G must operate on the same frequency due to the presence of only one shared local oscillator. Suitable for experimentation only.  
\end{table}
Table 5: Appropriate hardware to use with srsRAN and individual 4G or 5G types.  
by the Convolutional and Pooling layers [111]. The schematic of a simple CNN for the processing of 1D input data is shown in Figure 9. Table 6 presents recent examples of CNN-based machine-learning experiments applied to 5G devices security enhancements in terms of device authentication by fingerprinting, or jamming attack detection. The potential of CNN architecture has also been studied for satellite transmitters [118] and represent a pioneering work towards the use of future 5G non-terrestrial networks [119].