# Machine Learning Applications for Short Reach Optical Communication
## 2 Machine Learning for OPM and MFI in Short Reach Optical Communications
It combines wavelet transform (WT) and ANN attributes to detect and classify fast power transients in optical networks [90]. The typical structure of an ANN is shown in Figure 4. The ANN model simulates the electrical activity of neurons in brains and the nervous systems. Generally, processing elements (neurons) are arranged in a layer or vector, and the output of one layer is used as the input of the next layer. A neuron can connect to all or part of the neurons in the next layer. Synaptic connections in the brain are modeled by these connections. The weighted data signal that enters the neuron mimics the nerve cell's electrical excitation to simulate information transfer in the network. The input value \(X_{i}\) of the processing unit is multiplied by the connection weight \(w_{j,i}\), which simulates the learning in ANN by adjusting the strength or weight of the connection. The input-output relationship is then modeled as a more complicated model in the hidden layer under the influence of the activation function (e.g., sigmoid, tanh and Relu), whose input is multiplied by the weight and shifted by the bias, allowing the ANN algorithm to learn almost any function. The activation function \(f\) is applied as follows:  
\[Z_{j}=f\left(\sum W_{ji}X_{i}\right)+bias \tag{1}\]  
Then, a vector of summation function (\(y_{j}=\sum W_{kj}^{\prime}Z_{j}\)) is used to aggregate all of the weight-adjusted values to generate the output vector. An ANN with many hidden layers between its input layer and output layer is called a deep neural network (DNN). With the increase of unstructured data such as images and videos that need to be processed, feature engineering becomes more complex and time-consuming, making DNN a more powerful tool than the single hidden layer ANN. This is because the DNN can eliminate the need for manual feature engineering by self-learning through training. In 2016, a study showed that a DNN could learn the function of the feature extractor of the incoming digital-to-analogue converters (DAC) sampled signal without manual feature engineering and form itself as an OSNR estimator [63]. The ANN discussed above is also called the multi-layer perception (MLP) neural network. When the node in each layer is connected to all nodes in the next layer, it is  
Figure 3: Procedure for OPM and MFI using machine learning. referred to as the fully-connected neural network. In addition to MLP, another type of neural network that has been widely studied for high-speed OPM and MFI is the CNN, which uses one or more layers of convolution units. As shown in Figure 5, CNN is composed of several pairs of convolutional and pooling layers. The function of the convolutional layer is to extract and learn spatial features in the input data, which is typically arranged into the matrix format. This layer is generated by applying a series of different filters to the input. These filters are called convolution kernels. The filter slides element by element on the input matrix to generate a filtered output of the same size as the input. Multiple kernels will produce different filtered outputs. For the convolution of an input matrix \(A\) with kernel \(F\) to produce a convolved output \(O\), the process can be expressed as [91]:  
\[O_{i,j}=\sum_{k=1}^{R}\sum_{l=1}^{R}F_{k,l}A_{i+k,j+1} \tag{2}\]  
CNN has been shown to be particularly suitable for image recognition and classification due to its ability of self-learning, which can automatically extract the features from different patterns without human supervision and prior knowledge [65; 92]. Hence, CNN has been widely applied in OPM and MFI to process images such as eye diagrams, histograms and constellation diagrams. In addition to the MLP and CNN discussed above, RNN has also been studied for OPM and MFI in short-reach optical communication systems and networks. Different from the previous feedforward neural networks, RNN can maintain information from the previous input using its internal memory to affect the current input and output.