# Machine Learning Applications for Short Reach Optical Communication
## 2 Machine Learning for OPM and MFI in Short Reach Optical Communications
In addition, RNN has good performance in the correlation modeling of time-varying data and is suitable for processing the signals of optical fiber communication systems received in the time sequence format. RNN has different architectures, and the long short-term memory (LSTM) is a special RNN that can model both long-term and short-term time dependence of time-varying data. The basic structure of LSTM is shown in Figure 6. At time \(t\), the hidden  
Figure 4: ANN architecture. Figure 5: CNN Architecture. state \(h_{t}\) is updated according to the current input \(x_{t}\) and the hidden state of the previous time step \(h_{t-1}\), which can be expressed as [89]:  
\[h_{t}=\sigma_{h}(W_{sh}x_{t}+W_{hh}h_{t-1}+b_{t}) \tag{3}\]  
where the weight between two successive hidden states is \(W_{hh}\), the weight at the input neuron is \(W_{xh}\), \(\sigma_{h}\) is the activation function and \(b_{t}\) is the connection bias vector. LSTM uses three different gates (a forget gate, an input gate, and an output gate) in the LSTM cell (Figure 6) to control the information transmission, and internal self-loops to retain the long-term dependencies already learned from prior input data. Therefore, it can boost the modeling accuracy of long-term dependencies. The forget gate \(f_{t}\) calculates the information about the cell state \(C_{t-1}\) at time \(t-1\) that needs to be forgotten at time \(t\), according to \(h_{t-1}\) and \(x_{t}\). The input gate then identifies what information needs to be updated, and the \(tanh\) nonlinear function produces the unit input state \(\widetilde{C}_{t}\). Then, the updated cell state at time \(t\)\(C_{t}\) is calculated. Finally, the cell state \(C_{t}\) is used to determine the output \(h_{t}\), which is then filtered by the output gate \(o_{t}\) to produce the output sequence \(y_{t}=[h_{1},h_{2},\ldots\ldots.H_{\mathcal{T}}]\). The forget gate (\(f_{t}\)), input gate (\(i_{t}\)), output gate (\(o_{t}\)), input state (\(\hat{C}_{t}\)), cell state (\(C_{t}\)) and hidden state (\(h_{t}\)) calculations at time \(t\) in the forwards pass of an LSTM cell are [89]:  
\[f_{t} =\sigma_{g}(W_{f}[h_{t-1},x_{t}]+b_{f}) \tag{4}\] \[i_{t} =\sigma_{g}(W_{i}[h_{t-1},x_{t}]+b_{i})\] (5) \[Z_{j}=f\left(\sum W_{ji}X_{i}\right)+bias \tag{1}\]0 (6) \[Z_{j}=f\left(\sum W_{ji}X_{i}\right)+bias \tag{1}\]1 (7) \[Z_{j}=f\left(\sum W_{ji}X_{i}\right)+bias \tag{1}\]2 (8) \[Z_{j}=f\left(\sum W_{ji}X_{i}\right)+bias \tag{1}\]3  
where matrices \(W_{f}\), \(W_{i}\), \(W_{o}\) are the weights between the hidden layer and the three gates, \(W_{c}\) is the weight between the hidden layer and the input state, \(b_{f}\), \(b_{i}\), \(b_{o}\) and \(b_{c}\) are the bias, and \(*\) is the convolutional operator. The activation function of the three gates are \(\sigma_{g}\), which is typically based on a sigmoid function. In 2019, an OSNR monitoring scheme based on LSTM to evaluate the relationship of the time-varying data and the OSNR without the need for extracting features manually has been proposed and demonstrated [89]. \[Z_{j}=f\left(\sum W_{ji}X_{i}\right)+bias \tag{1}\]4 LSTM network structure. In addition to long-haul systems and networks, OPM and MFI technologies based on machine learning have also gained popularity in short-reach optical communication systems and networks recently. Due to the channel configuration, where the modulation format, symbol rate, interval and transmit power have become diversified, the ML technology has become a reliable tool, under the accumulated fiber propagation impairments during signal propagation [93]. Table 1 summarizes recent studies on ML-based OPM and MFI in short-reach optical communication systems and networks. Specifically, we listed key information of the system/network considered, the extracted feature used as the input to the ML models, and the ML model structures. In addition, key advantages and limitations of these studies are also summarized in the table.