# Adaptive Linearization for the Sub-Nyquist Photonic Receiver Based on Deep Learning
## 2 Materials and Methods
In brief, the testing datasets were set as validation datasets to monitor the fitting states of the network. The deep learning layers and training process were implemented by the Keras framework from TensorFlow on the Nvidia TITAN RTX GPU. Figure 1: The experimental setup schematic diagram of the deep learning-assisted signal linearization method (MLL: mode-locked laser, EDFA: erbium-doped fiber amplifier, AWG: Arbitrary Waveform Generator, MZM: Mach–Zehnder intensity modulator, PD: photodetector, LNA: low-noise amplifier, LPF: low-pass filter, ADC: analog-to-digital converter, DSP: digital signal processing, DL: deep learning). The down-conversion principle is shown in the spectrum diagrams of small subplots next to the related components. The solid line divides the Nyquist zone (from 1 to N), while two Nyquist zones form an optical frequency comb spacing. The solid blue and orange trapezoids represent the two wideband radio frequency (RF) signals, respectively. The hollow blue and orange trapezoids represent the harmonics of the two RF signals, respectively, and the hollow green trapezoid represents the product of intermodulation and other strays. In this work, we designated a deep residual network (Resnet) that was inspired by the field of computer vision (CV). It is supposed that a deeper network can extract more complex feature patterns by increasing the number of network layers. However, this may raise problems of gradient disappearance or gradient explosion, which make the deep learning model difficult to train. The Resnet solves the gradient degradation problem of the deep network through residual learning, so as to realize the training of a deeper network [42]. From a mathematical point of view, the residual unit can be expressed as:  
\[y_{l}=h(x_{l})+F(x_{l},W_{l}) \tag{1}\]  
\[x_{l+1}=f(y_{l}) \tag{2}\]  
Among the Equations (1) and (2), \(x_{l}\) and \(x_{l+1}\) represent the input and output of the \(l_{th}\) residual unit, respectively. The residual function is represented by \(F(x_{l},W_{l})\), which represents the learned residual. The identity mapping is represented by \(h(x_{l})=x_{l}\), and \(f(y_{l})\) is the activation function. Based on the above formulas, the learned characteristics of the units from \(l\) to \(L\) are as follows:  
\[x_{L}=x_{l}+\sum_{i=l}^{L-1}F(x_{i},W_{i}) \tag{3}\]  
\[\frac{\partial loss}{\partial x_{l}}=\frac{\partial loss}{\partial x_{L}}. \frac{\partial x_{L}}{\partial x_{l}}=\frac{\partial loss}{\partial x_{L}} \Bigg{(}1+\frac{\partial}{\partial x_{l}}\sum_{i=l}^{L-1}F(x_{i},W_{i})\Bigg{)} \tag{4}\]  
Using the chain rule, the reverse gradient can be obtained by Equation (4). The first factor (\(\frac{\partial loss}{\partial x_{L}}\)) of the gradient in Equation (4) represents the gradient of the loss function reaching \(L\). The residual mechanism can propagate the gradient lossless, while another residual gradient needs to pass through the layer with weights, and the gradient is not transmitted directly. Figure 2 presents the schematic diagram of the designated deep Resnet, which was constructed with 20 residual blocks. Every residual block was formed with two cascaded 1D convolutional layers, and each 1D convolutional layer was constituted by 32 filters. The kernel size of each 1D convolutional layer was set to 16. In the residual learning schemes, the output of every block was summed with the input data. To ensure the same scale of input and output, the final 1D convolutional layer with 1 filter was added. Specifically, since the signals have both positive and negative amplitude values, to avoid the gradient  
Figure 2: The schematic diagrams of the training (yellow block) and testing (blue) process and the architecture of the deep Resnet network. disappearance, the leaky rectified linear units (_Leaky Relu_) function was employed as the activation layer at the end of every 1D convolutional layer. The loss function of the _Leaky Relu_ is depicted in Equation (5), where \(\alpha\) is a constant. \[y_{Leaky\ Relu}=\left\{